JBoss Tools SVN: r9448 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/model.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-07-31 06:56:33 -0400 (Thu, 31 Jul 2008)
New Revision: 9448
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/model/NodeProxy.java
Log:
add check for null
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/model/NodeProxy.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/model/NodeProxy.java 2008-07-31 10:37:35 UTC (rev 9447)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/model/NodeProxy.java 2008-07-31 10:56:33 UTC (rev 9448)
@@ -62,13 +62,15 @@
NamedNodeMap basicAttributes = basicNode.getAttributes();
NamedNodeMap newAttributes = new NamedNodeMapImpl();
- for (int i = 0; i < basicAttributes.getLength(); i++) {
+ if (basicAttributes != null)
+ for (int i = 0; i < basicAttributes.getLength(); i++) {
- IDOMAttr attr = (IDOMAttr) basicAttributes.item(i);
+ IDOMAttr attr = (IDOMAttr) basicAttributes.item(i);
- newAttributes.setNamedItem(new AttributeProxy(attr, basicOffset));
+ newAttributes
+ .setNamedItem(new AttributeProxy(attr, basicOffset));
- }
+ }
return newAttributes;
}
16 years, 4 months
JBoss Tools SVN: r9447 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-07-31 06:37:35 -0400 (Thu, 31 Jul 2008)
New Revision: 9447
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
Log:
JBIDE-2584
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2008-07-31 10:03:11 UTC (rev 9446)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2008-07-31 10:37:35 UTC (rev 9447)
@@ -747,7 +747,7 @@
try {
visualEditor.getController().init(sourceEditor, visualEditor);
} catch (Exception e) {
- VpePlugin.reportProblem(e);
+ VpePlugin.getDefault().logError(e);
}
}
});
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-07-31 10:03:11 UTC (rev 9446)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-07-31 10:37:35 UTC (rev 9447)
@@ -148,7 +148,7 @@
final Node node = sourceNode.getChildNodes().item(i);
if (node.getNodeType() == Node.ELEMENT_NODE) {
- if((rst = findInResourcesBundle(pageContext, (Element) node))){
+ if((rst = findInResourcesBundle(pageContext, node))){
break;
}
16 years, 4 months
JBoss Tools SVN: r9446 - in trunk: vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-07-31 06:03:11 -0400 (Thu, 31 Jul 2008)
New Revision: 9446
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeNodeMapping.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java
Log:
JBIDE-2584, code cleanup
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java 2008-07-31 09:20:36 UTC (rev 9445)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java 2008-07-31 10:03:11 UTC (rev 9446)
@@ -1,7 +1,6 @@
package org.jboss.tools.jsf.vpe.jsf.template;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.jsf.vpe.jsf.template.util.NodeProxyUtil;
import org.jboss.tools.jsf.vpe.jsf.template.util.model.VpeElementProxyData;
@@ -165,14 +164,15 @@
VpeNodeMapping nodeMapping = domMapping.getNodeMapping(node);
if (nodeMapping != null) {
- if (nodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ if (nodeMapping instanceof VpeElementMapping) {
nodeData = super.getNodeData(node,
((VpeElementMapping) nodeMapping).getElementData(),
domMapping);
- } else if (nodeMapping.getType() == VpeNodeMapping.TEXT_MAPPING) {
- nodeData = new NodeData(nodeMapping.getSourceNode(), node,
- true);
- }
+ }
+// else if (nodeMapping.getType() == VpeNodeMapping.TEXT_MAPPING) {
+// nodeData = new NodeData(nodeMapping.getSourceNode(), node,
+// true);
+// }
}
}
return nodeData;
@@ -197,7 +197,7 @@
if (nodeMapping != null) {
- if (nodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ if (nodeMapping instanceof VpeElementMapping) {
node = super.getVisualNodeByBySourcePosition(
(VpeElementMapping) nodeMapping, focusPosition,
anchorPosition, domMapping);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2008-07-31 09:20:36 UTC (rev 9445)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2008-07-31 10:03:11 UTC (rev 9446)
@@ -202,7 +202,7 @@
VpeNodeMapping nodeMapping = domMapping.getNodeMapping(visualSelectedAncestor);
if (visualSelectedAncestor.getNodeType() == Node.ELEMENT_NODE){
- if (nodeMapping != null && nodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING && ((VpeElementMapping)nodeMapping).isBorder(visualAncestor)){
+ if (nodeMapping != null && (nodeMapping instanceof VpeElementMapping) && ((VpeElementMapping)nodeMapping).isBorder(visualAncestor)){
visualSelectedAncestor = ((VpeElementMapping)nodeMapping).getBorder();
border = true;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java 2008-07-31 09:20:36 UTC (rev 9445)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java 2008-07-31 10:03:11 UTC (rev 9446)
@@ -255,7 +255,7 @@
VpeNodeMapping nodeMapping = NodesManagingUtil.getNodeMapping(
domMapping, visualNode);
if (nodeMapping != null
- && nodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ && nodeMapping instanceof VpeElementMapping) {
VpeElementMapping elementMapping = (VpeElementMapping) nodeMapping;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-07-31 09:20:36 UTC (rev 9445)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-07-31 10:03:11 UTC (rev 9446)
@@ -474,7 +474,7 @@
nsIDOMElement border = null;
- if(sourceNode instanceof Element && visualNewNode!= null) {
+ if(sourceNode instanceof Element && visualNewNode!= null &&visualNewNode.getNodeType()==nsIDOMNode.ELEMENT_NODE) {
setTooltip((Element) sourceNode, (nsIDOMElement)visualNewNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID));
}
@@ -496,7 +496,6 @@
sourceNode, visualNewNode, border,
template, ifDependencySet, creationData.getData(),
creationData.getElementData());
- // elementMapping.setXmlnsMap(xmlnsMap);
registerNodes(elementMapping);
}
if (template.isChildren()) {
@@ -856,9 +855,9 @@
case Node.DOCUMENT_NODE:
rebuildDom((Document) sourceNode);
break;
- case Node.COMMENT_NODE:
- updateComment(sourceNode);
- break;
+// case Node.COMMENT_NODE:
+// updateComment(sourceNode);
+// break;
default:
updateElement(getNodeForUpdate(sourceNode));
}
@@ -882,19 +881,19 @@
return sourceNode;
}
- private void updateComment(Node sourceNode) {
- VpeNodeMapping mapping = domMapping.getNodeMapping(sourceNode);
- if (mapping != null
- && mapping.getType() == VpeNodeMapping.COMMENT_MAPPING) {
- nsIDOMNodeList visualNodes = mapping.getVisualNode()
- .getChildNodes();
+// private void updateComment(Node sourceNode) {
+// VpeNodeMapping mapping = domMapping.getNodeMapping(sourceNode);
+// if (mapping != null
+// && mapping.getType() == VpeNodeMapping.COMMENT_MAPPING) {
+// nsIDOMNodeList visualNodes = mapping.getVisualNode()
+// .getChildNodes();
+//
+// if (visualNodes.getLength() > 0) {
+// visualNodes.item(0).setNodeValue(sourceNode.getNodeValue());
+// }
+// }
+// }
- if (visualNodes.getLength() > 0) {
- visualNodes.item(0).setNodeValue(sourceNode.getNodeValue());
- }
- }
- }
-
private void updateElement(Node sourceNode) {
VpeElementMapping elementMapping = null;
VpeNodeMapping nodeMapping = domMapping.getNodeMapping(sourceNode);
@@ -1031,7 +1030,7 @@
VpeNodeMapping nodeMapping = domMapping
.getNodeMapping(sourceParent);
if (nodeMapping != null
- && nodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ && nodeMapping instanceof VpeElementMapping) {
VpeTemplate template = ((VpeElementMapping) nodeMapping)
.getTemplate();
if (template != null) {
@@ -1455,12 +1454,14 @@
private int getResizerConstrains(nsIDOMNode visualNode) {
VpeNodeMapping nodeMapping = domMapping.getNodeMapping(visualNode);
if (nodeMapping != null
- && nodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ &&( nodeMapping instanceof VpeElementMapping)
+ &&( nodeMapping.getSourceNode() instanceof Element)
+ &&(nodeMapping.getVisualNode().getNodeType()==nsIDOMNode.ELEMENT_NODE)) {
return ((VpeElementMapping) nodeMapping).getTemplate()
.getTagDescription(pageContext,
(Element) nodeMapping.getSourceNode(),
visualDocument,
- (nsIDOMElement) nodeMapping.getVisualNode(),
+ (nsIDOMElement) nodeMapping.getVisualNode().queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID),
((VpeElementMapping) nodeMapping).getData())
.getResizeConstrains();
}
@@ -1560,13 +1561,13 @@
case nsIDOMNode.TEXT_NODE:
VpeNodeMapping nodeMapping = domMapping
.getNearNodeMapping(visualDropContainer);
- switch (nodeMapping.getType()) {
- case VpeNodeMapping.TEXT_MAPPING:
+// switch (nodeMapping.getType()) {
+// case VpeNodeMapping.TEXT_MAPPING:
sourceDropContainer = nodeMapping.getSourceNode();
sourceDropOffset = TextUtil.sourceInnerPosition(
sourceDropContainer.getNodeValue(), visualDropOffset);
- break;
- case VpeNodeMapping.ELEMENT_MAPPING:
+// break;
+// case VpeNodeMapping.ELEMENT_MAPPING:
// it's attribute
if (isTextEditable(visualDropContainer)) {
String[] atributeNames = ((VpeElementMapping) nodeMapping)
@@ -1582,8 +1583,8 @@
}
}
nodeMapping.getVisualNode();
- }
- break;
+// }
+// break;
}
if (sourceDropContainer != null) {
return getSourceInnerDropInfo(sourceDragNode, sourceDropContainer,
@@ -1601,7 +1602,7 @@
case Node.ELEMENT_NODE:
VpeNodeMapping nodeMapping = domMapping.getNodeMapping(container);
if (nodeMapping != null
- && nodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ && nodeMapping instanceof VpeElementMapping) {
canDrop = ((VpeElementMapping) nodeMapping).getTemplate()
.canInnerDrop(pageContext, container, dragNode);
}
@@ -1638,15 +1639,15 @@
VpeNodeMapping mapping = domMapping.getNearNodeMapping(container);
if (mapping != null) {
nsIDOMNode visualDropContainer = mapping.getVisualNode();
- switch (mapping.getType()) {
- case VpeNodeMapping.TEXT_MAPPING:
- break;
- case VpeNodeMapping.ELEMENT_MAPPING:
+// switch (mapping.getType()) {
+// case VpeNodeMapping.TEXT_MAPPING:
+// break;
+// case VpeNodeMapping.ELEMENT_MAPPING:
nsIDOMNode visualParent = visualDropContainer.getParentNode();
VpeNodeMapping oldMapping = mapping;
mapping = domMapping.getNearNodeMapping(visualParent);
if (mapping != null
- && mapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ && mapping instanceof VpeElementMapping) {
((VpeElementMapping) mapping).getTemplate()
.innerDrop(
pageContext,
@@ -1661,7 +1662,7 @@
new VpeSourceInnerDropInfo(container,
offset, true));
}
- }
+// }
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java 2008-07-31 09:20:36 UTC (rev 9445)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java 2008-07-31 10:03:11 UTC (rev 9446)
@@ -174,7 +174,7 @@
VpeTemplate template = TemplateManagingUtil
.getTemplateByVisualSelection(pageContext,getSelectedNode());
- // if template сan handle keyEvent than pass control to him. And if
+ // if template an handle keyEvent than pass control to him. And if
// template handled event return true
// if ((template instanceof ITemplateKeyEventHandler)
// && ((ITemplateKeyEventHandler) template).handleKeyPress(
@@ -913,7 +913,7 @@
private boolean isVisualNodeSourceAttribute(Node node) {
nsIDOMNode visualNode = domMapping.getVisualNode(node);
VpeNodeMapping nm = domMapping.getNodeMapping(visualNode);
- if (nm.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ if (nm instanceof VpeElementMapping) {
VpeElementMapping em = (VpeElementMapping)nm;
return em.getTemplate().isOutputAttributes();
}
@@ -931,7 +931,7 @@
return null;
}
VpeNodeMapping nm = domMapping.getNodeMapping(visualNode);
- if (nm.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ if (nm instanceof VpeElementMapping) {
VpeElementMapping mapping = (VpeElementMapping)nm;
String[] names = mapping.getTemplate().getOutputAtributeNames();
if(names!=null) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java 2008-07-31 09:20:36 UTC (rev 9445)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java 2008-07-31 10:03:11 UTC (rev 9446)
@@ -36,7 +36,7 @@
sourceMap.put(nodeMapping.getSourceNode(), nodeMapping);
if (nodeMapping.getVisualNode() != null) {
visualMap.put(nodeMapping.getVisualNode(), nodeMapping);
- if (nodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ if (nodeMapping instanceof VpeElementMapping) {
if (((VpeElementMapping)nodeMapping).getBorder() != null) {
visualMap.put(((VpeElementMapping)nodeMapping).getBorder(), nodeMapping);
}
@@ -199,11 +199,17 @@
public VpeElementMapping getNearElementMappingAtSourceNode(Node sourceNode) {
VpeNodeMapping nodeMapping = getNearNodeMappingAtSourceNode(sourceNode);
if (nodeMapping != null) {
- switch (nodeMapping.getType()) {
- case VpeNodeMapping.TEXT_MAPPING:
+
+// switch (nodeMapping.getType()) {
+// case VpeNodeMapping.TEXT_MAPPING:
+// return getNearElementMappingAtSourceNode(nodeMapping.getSourceNode().getParentNode());
+// case VpeNodeMapping.ELEMENT_MAPPING:
+// return (VpeElementMapping)nodeMapping;
+// }
+ if(nodeMapping instanceof VpeElementMapping) {
+ return (VpeElementMapping)nodeMapping;
+ } else {
return getNearElementMappingAtSourceNode(nodeMapping.getSourceNode().getParentNode());
- case VpeNodeMapping.ELEMENT_MAPPING:
- return (VpeElementMapping)nodeMapping;
}
}
return null;
@@ -212,11 +218,16 @@
public VpeElementMapping getNearElementMappingAtVisualNode(nsIDOMNode visualNode) {
VpeNodeMapping nodeMapping = getNearNodeMappingAtVisualNode(visualNode);
if (nodeMapping != null) {
- switch (nodeMapping.getType()) {
- case VpeNodeMapping.TEXT_MAPPING:
+// switch (nodeMapping.getType()) {
+// case VpeNodeMapping.TEXT_MAPPING:
+// return getNearElementMappingAtSourceNode(nodeMapping.getSourceNode().getParentNode());
+// case VpeNodeMapping.ELEMENT_MAPPING:
+// return (VpeElementMapping)nodeMapping;
+// }
+ if(nodeMapping instanceof VpeElementMapping) {
+ return (VpeElementMapping)nodeMapping;
+ } else {
return getNearElementMappingAtSourceNode(nodeMapping.getSourceNode().getParentNode());
- case VpeNodeMapping.ELEMENT_MAPPING:
- return (VpeElementMapping)nodeMapping;
}
}
return null;
@@ -279,7 +290,7 @@
if (visualNode != null) {
visualMap.remove(visualNode);
}
- if (nodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ if (nodeMapping instanceof VpeElementMapping) {
VpeElementMapping elementMapping = (VpeElementMapping)nodeMapping;
// Map xmlnsMap = elementMapping.getXmlnsMap();
// if (xmlnsMap != null) {
@@ -291,7 +302,7 @@
if (elementMapping.getBorder() != null) {
visualMap.remove(elementMapping.getBorder());
}
- elementMapping.getTemplate().beforeRemove(pageContext, (Element)elementMapping.getSourceNode(), (nsIDOMElement)elementMapping.getVisualNode(), elementMapping.getData());
+ elementMapping.getTemplate().beforeRemove(pageContext, elementMapping.getSourceNode(), elementMapping.getVisualNode(), elementMapping.getData());
}
}
removeChildren(sourceNode);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeNodeMapping.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeNodeMapping.java 2008-07-31 09:20:36 UTC (rev 9445)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeNodeMapping.java 2008-07-31 10:03:11 UTC (rev 9446)
@@ -14,11 +14,11 @@
import org.w3c.dom.Node;
public class VpeNodeMapping {
- public static final int EMPTY_MAPPING = 0;
- public static final int TEXT_MAPPING = 1;
- public static final int ELEMENT_MAPPING = 2;
- public static final int COMMENT_MAPPING = 3;
- public static final int DOCUMENT_MAPPING = 4;
+// public static final int EMPTY_MAPPING = 0;
+// public static final int TEXT_MAPPING = 1;
+// public static final int ELEMENT_MAPPING = 2;
+// public static final int COMMENT_MAPPING = 3;
+// public static final int DOCUMENT_MAPPING = 4;
private Node sourceNode;
private nsIDOMNode visualNode;
@@ -28,22 +28,22 @@
this.visualNode = visualNode;
}
- public int getType() {
- if (sourceNode != null) {
- switch (sourceNode.getNodeType()) {
- case Node.TEXT_NODE:
- return TEXT_MAPPING;
- case Node.ELEMENT_NODE:
- return ELEMENT_MAPPING;
- case Node.COMMENT_NODE:
- return COMMENT_MAPPING;
- case Node.DOCUMENT_NODE:
- return DOCUMENT_MAPPING;
- }
- return COMMENT_MAPPING;
- }
- return EMPTY_MAPPING;
- }
+// public int getType() {
+// if (sourceNode != null) {
+// switch (sourceNode.getNodeType()) {
+// case Node.TEXT_NODE:
+// return TEXT_MAPPING;
+// case Node.ELEMENT_NODE:
+// return ELEMENT_MAPPING;
+// case Node.COMMENT_NODE:
+// return COMMENT_MAPPING;
+// case Node.DOCUMENT_NODE:
+// return DOCUMENT_MAPPING;
+// }
+// return COMMENT_MAPPING;
+// }
+// return EMPTY_MAPPING;
+// }
public Node getSourceNode() {
return sourceNode;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java 2008-07-31 09:20:36 UTC (rev 9445)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java 2008-07-31 10:03:11 UTC (rev 9446)
@@ -133,7 +133,7 @@
String enteredChar = TextUtil.getChar(keyEvent);
// if selected node is element
- if (selectedNodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ if (selectedNodeMapping instanceof VpeElementMapping) {
VpeElementMapping elementMapping = (VpeElementMapping) selectedNodeMapping;
@@ -215,7 +215,7 @@
boolean editable = false;
// if selected node is element
- if (selectedNodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ if (selectedNodeMapping instanceof VpeElementMapping) {
VpeElementMapping elementMapping = (VpeElementMapping) selectedNodeMapping;
@@ -292,7 +292,7 @@
boolean editable = false;
// if selected node is element
- if (selectedNodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ if (selectedNodeMapping instanceof VpeElementMapping) {
VpeElementMapping elementMapping = (VpeElementMapping) selectedNodeMapping;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2008-07-31 09:20:36 UTC (rev 9445)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2008-07-31 10:03:11 UTC (rev 9446)
@@ -77,7 +77,7 @@
boolean isNodeEditable;
// if mapping is elementMapping
- if (nodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ if (nodeMapping instanceof VpeElementMapping) {
VpeElementMapping elementMapping = (VpeElementMapping) nodeMapping;
@@ -161,7 +161,7 @@
boolean isNodeEditable;
// if mapping is elementMapping
- if (nodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ if (nodeMapping instanceof VpeElementMapping) {
VpeElementMapping elementMapping = (VpeElementMapping) nodeMapping;
@@ -273,7 +273,7 @@
// int visualNodeOffcet = TextUtil.visualPosition(((Node)targetSourceNode).getNodeValue(),offcetReferenceToSourceNode);
// if mapping is elementMapping
- if (nodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
+ if (nodeMapping instanceof VpeElementMapping) {
VpeElementMapping elementMapping = (VpeElementMapping) nodeMapping;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java 2008-07-31 09:20:36 UTC (rev 9445)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java 2008-07-31 10:03:11 UTC (rev 9446)
@@ -919,7 +919,6 @@
public boolean canInnerDrag(VpePageContext pageContext,
Element sourceElement, nsIDOMDocument visualDocument,
nsIDOMElement visualElement, Object data) {
- // TODO Max Areshkau add DnD support
if (getDragger() != null) {
return getDragger().isDragEnabled();
16 years, 4 months
JBoss Tools SVN: r9445 - in trunk/seam/plugins: org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-07-31 05:20:36 -0400 (Thu, 31 Jul 2008)
New Revision: 9445
Modified:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ViewIDDirectEditPolicy.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ViewIDEditManager.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1189 Updated view id validator
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java 2008-07-31 09:04:49 UTC (rev 9444)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java 2008-07-31 09:20:36 UTC (rev 9445)
@@ -75,7 +75,7 @@
return list[0];
}
- public String getExtension(String template) {
+ public static String getExtension(String template) {
if(template != null) {
int i = template.trim().lastIndexOf('.');
if(i > 0) {
@@ -222,7 +222,7 @@
return path;
}
- String revalidatePath(String path, String template) {
+ public static String revalidatePath(String path, String template) {
if(path != null) path = path.trim();
if(path == null || path.length() == 0) return path;
if(!path.startsWith("/") && !path.startsWith("*")) path = "/" + path;
@@ -253,7 +253,7 @@
static String FORBIDDEN_INDICES = "\"\n\t\\:<>?|"; //* is allowed anywhere
- static boolean isCorrectPath(String path) {
+ public static boolean isCorrectPath(String path) {
if(path == null || path.equals("/") || path.indexOf("//") >= 0) return false;
if(path.endsWith("/") || path.indexOf("../") >= 0) return false;
if(path.endsWith("..")) return false;
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ViewIDDirectEditPolicy.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ViewIDDirectEditPolicy.java 2008-07-31 09:04:49 UTC (rev 9444)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ViewIDDirectEditPolicy.java 2008-07-31 09:20:36 UTC (rev 9445)
@@ -47,16 +47,21 @@
PagesElement node;
String value;
+ XModelObject object;
public FlowNameCommand(PagesElement node, String value) {
this.node = node;
this.value = value;
+ object = (XModelObject)node.getPagesModel().getData();
}
public boolean canExecute() {
- if (value == null)
- return false;
- return true;
+ ViewIDValidator val = new ViewIDValidator(object);
+ String message = val.isValid(value);
+
+ if (message == null || "".equals(message))
+ return true;
+ return false;
}
public boolean canUndo() {
@@ -67,8 +72,8 @@
Properties props = new Properties();
props.setProperty("mouse.x", ""+node.getLocation().x);
props.setProperty("mouse.y", ""+node.getLocation().y);
- XModelObject object = (XModelObject)node.getPagesModel().getData();
+
if(node instanceof Page)
AddPageOnDiagramHandler.createPage(object, value, props);
else if(node instanceof PageException)
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ViewIDEditManager.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ViewIDEditManager.java 2008-07-31 09:04:49 UTC (rev 9444)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ViewIDEditManager.java 2008-07-31 09:20:36 UTC (rev 9445)
@@ -37,6 +37,7 @@
import org.eclipse.ui.part.CellEditorActionHandler;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.seam.pages.xml.SeamPagesXMLMessages;
+import org.jboss.tools.seam.pages.xml.model.handlers.AddViewSupport;
import org.jboss.tools.seam.pages.xml.model.helpers.SeamPagesDiagramHelper;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesElement;
import org.jboss.tools.seam.ui.pages.editor.figures.ExceptionFigure;
@@ -56,12 +57,8 @@
}
};
- private XModelObject target;
+ XModelObject target;
- private XModelObject getTarget() {
- return target;
- }
-
public ViewIDEditManager(GraphicalEditPart source, CellEditorLocator locator) {
super(source, null, locator);
target = (XModelObject) ((PagesDiagramEditPart) source.getParent())
@@ -123,8 +120,9 @@
new Object[] { value }));
} else {
setErrorMessage("");
+ valueChanged(oldValidState, newValidState);
}
- valueChanged(oldValidState, newValidState);
+
}
protected Control createControl(Composite parent) {
@@ -165,7 +163,7 @@
actionHandler = new CellEditorActionHandler(actionBars);
actionHandler.addCellEditor(getCellEditor());
actionBars.updateActionBars();
- getCellEditor().setValidator(new ViewIDValidator());
+ getCellEditor().setValidator(new ViewIDValidator(target));
}
private void restoreSavedActions(IActionBars actionBars) {
@@ -210,47 +208,39 @@
text.setFont(scaledFont = new Font(null, fd));
}
}
+}
- static String FORBIDDEN_INDICES = "\"\n\t\\:<>?|"; // * is allowed anywhere
+class ViewIDValidator implements ICellEditorValidator {
+ private XModelObject target;
+
+ public ViewIDValidator(XModelObject target){
+ super();
+ this.target = target;
+ }
- static boolean isCorrectPath(String path) {
- if (path == null || path.equals("/") || path.indexOf("//") >= 0)
- return false;
- if (path.endsWith("/") || path.indexOf("../") >= 0)
- return false;
- if (path.endsWith(".."))
- return false;
- if (path.endsWith("*"))
- return true;
- for (int i = 0; i < FORBIDDEN_INDICES.length(); i++) {
- if (path.indexOf(FORBIDDEN_INDICES.charAt(i)) >= 0) {
- return false;
- }
- }
- return true;
+ private XModelObject getTarget() {
+ return target;
}
- class ViewIDValidator implements ICellEditorValidator {
- public String isValid(Object value) {
- if (value == null)
- return null;
+ public String isValid(Object value) {
+ if (value == null)
+ return null;
- String message = "";
- String viewID = value.toString();
+ String message = "";
+ String viewID = value.toString();
+ String path = AddViewSupport.revalidatePath(viewID, "");
- if (!isCorrectPath(viewID)) {
- message = SeamPagesXMLMessages.ATTRIBUTE_VIEW_ID_IS_NOT_CORRECT;
- return message;
- }
+ if (!AddViewSupport.isCorrectPath(path)) {
+ message = SeamPagesXMLMessages.ATTRIBUTE_VIEW_ID_IS_NOT_CORRECT;
+ return message;
+ }
- boolean doNotCreateEmptyRule = false;
- String pp = SeamPagesDiagramHelper.toNavigationRulePathPart(viewID);
- boolean exists = getTarget().getChildByPath(pp) != null;
- if (doNotCreateEmptyRule && exists) {
- message = "View exists.";
- return message;
- }
- return null;
+ String pp = SeamPagesDiagramHelper.toNavigationRulePathPart(path);
+ boolean exists = getTarget().getChildByPath(pp) != null;
+ if (exists) {
+ message = "View exists.";
+ return message;
}
+ return null;
}
}
\ No newline at end of file
16 years, 4 months
JBoss Tools SVN: r9444 - in trunk/vpe/plugins: org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-07-31 05:04:49 -0400 (Thu, 31 Jul 2008)
New Revision: 9444
Added:
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlCommentTemplate.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpePreviewDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
JBIDE-2584
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpePreviewDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpePreviewDomBuilder.java 2008-07-31 08:50:51 UTC (rev 9443)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpePreviewDomBuilder.java 2008-07-31 09:04:49 UTC (rev 9444)
@@ -12,21 +12,16 @@
import java.util.HashSet;
import java.util.List;
-import java.util.Map;
import java.util.Set;
import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.jboss.tools.jst.jsp.preferences.VpePreference;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
-import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.template.VpeTemplate;
import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
import org.jboss.tools.vpe.editor.util.ElService;
-import org.jboss.tools.vpe.editor.util.HTML;
-import org.jboss.tools.vpe.editor.util.TextUtil;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.xpcom.XPCOMException;
@@ -41,7 +36,7 @@
boolean rebuildFlag = false;
- private static final String YES_STRING = "yes";
+// private static final String YES_STRING = "yes";
/**
*
@@ -63,9 +58,9 @@
*/
@Override
protected nsIDOMNode createNode(Node sourceNode, nsIDOMNode visualOldContainer) {
- boolean registerFlag = isCurrentMainDocument();
- switch (sourceNode.getNodeType()) {
- case Node.ELEMENT_NODE:
+// boolean registerFlag = isCurrentMainDocument();
+// switch (sourceNode.getNodeType()) {
+// case Node.ELEMENT_NODE:
// Map xmlnsMap = createXmlns((Element)sourceNode);
Set ifDependencySet = new HashSet();
@@ -74,14 +69,20 @@
* to fix h:dataTable content visibility on Preview tab.
* http://jira.jboss.com/jira/browse/JBIDE-2059
*/
+ if(sourceNode==null||(
+ sourceNode.getNodeType()!=Node.TEXT_NODE
+ &&sourceNode.getNodeType()!=Node.ELEMENT_NODE
+ &&sourceNode.getNodeType()!=Node.COMMENT_NODE)) {
+ return null;
+ }
getPageContext().setCurrentVisualNode(visualOldContainer);
- VpeTemplate template = templateManager.getTemplate(getPageContext(), (Element)sourceNode, ifDependencySet);
+ VpeTemplate template = templateManager.getTemplate(getPageContext(), sourceNode, ifDependencySet);
VpeCreationData creationData;
//FIX FOR JBIDE-1568, added by Max Areshkau
try {
- if (ElService.getInstance().isCloneableNode(getPageContext(), (Element) sourceNode)) {
- final Element sourceNodeClone = (Element) ((Element) sourceNode).cloneNode(true);
+ if (ElService.getInstance().isCloneableNode(getPageContext(), sourceNode)) {
+ final Node sourceNodeClone = sourceNode.cloneNode(true);
template.beforeTemplateCreated(getPageContext(), sourceNodeClone, getVisualDocument());
creationData = template.create(getPageContext(), sourceNodeClone, getVisualDocument());
} else {
@@ -93,19 +94,21 @@
creationData = defTemplate.create(getPageContext(), sourceNode, getVisualDocument());
}
getPageContext().setCurrentVisualNode(null);
- nsIDOMElement visualNewElement;
- visualNewElement = (nsIDOMElement)creationData.getNode();
+ nsIDOMNode visualNewNode;
+ visualNewNode = creationData.getNode();
- setTooltip((Element)sourceNode, visualNewElement);
-
- if (!isCurrentMainDocument() && visualNewElement != null) {
- setReadOnlyElement(visualNewElement);
+ if(sourceNode instanceof Element && visualNewNode != null) {
+
+ setTooltip((Element)sourceNode, (nsIDOMElement)visualNewNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID));
}
+// if (!isCurrentMainDocument() && visualNewElement != null) {
+// setReadOnlyElement(visualNewElement);
+// }
if (template.isChildren()) {
List<?> childrenInfoList = creationData.getChildrenInfoList();
if (childrenInfoList == null) {
- addChildren(template, sourceNode, visualNewElement != null ? visualNewElement : visualOldContainer);
+ addChildren(template, sourceNode, visualNewNode != null ? visualNewNode : visualOldContainer);
} else {
addChildren(template, sourceNode, visualOldContainer, childrenInfoList);
}
@@ -117,23 +120,23 @@
* http://jira.jboss.com/jira/browse/JBIDE-2059
*/
getPageContext().setCurrentVisualNode(visualOldContainer);
- template.validate(getPageContext(), (Element)sourceNode, getVisualDocument(), creationData);
+ template.validate(getPageContext(), sourceNode, getVisualDocument(), creationData);
getPageContext().setCurrentVisualNode(null);
- return visualNewElement;
- case Node.TEXT_NODE:
- return createTextNode(sourceNode, registerFlag);
- case Node.COMMENT_NODE:
- if(!YES_STRING.equals(VpePreference.SHOW_COMMENTS.getValue())) {
- return null;
- }
- nsIDOMElement visualNewComment = createComment(sourceNode);
- if (registerFlag) {
- registerNodes(new VpeNodeMapping(sourceNode, visualNewComment));
- }
- return visualNewComment;
- }
- return null;
+ return visualNewNode;
+// case Node.TEXT_NODE:
+// return createTextNode(sourceNode, registerFlag);
+// case Node.COMMENT_NODE:
+// if(!YES_STRING.equals(VpePreference.SHOW_COMMENTS.getValue())) {
+// return null;
+// }
+// nsIDOMElement visualNewComment = createComment(sourceNode);
+// if (registerFlag) {
+// registerNodes(new VpeNodeMapping(sourceNode, visualNewComment));
+// }
+// return visualNewComment;
+// }
+// return null;
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-07-31 08:50:51 UTC (rev 9443)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-07-31 09:04:49 UTC (rev 9444)
@@ -418,8 +418,7 @@
&&sourceNode.getNodeType()!=Node.COMMENT_NODE)) {
return null;
}
-
-
+
// switch (sourceNode.getNodeType()) {
// case Node.ELEMENT_NODE:
@@ -2274,55 +2273,55 @@
* @return a visual element for text node
*/
- protected nsIDOMNode createTextNode(Node sourceNode, boolean registerFlag) {
- String sourceText = sourceNode.getNodeValue();
- if(sourceText!=null){
- final IFile file = getPageContext().getVisualBuilder().getCurrentIncludeInfo().getFile();
-
- sourceText = ElService.getInstance().replaceEl(file, sourceText);
- }
- /*
- * Max Areshkau this code causes very slow work of visual editor
- * when we editing in big files txt nodes.For example exmployee.xhtml
- * from JBIDE1105
- *
- * Denis Maliarevich:
- * To fix JBIDE-2003 and JBIDE-2042
- * this code should be uncommented.
- */
- if (sourceText.trim().length() <= 0) {
- if (registerFlag) {
- registerNodes(new VpeNodeMapping(sourceNode, null));
- }
- return null;
- }
+// protected nsIDOMNode createTextNode(Node sourceNode, boolean registerFlag) {
+// String sourceText = sourceNode.getNodeValue();
+// if(sourceText!=null){
+// final IFile file = getPageContext().getVisualBuilder().getCurrentIncludeInfo().getFile();
+//
+// sourceText = ElService.getInstance().replaceEl(file, sourceText);
+// }
+// /*
+// * Max Areshkau this code causes very slow work of visual editor
+// * when we editing in big files txt nodes.For example exmployee.xhtml
+// * from JBIDE1105
+// *
+// * Denis Maliarevich:
+// * To fix JBIDE-2003 and JBIDE-2042
+// * this code should be uncommented.
+// */
+// if (sourceText.trim().length() <= 0) {
+// if (registerFlag) {
+// registerNodes(new VpeNodeMapping(sourceNode, null));
+// }
+// return null;
+// }
+//
+// if (faceletFile) {
+// Matcher matcher_EL = REGEX_EL.matcher(sourceText);
+// if (matcher_EL.find()) {
+// BundleMap bundle = pageContext.getBundle();
+// int offset = pageContext.getVisualBuilder()
+// .getCurrentMainIncludeOffset();
+// if (offset == -1)
+// offset = ((IndexedRegion) sourceNode).getStartOffset();
+// String jsfValue = bundle.getBundleValue(sourceText, offset);
+// sourceText = jsfValue;
+// }
+// }
+// String visualText = TextUtil.visualText(sourceText);
+//
+// nsIDOMNode visualNewTextNode = visualDocument
+// .createTextNode(visualText);
+// nsIDOMElement element = visualDocument.createElement(HTML.TAG_SPAN);
+// element.setAttribute(HTML.ATTR_STYLE, ""); //$NON-NLS-1$
+// element.appendChild(visualNewTextNode);
+// if (registerFlag) {
+// registerNodes(new VpeNodeMapping(sourceNode, element));
+// }
+//
+// return element;
+// }
- if (faceletFile) {
- Matcher matcher_EL = REGEX_EL.matcher(sourceText);
- if (matcher_EL.find()) {
- BundleMap bundle = pageContext.getBundle();
- int offset = pageContext.getVisualBuilder()
- .getCurrentMainIncludeOffset();
- if (offset == -1)
- offset = ((IndexedRegion) sourceNode).getStartOffset();
- String jsfValue = bundle.getBundleValue(sourceText, offset);
- sourceText = jsfValue;
- }
- }
- String visualText = TextUtil.visualText(sourceText);
-
- nsIDOMNode visualNewTextNode = visualDocument
- .createTextNode(visualText);
- nsIDOMElement element = visualDocument.createElement(HTML.TAG_SPAN);
- element.setAttribute(HTML.ATTR_STYLE, ""); //$NON-NLS-1$
- element.appendChild(visualNewTextNode);
- if (registerFlag) {
- registerNodes(new VpeNodeMapping(sourceNode, element));
- }
-
- return element;
- }
-
/**
* @return the xulRunnerEditor
*/
Added: trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlCommentTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlCommentTemplate.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlCommentTemplate.java 2008-07-31 09:04:49 UTC (rev 9444)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+* Copyright (c) 2007-2008 Red Hat, Inc.
+* Distributed under license by Red Hat, Inc. All rights reserved.
+* This program is made available under the terms of the
+* Eclipse Public License v1.0 which accompanies this distribution,
+* and is available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributor:
+* Red Hat, Inc. - initial API and implementation
+******************************************************************************/
+package org.jboss.tools.vpe.html.template;
+
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.w3c.dom.Node;
+
+/**
+ * @author mareshkau
+ * Template for comment node
+ */
+public class HtmlCommentTemplate extends VpeAbstractTemplate {
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.editor.template.VpeTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
+ */
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+
+ nsIDOMNode commentNode = visualDocument.createComment(sourceNode.getNodeValue());
+
+ return new VpeCreationData(commentNode);
+ }
+
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextTemplate.java 2008-07-31 08:50:51 UTC (rev 9443)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextTemplate.java 2008-07-31 09:04:49 UTC (rev 9444)
@@ -1,13 +1,13 @@
-/*******************************************************************************
-* Copyright (c) 2007 Red Hat, Inc.
-* Distributed under license by Red Hat, Inc. All rights reserved.
-* This program is made available under the terms of the
-* Eclipse Public License v1.0 which accompanies this distribution,
-* and is available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* Red Hat, Inc. - initial API and implementation
-******************************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007-2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.vpe.html.template;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2008-07-31 08:50:51 UTC (rev 9443)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2008-07-31 09:04:49 UTC (rev 9444)
@@ -2132,8 +2132,8 @@
</vpe:tag>
<vpe:tag name="#comment" case-sensitive="no">
- <vpe:template children="no" modify="yes">
- <vpe:comment />
+ <vpe:template children="no" modify="yes"
+ class="org.jboss.tools.vpe.html.template.HtmlCommentTemplate">
</vpe:template>
</vpe:tag>
16 years, 4 months
JBoss Tools SVN: r9443 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-07-31 04:50:51 -0400 (Thu, 31 Jul 2008)
New Revision: 9443
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2043, code adjustment
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-07-31 08:50:47 UTC (rev 9442)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-07-31 08:50:51 UTC (rev 9443)
@@ -86,6 +86,7 @@
public static final String ATTR_VALIGN = "valign"; //$NON-NLS-1$
public static final String ATTR_SRC = "src"; //$NON-NLS-1$
public static final String ATTR_ALT = "alt"; //$NON-NLS-1$
+ public static final String ATTR_JSFC = "jsfc"; //$NON-NLS-1$
public static final String VALUE_TOP_ALIGN = "top"; //$NON-NLS-1$
public static final String VALUE_MIDDLE_ALIGN = "middle"; //$NON-NLS-1$
@@ -96,4 +97,5 @@
public static final String VALUE_CHECKBOX_TYPE = "checkbox"; //$NON-NLS-1$
public static final String VALUE_HIDDEN_TYPE = "hidden"; //$NON-NLS-1$
public static final String VALUE_BUTTON_TYPE = "button"; //$NON-NLS-1$
+
}
\ No newline at end of file
16 years, 4 months
JBoss Tools SVN: r9442 - trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-07-31 04:50:47 -0400 (Thu, 31 Jul 2008)
New Revision: 9442
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlImgTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2043, code adjustment
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlImgTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlImgTemplate.java 2008-07-30 20:04:32 UTC (rev 9441)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlImgTemplate.java 2008-07-31 08:50:47 UTC (rev 9442)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.vpe.html.template;
-import org.jboss.tools.jst.jsp.jspeditor.SourceEditorPageContext;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
@@ -28,11 +27,6 @@
*/
public class HtmlImgTemplate extends VpeAbstractTemplate {
- /*
- * Facelets "jsfc" attribute
- */
- private static final String JSFC = "jsfc";
-
/* (non-Javadoc)
* @see org.jboss.tools.vpe.editor.template.VpeTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
*/
@@ -54,7 +48,7 @@
if (HTML.ATTR_SRC.equalsIgnoreCase(name)) {
continue;
}
- if (JSFC.equalsIgnoreCase(name)) {
+ if (HTML.ATTR_JSFC.equalsIgnoreCase(name)) {
jsfc = true;
continue;
}
16 years, 4 months
JBoss Tools SVN: r9441 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core: dtd and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-07-30 16:04:32 -0400 (Wed, 30 Jul 2008)
New Revision: 9441
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jaxws-config_2_0.xsd
trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-ds_1_5.dtd
trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-service_4_2.dtd
trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-ws-security_1_0.xsd
trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/service-ref_4_2.dtd
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
JBIDE-2548
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jaxws-config_2_0.xsd
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jaxws-config_2_0.xsd (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jaxws-config_2_0.xsd 2008-07-30 20:04:32 UTC (rev 9441)
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="urn:jboss:jaxws-config:2.0"
+ xmlns:tns="urn:jboss:jaxws-config:2.0"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.1">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ This is the schema definition for JBossWS configurations JAXWS.
+ It relies on the handler definitions that are part of the standard J2EE-1.5 deployment descriptors.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="javaee_web_services_1_2.xsd"/>
+
+ <xsd:element name="jaxws-config" type="tns:jaxwsConfigType"/>
+ <xsd:complexType name="jaxwsConfigType">
+ <xsd:choice>
+ <xsd:element name="endpoint-config" type="tns:endpointConfigType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="client-config" type="tns:clientConfigType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="endpointConfigType">
+ <xsd:complexContent>
+ <xsd:extension base="tns:commonConfigType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="clientConfigType">
+ <xsd:complexContent>
+ <xsd:extension base="tns:commonConfigType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="commonConfigType">
+ <xsd:sequence>
+ <xsd:element name="config-name" type="xsd:string"/>
+ <xsd:element name="reliable-messaging" type="tns:rmConfigType" minOccurs="0"/>
+ <xsd:element name="pre-handler-chains" type="javaee:handler-chainsType" minOccurs="0"/>
+ <xsd:element name="post-handler-chains" type="javaee:handler-chainsType" minOccurs="0"/>
+ <xsd:element name="feature" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="property" type="tns:propertyType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="propertyType">
+ <xsd:sequence>
+ <xsd:element name="property-name" type="xsd:anyURI"/>
+ <xsd:element name="property-value" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <!-- WSRM configuration -->
+ <xsd:complexType name="rmConfigType">
+ <xsd:sequence>
+ <xsd:element name="delivery-assurance" type="tns:deliveryAssuranceType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+ Global WS-RM delivery assurance configuration that applies to all WSDL ports.
+ If there is the WS-Policy with attached WS-RM assertion in WSDL
+ associated with some port or its associated binding it
+ will always override this global configuration.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="backports-server" type="tns:backportsServerType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+ Backports server configuration to be used for addressable clients.
+ If element is not present in client configuration then client is anonymous.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="message-retransmission" type="tns:messageRetransmissionType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+ Message retransmission allow users to configure the QoS of WS-RM.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="port" type="tns:portType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+ WSDL port specific WS-RM delivery assurance configuration.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="messageRetransmissionType">
+ <xsd:attribute name="interval" type="xsd:int" use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+ Message retransmission interval (in seconds)
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="attempts" type="xsd:int" use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+ Maximum count of message retransmission attempts.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="timeout" type="xsd:int" use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+ Maximum count of seconds to wait for response.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="backportsServerType">
+ <xsd:attribute name="host" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ Host name to be used for backports server. If not specified default one will be detected.
+ Make sure you have DNS correctly configured so runtime is able to detect your real hostname.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="port" type="xsd:int" use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+ Port number to be used for backports server.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="deliveryAssuranceType">
+ <xsd:attribute name="quality" use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+ Quality of service to be ensured.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="AtLeastOnce"/>
+ <xsd:enumeration value="AtMostOnce"/>
+ <xsd:enumeration value="ExactlyOnce"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="inOrder" type="xsd:boolean" use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+ In order quality of service to be ensured. Set this attribute to 'true' to ensure in order message delivery.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="portType">
+ <xsd:sequence>
+ <xsd:element name="delivery-assurance" type="tns:deliveryAssuranceType">
+ <xsd:annotation>
+ <xsd:documentation>
+ This WSDL port specific WS-RM delivery assurance configuration
+ applies to all its operations.
+ This configuration always overrides the global configuration.
+ If there is a WS-Policy with attached WS-RM assertion in WSDL
+ associated with this port or its associated binding it
+ will be always overriden this port specific configuration.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+ WSDL port name specified in the form {namespace}localPart.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:complexType>
+
+</xsd:schema>
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-ds_1_5.dtd
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-ds_1_5.dtd (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-ds_1_5.dtd 2008-07-30 20:04:32 UTC (rev 9441)
@@ -0,0 +1,457 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!--dtd for jboss 4.0/jca 1.5 datasource configurations (*-ds.xml), transformed
+by ConnectionFactoryTemplate.xsl
+
+DOCTYPE datasources
+ PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd"
+
+DOCTYPE connection-factories
+ PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd"
+
+$Id: jboss-ds_1_5.dtd 63949 2007-07-10 17:03:32Z adrian(a)jboss.org $
+-->
+
+<!--
+The datasources element is the root of the jdbc datasource configuration
+-->
+<!ELEMENT datasources (mbean | local-tx-datasource | xa-datasource | no-tx-datasource |
+ ha-local-tx-datasource | ha-xa-datasource)*>
+
+<!-- Specify a jca-jdbc non-XADatasource (local) wrapper, using no transactions
+-->
+<!ELEMENT no-tx-datasource (jndi-name , use-java-context?, connection-url , driver-class ,
+connection-property* , user-name? , password? ,
+(application-managed-security | security-domain | security-domain-and-application)? ,
+min-pool-size? , max-pool-size? , blocking-timeout-millis? , background-validation?, background-validation-minutes?,
+idle-timeout-minutes? , validate-on-match?, new-connection-sql?, check-valid-connection-sql?, valid-connection-checker-class-name?,
+exception-sorter-class-name?, track-statements?, prefill?, use-fast-fail?,
+prepared-statement-cache-size?, share-prepared-statements? , set-tx-query-timeout?, query-timeout?,
+metadata?, type-mapping?, depends*)>
+
+<!-- Specify a jca-jdbc non-XADatasource (local) wrapper, using local
+transactions
+-->
+<!ELEMENT local-tx-datasource (jndi-name , use-java-context?, connection-url , driver-class ,
+transaction-isolation? , connection-property* , user-name? , password? ,
+(application-managed-security | security-domain | security-domain-and-application)? ,
+min-pool-size? , max-pool-size? , blocking-timeout-millis? , background-validation?, background-validation-minutes?,
+idle-timeout-minutes? , validate-on-match?, no-tx-separate-pools? , new-connection-sql? , check-valid-connection-sql? ,
+valid-connection-checker-class-name? , exception-sorter-class-name? , track-statements? , prefill?, use-fast-fail?,
+prepared-statement-cache-size?, share-prepared-statements? , set-tx-query-timeout?, query-timeout?,
+metadata?, type-mapping?, depends*)>
+
+<!-- Specify a jca-jdbc XADatasource wrapper
+-->
+<!ELEMENT xa-datasource (jndi-name , use-java-context?, track-connection-by-tx , xa-datasource-class ,
+xa-datasource-property* , isSameRM-override-value? , transaction-isolation? , user-name? , password? ,
+(application-managed-security | security-domain | security-domain-and-application)? ,
+min-pool-size? , max-pool-size? , blocking-timeout-millis? , background-validation?, background-validation-minutes?,
+idle-timeout-minutes? , validate-on-match?, no-tx-separate-pools? , xa-resource-timeout?, new-connection-sql? , check-valid-connection-sql? ,
+valid-connection-checker-class-name? , exception-sorter-class-name? , track-statements? , prefill?, use-fast-fail?,
+prepared-statement-cache-size?, share-prepared-statements? , set-tx-query-timeout?, query-timeout?,
+metadata?, type-mapping?, depends*)>
+
+<!-- The JNDI name under which the DataSource wrapper will be bound. Note that
+this name is relative to the "java:/" prefix unless use-java-context is false.
+Ex:
+<jndi-name>DefaultDS</jndi-name>
+-->
+<!ELEMENT jndi-name (#PCDATA)>
+
+<!-- Setting this to false will bind the DataSource into global jndi
+Ex:
+<use-java-context>false</use-java-context>
+-->
+<!ELEMENT use-java-context (#PCDATA)>
+
+<!-- The JDBC driver connection URL string
+Ex:
+<connection-url>jdbc:hsqldb:hsql://localhost:1701</connection-url>
+-->
+<!ELEMENT connection-url (#PCDATA)>
+
+<!-- The fully qualifed name of the JDBC driver class
+ Ex:
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+-->
+<!ELEMENT driver-class (#PCDATA)>
+
+<!-- Set java.sql.Connection transaction isolation level to use.
+The constants defined in the interface Connection are the possible transaction
+isolation levels and include:
+ TRANSACTION_READ_UNCOMMITTED
+ TRANSACTION_READ_COMMITTED
+ TRANSACTION_REPEATABLE_READ
+ TRANSACTION_SERIALIZABLE
+ TRANSACTION_NONE
+
+ Ex:
+ <transaction-isolation>TRANSACTION_SERIALIZABLE</transaction-isoation>
+-->
+<!ELEMENT transaction-isolation (#PCDATA)>
+
+<!-- Specify the default username used when creating a new connection.
+ Ex:
+ <user-name>sa</user-name>
+-->
+<!ELEMENT user-name (#PCDATA)>
+
+<!-- Specify the default password used when creating a new connection.
+ Ex:
+ <password>sa-pass</password>
+-->
+<!ELEMENT password (#PCDATA)>
+
+<!-- Indicates that app supplied parameters (such as from getConnection(user, pw))
+are used to distinguish connections in the pool.
+ Ex:
+ <application-managed-security/>
+-->
+<!ELEMENT application-managed-security EMPTY>
+
+<!-- Indicates Subject (from security domain) are used to distinguish connections in the pool.
+The content of the security-domain is the name of the JAAS security manager that will handle
+authentication. This name correlates to the JAAS login-config.xml descriptor
+application-policy/name attribute.
+
+ Ex:
+ <security-domain>HsqlDbRealm</security-domain>
+-->
+<!ELEMENT security-domain (#PCDATA)>
+
+<!-- Indicates that either app supplied parameters (such as from
+getConnection(user, pw)) or Subject (from security domain) are used to
+distinguish connections in the pool. The content of the
+security-domain is the name of the JAAS security manager that will handle
+authentication. This name correlates to the JAAS login-config.xml descriptor
+application-policy/name attribute.
+
+ Ex:
+ <security-domain-and-application>HsqlDbRealm</security-domain-and-application>
+-->
+<!ELEMENT security-domain-and-application (#PCDATA)>
+
+<!-- Whether to use separete pools for connection retrieved in a transaction
+ and those retieved outside a transaction
+e.g.
+ <no-tx-separate-pools/>
+-->
+<!ELEMENT no-tx-separate-pools EMPTY>
+
+<!-- The min-pool-size element indicates the minimum number of connections a
+pool should hold. These are not created until a Subject is known from a
+request for a connection. This default to 0.
+
+ Ex:
+ <min-pool-size>1</min-pool-size>
+-->
+<!ELEMENT min-pool-size (#PCDATA)>
+
+<!-- The max-pool-size element indicates the maximum number of connections for a
+pool. No more than MaxSize connections will be created in each sub-pool. This
+defaults to 20.
+-->
+<!ELEMENT max-pool-size (#PCDATA)>
+
+<!-- The blocking-timeout-millis element indicates the maximum time in
+milliseconds to block while waiting for a connection before throwing an
+exception. Note that this blocks only while waiting for a permit for a
+connection, and will never throw an exception if creating a new connection
+takes an inordinately long time. The default is 30000 (30 seconds).
+-->
+<!ELEMENT blocking-timeout-millis (#PCDATA)>
+
+<!-- The idle-timeout-minutes elements indicates the maximum time in
+minutes a connection may be idle before being closed. The actual maximum time
+depends also on the IdleRemover scan time, which is 1/2 the smallest
+idle-timeout-minutes of any pool.
+-->
+<!ELEMENT idle-timeout-minutes (#PCDATA)>
+
+<!-- The validate-on-match element indicates whether or not connection level validation should be done when a connection factory attempts to
+match a managed connection for a given set. This is typically exclusive to the use of background validation -->
+
+<!ELEMENT validate-on-match (#PCDATA)>
+
+<!-- An element to specify that connections should be validated on a background thread versus being validated
+ prior to use-->
+<!ELEMENT background-validation (#PCDATA)>
+
+<!-- The background-validation-minutes element specifies the amount of time, in minutes, that background validation
+ will run. -->
+<!ELEMENT background-validation-minutes (#PCDATA)>
+
+<!-- An element to specify that all intermediate end(suspend) and
+start(resume) calls. Also, all work on one tx will go through one
+connection.
+A side effect of this (currently at least) is that a connection will only
+be usable by one tx until the tx commits.
+ Ex:
+ <track-connection-by-tx/>
+-->
+<!ELEMENT track-connection-by-tx EMPTY>
+
+<!-- The fully qualifed name of the javax.sql.XADataSource implementation class.
+ Ex:
+ <xa-datasource-class>com.informix.jdbcx.IfxXADataSource</xa-datasource-class>
+-->
+<!ELEMENT xa-datasource-class (#PCDATA)>
+
+<!-- Specify a property to assign to the XADataSource implementation class.
+Each property is identified by the name attribute and the property value is
+given by the xa-datasource-property element content. The property is mapped
+onto the XADataSource implementation by looking for a JavaBeans style
+getter method for the property name. If found, the value of the property is
+set using the JavaBeans setter with the element text translated to the true
+property type using the java.beans.PropertyEditor for the type.
+
+ Ex:
+ <xa-datasource-property name="IfxWAITTIME">10</xa-datasource-property>
+ <xa-datasource-property name="IfxIFXHOST">myhost.mydomain.com</xa-datasource-property>
+ <xa-datasource-property name="PortNumber">1557</xa-datasource-property>
+ <xa-datasource-property name="DatabaseName">mydb</xa-datasource-property>
+ <xa-datasource-property name="ServerName">myserver</xa-datasource-property>
+-->
+<!ELEMENT xa-datasource-property (#PCDATA)>
+
+<!-- The xa-datasource-property name attribute specifies the name of the
+XADataSource attribute the xa-datasource-property element content provides
+the value of.
+-->
+<!ATTLIST xa-datasource-property name CDATA #REQUIRED>
+
+<!-- The isSameRM-override-value element allows one to unconditionally set
+whether the javax.transaction.xa.XAResource.isSameRM(XAResource) returns
+true or false.
+
+Ex:
+<isSameRM-override-value>true</isSameRM-override-value>
+-->
+<!ELEMENT isSameRM-override-value (#PCDATA)>
+
+<!-- The connection-property element allows you to pass in arbitrary connection
+properties to the Driver.connect(url, props) method. Each connection-property
+specifies a string name/value pair with the property name coming from the
+name attribute and the value coming from the element content.
+
+ Ex:
+ <connection-property name="char.encoding">UTF-8</connection-property>
+-->
+<!ELEMENT connection-property (#PCDATA)>
+
+<!-- The connection-property name attribute gives the name of the connection
+property.
+-->
+<!ATTLIST connection-property name CDATA #REQUIRED>
+
+<!-- Specify an SQL statement to execute whenever a connection is added to
+the connection pool.
+-->
+<!ELEMENT new-connection-sql (#PCDATA)>
+
+<!-- Specify an SQL statement to check validity of a pool connection. This
+may be called when managed connection is taken from pool for use.
+-->
+<!ELEMENT check-valid-connection-sql (#PCDATA)>
+
+<!-- An org.jboss.resource.adapter.jdbc.ValidConnectionChecker that provides
+a SQLException isValidConnection(Connection e) method to validate is a connection
+is valid. An exception means the connection is destroyed.
+This overrides the check-valid-connection-sql when present.
+
+Ex:
+<exception-sorter-class-name>
+ org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker
+</exception-sorter-class-name>
+-->
+<!ELEMENT valid-connection-checker-class-name (#PCDATA)>
+
+<!-- An org.jboss.resource.adapter.jdbc.ExceptionSorter that provides
+a boolean isExceptionFatal(SQLException e) method to validate is an exception
+should be broadcast to all javax.resource.spi.ConnectionEventListener as
+a connectionErrorOccurred message.
+
+Ex:
+<exception-sorter-class-name>
+ org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
+</exception-sorter-class-name>
+<exception-sorter-class-name>
+ org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter
+</exception-sorter-class-name>
+-->
+<!ELEMENT exception-sorter-class-name (#PCDATA)>
+
+<!-- Whether to check for unclosed statements when a
+ connection is returned to the pool and result sets are
+ closed when a statement is closed/return to the prepared
+ statement cache.
+ valid values are:
+ false - do not track statements and results
+ true - track statements and result sets and warn when they are not closed
+ nowarn - track statements but do no warn about them being unclosed (the default)
+ e.g.
+ <track-statements>nowarn</track-statements>
+-->
+<!ELEMENT track-statements EMPTY>
+
+<!-- Whether to attempt to prefill the connection pool. Empty element denotes a false value.
+ e.g.
+ <prefill>true</prefill>
+ -->
+<!ELEMENT prefill (#PCDATA) >
+
+<!-- Whether fail a connection allocation on the first connection if it is invalid (true)
+ or keep trying until the pool is exhausted of all potential connections (false)
+
+ default false.
+ e.g.
+ <use-fast-fail>true</use-fast-fail>
+ -->
+<!ELEMENT use-fast-fail (#PCDATA) >
+
+<!-- The number of prepared statements per connection in an LRU cache
+-->
+<!ELEMENT prepared-statement-cache-size (#PCDATA)>
+
+<!-- whether to share prepare statements, i.e. whether asking for same
+ statement twice without closing uses the same underlying prepared statement.
+
+ The default is false.
+ e.g.
+ <share-prepared-statements/>
+-->
+<!ELEMENT share-prepared-statements EMPTY>
+
+<!-- whether to set the query timeout based on the time remaining until transaction timeout,
+ any configured query timeout will be used if there is no transaction.
+
+ The default is false.
+ e.g.
+ <set-tx-query-timeout/>
+-->
+<!ELEMENT set-tx-query-timeout EMPTY>
+
+<!-- Any configured query timeout in seconds
+
+ The default is no timeout
+ e.g. 5 minutes
+ <query-timeout>300</query-timeout>
+-->
+<!ELEMENT query-timeout (#PCDATA)>
+
+<!-- The depends element specifies the JMX ObjectName string of a service
+that the connection manager services depend on.
+
+ Ex:
+ <depends>jboss:service=Hypersonic</depends>
+-->
+<!ELEMENT depends (#PCDATA)>
+
+<!-- The connection-factories element is the root of the generic jca adaptor section
+-->
+<!ELEMENT connection-factories (mbean | tx-connection-factory | no-tx-connection-factory)*>
+
+<!ELEMENT mbean ANY>
+
+<!-- The tx-connection-factory element is used to configure generic resource
+adapters supporting transactions
+-->
+<!ELEMENT tx-connection-factory (jndi-name , (local-transaction | xa-transaction) ,
+track-connection-by-tx? , rar-name?, connection-definition?, config-property* ,
+(application-managed-security | security-domain | security-domain-and-application)? ,
+min-pool-size? , max-pool-size? , blocking-timeout-millis? , background-validation?, background-validation-minutes?,
+idle-timeout-minutes? ,
+no-tx-separate-pools?, prefill?, use-fast-fail?, xa-resource-timeout?,
+metadata?, type-mapping?, depends*)>
+
+<!-- The no-tx-connection-factory element is used to configure generic resource
+adapters that do not support transactions
+-->
+<!ELEMENT no-tx-connection-factory (jndi-name , rar-name?, connection-definition? , config-property* ,
+(application-managed-security | security-domain | security-domain-and-application)? ,
+min-pool-size? , max-pool-size? , blocking-timeout-millis? , background-validation?, background-validation-minutes?,
+idle-timeout-minutes? , prefill?, use-fast-fail?,
+metadata?, type-mapping?, depends*)>
+
+<!-- The rar deployment to associate with the connection manager mbean.
+e.g. jms-ra.rar or myapplication.ear#my.rar for nested rars
+-->
+<!ELEMENT rar-name (#PCDATA)>
+
+<!-- The connection definition inside the rar deployment uniquely identified by the
+connection factory interface, e.g. javax.sql.DataSource
+-->
+<!ELEMENT connection-definition (#PCDATA)>
+
+<!-- Passed to XAResource.setTransactionTimeout()
+
+ Default is zero which does not invoke the setter
+ e.g. 5 minutes
+ <xa-resource-timeout>300</xa-resource-timeout>
+-->
+<!ELEMENT xa-resource-timeout (#PCDATA)>
+
+<!-- The xa-transaction element is used to mark that the tx-connection-factory
+supports XA transactions.
+-->
+<!ELEMENT xa-transaction EMPTY>
+
+<!-- The local-transaction element is used to mark that the tx-connection-factory
+supports local transactions.
+-->
+<!ELEMENT local-transaction EMPTY>
+
+<!-- The config-property specifies a mannaged connection factory property.
+-->
+<!ELEMENT config-property (#PCDATA)>
+
+<!-- The config-property name attribute gives the name of the connection
+factory property.
+-->
+<!ATTLIST config-property name CDATA #REQUIRED>
+
+<!-- The config-property type attribute gives the name of the connection
+factory property.
+-->
+<!ATTLIST config-property type CDATA #REQUIRED>
+
+<!-- The type mapping from conf/standardjboss.xml -->
+<!ELEMENT type-mapping (#PCDATA)>
+
+<!-- For backwards compatibility use type-mapping -->
+<!ELEMENT metadata (type-mapping)>
+
+<!-- EXPERIMENTAL: this is a copy of local-tx-datasource + url-delimeter
+-->
+<!ELEMENT ha-local-tx-datasource (jndi-name, use-java-context?, connection-url, url-delimetir,
+driver-class, transaction-isolation? , connection-property* , user-name? , password?,
+(application-managed-security | security-domain | security-domain-and-application)? ,
+min-pool-size? , max-pool-size? , blocking-timeout-millis? , idle-timeout-minutes? , background-validation?, background-validation-minutes?,
+no-tx-separate-pools? , new-connection-sql? , check-valid-connection-sql? , validate-on-match?,
+valid-connection-checker-class-name? , exception-sorter-class-name? , track-statements? , prefill?, use-fast-fail?,
+prepared-statement-cache-size?, share-prepared-statements? , set-tx-query-timeout?, query-timeout?,
+metadata?, type-mapping?, depends*)>
+
+<!-- Specify a jca-jdbc XADatasource wrapper
+-->
+<!ELEMENT ha-xa-datasource (jndi-name , use-java-context?, track-connection-by-tx , xa-datasource-class ,
+xa-datasource-property* , url-property, url-delimetir, isSameRM-override-value? , transaction-isolation? ,
+user-name? , password? ,
+(application-managed-security | security-domain | security-domain-and-application)? ,
+min-pool-size? , max-pool-size? , blocking-timeout-millis? , idle-timeout-minutes? , background-validation?, background-validation-minutes?,
+no-tx-separate-pools? , xa-resource-timeout? , validate-on-match?,
+new-connection-sql? , check-valid-connection-sql? ,
+valid-connection-checker-class-name? , exception-sorter-class-name? , track-statements? , prefill?, use-fast-fail?,
+prepared-statement-cache-size?, share-prepared-statements? , set-tx-query-timeout?, query-timeout?,
+type-mapping?, depends*)>
+
+<!-- Specifies the delimeter for URLs in connection-url for ha datasources
+-->
+<!ELEMENT url-delimeter (#PCDATA)>
+
+<!-- For HA XA datasource specifies the name of an xa-datasource-property that contains a list of URLs
+-->
+<!ELEMENT url-property (#PCDATA)>
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-service_4_2.dtd
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-service_4_2.dtd (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-service_4_2.dtd 2008-07-30 20:04:32 UTC (rev 9441)
@@ -0,0 +1,287 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!-- A skeleton JBoss MBean service descriptor DTD. This cannot be used in
+general to validate a jboss-service.xml descriptor due to the fact that the
+'attribute' element allows ANY content.
+
+$Id: jboss-service_4_0.dtd 33900 2005-07-25 04:26:25Z starksm $
+
+DOCTYPE server
+ PUBLIC "-//JBoss//DTD MBean Service 4.2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-service_4_2.dtd"
+-->
+<!-- The server element is the root element.
+-->
+<!ELEMENT server (loader-repository? , local-directory* , classpath* , mbean*)>
+
+<!-- The loader-repository specifies the name of the UnifiedLoaderRepository
+ MBean to use for the ear to provide ear level scoping of classes deployed
+ in the ear. It is a unique JMX ObjectName string. It may also specify
+ an arbitrary configuration by including a loader-repository-config element.
+
+Examples:
+ <loader-repository>jboss.test:loader=cts-cmp2v1-sar.ear</loader-repository>
+
+ <loader-repository loaderRepositoryClass='dot.com.LoaderRepository'>
+ dot.com:loader=unique-archive-name
+ <loader-repository-config configParserClass='dot.com.LoaderParser'>
+ java2ParentDelegaton=true
+ </loader-repository-config>
+ </loader-repository>
+-->
+<!ELEMENT loader-repository (#PCDATA | loader-repository-config)*>
+
+<!-- The loaderRepositoryClass attribute gives the classname of the
+org.jboss.mx.loading.LoaderRepository implementation.
+-->
+<!ATTLIST loader-repository loaderRepositoryClass CDATA #IMPLIED>
+
+<!-- The loader-repository-config element specifies any arbitrary configuration
+fragment for use in configuring the loader-repository instance. The actual
+content of this element is specific to the loaderRepositoryClass and the
+code parsing the element.
+-->
+<!ELEMENT loader-repository-config (#PCDATA)>
+
+<!-- The configParserClass attribute gives the classname of the
+org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfigParser
+implementation to use to parse the loader-repository-config content.
+-->
+<!ATTLIST loader-repository-config configParserClass CDATA #IMPLIED>
+
+<!-- A local-directory element specifies that portions of the sar are to be unjard into the data
+directory of the server configuration.
+-->
+<!ELEMENT local-directory EMPTY>
+
+<!-- The optional path attribute gives the prefix of the sar entries that should be copied
+into the data directory. If it is not specified the entire sar contents will be placed into
+the data directory.
+-->
+<!ATTLIST local-directory path CDATA #IMPLIED>
+
+<!-- A classpath element specifies a location which will be included in the services
+deployment classpath.
+-->
+<!ELEMENT classpath EMPTY>
+
+<!-- The codebase attribute specifies the base URL from which the jars or classes
+are loaded from. If the codebase is '.' then it is equal to the mbean deployment URL.
+Otherwise, it is resolved as a path spec relative to the serverHomeURL (e.g., file:/jboss-3.2.0)
+using the URL ctor URL(serverHomeURL, codebase)
+
+Examples:
+
+ <classpath codebase='.' archives='util.jar' />
+ <classpath codebase='http://classloader.dot.com' archives='*' />
+ <classpath codebase="lib" archives="*"/>
+-->
+<!ATTLIST classpath codebase CDATA #REQUIRED>
+
+<!-- The archives attribute specifies either the '*' wildcard to indicate all contents of the
+codebase should be included, or a comma seperated list of the jars to include.
+-->
+<!ATTLIST classpath archives CDATA #IMPLIED>
+
+<!-- The mbean element defines a JBoss MBean service. This includes the
+mbean class, attributes and dependencies.
+-->
+<!ELEMENT mbean (constructor? , xmbean? , attribute* , depends* , depends-list*)>
+
+<!-- The code attributes gives the fully qualified name of the MBean
+implementation class.
+-->
+<!ATTLIST mbean code CDATA #REQUIRED>
+
+<!-- The name attribute gives the JMX ObjectName string to use when registering
+the MBean. This must be a unique and valid JMX name.
+-->
+<!ATTLIST mbean name CDATA #REQUIRED>
+
+<!-- The optional interface attribute gives the full qualified name of the class
+uses to construct the management interface of the mbean. In absence of it an interface
+with the name ending by MBean will be looked in the implementation class. When used
+this interface is defined explicitely.
+-->
+<!ATTLIST mbean interface CDATA #IMPLIED>
+
+<!-- The xmbean-dd attribute defines the path to the JBoss XMBean descriptor. This
+is an xml document conforming to:
+
+<!DOCTYPE mbean PUBLIC
+ "-//JBoss//DTD JBOSS XMBEAN 1.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_0.dtd">
+
+If the descriptor is embedded via a nested xmbean element, the xmbean-dd attribute
+must be given as an empty string.
+
+Example:
+ <mbean code="org.jboss.test.jmx.xmbean.User"
+ name="jboss.test:service=xmbean-user"
+ xmbean-dd="META-INF/org/jboss/test/jmx/xmbean/User.xml" />
+-->
+<!ATTLIST mbean xmbean-dd CDATA #IMPLIED>
+
+<!-- The optional xmbean-code attribute specifies the ModelMBean implementation class
+to use. This defaults to org.jboss.mx.modelmbean.XMBean.
+-->
+<!ATTLIST mbean xmbean-code CDATA #IMPLIED>
+
+<!-- The xmbean element specifies a nested JBoss XMBean descriptor fragment. Its
+supported content model is the same as the mbean element of the jboss_xmbean_1_0.dtd
+
+Example:
+ <mbean code="org.jboss.test.jmx.xmbean.User"
+ name="jboss.test:service=xmbean-user"
+ xmbean-dd="">
+ <xmbean>
+ ...
+ </xmbean>
+ </mbean>
+-->
+<!ELEMENT xmbean ANY>
+
+<!-- The constructor element defines a non-default constructor to use when
+instantiating the mbean.
+-->
+<!ELEMENT constructor (arg*)>
+
+<!-- The arg element specify the constructor arguments in the order of the
+ctor signature. Each arg has a type and value attribute.
+-->
+<!ELEMENT arg EMPTY>
+
+<!-- The type attribute gives the type of the argument as defined in the
+ctor signature. If not defined java.lang.String is assumed.
+-->
+<!ATTLIST arg type CDATA #IMPLIED>
+
+<!-- The value attribute provides the string representation of the ctor
+argument. It is converted from a string to type using Java PropertyEditor or a
+ctor taking a single string as its argument.
+-->
+<!ATTLIST arg value CDATA #REQUIRED>
+
+<!-- The attribute element specifies the initial value for a management attribute of
+the enclosing mbean. Typically the value of the attribute element is the string
+representation of the attribute, but it can be an arbitrary xml fragment that is
+parsed by the mbean.
+-->
+<!ELEMENT attribute ANY>
+
+<!-- The required name attribute gives the name of the attribute. This is the
+name exposed by the mbean to the MBeanServer for the attribute.
+-->
+<!ATTLIST attribute name CDATA #REQUIRED>
+
+<!-- The optional replace attribute indicates whether references of the form ${x}
+in the attribute element content should be replaced with the corresponding
+System.getProperty(x) value.
+-->
+<!ATTLIST attribute replace (true | false) 'true'>
+<!-- The optional trim attribute specifies whether the attribute element content should
+be trimmed of whitespace.
+-->
+<!ATTLIST attribute trim (true | false) 'true'>
+
+<!-- The attributeClass attribute specifies that type of object that
+should be created. This is needed for non-concreate attribute types
+like interfaces and abstract classes.
+-->
+<!ATTLIST attribute attributeClass CDATA #IMPLIED>
+
+<!-- The serialDataType defines the how the content of the attribute
+element is interpretted by the ServiceConfigurator. The possible values
+are:
+ + text: the content is treated as the string representation of the
+ attribute value. It will be mapped to the attribute using the PropertyEditor
+ registered for the attribute type.
+ + javaBean: the content is a collection of property elements.
+ + jbxb: the content is an xml element from a namespace with an associated
+ xml schema that can be unmarshalled using the JBossXB framework.
+-->
+<!ATTLIST attribute serialDataType (text | javaBean | jbxb) 'text'>
+
+<!-- The property element is used to describe the JavaBean properties of
+an attribute when the attribute element serialDataType is javaBean.
+-->
+<!ELEMENT property (#PCDATA)>
+<!-- The required name attribute gives the name of the property. This is the
+name of a JavaBean property for the attribute type.
+-->
+<!ATTLIST property name CDATA #REQUIRED>
+
+<!-- The depends element specifies a JMX ObjectName string for an mbean
+on which the enclosing mbean depends.
+
+Example:
+ <mbean code="myBean" name="domain:name=x">
+ <depends optional-attribute-name="yName">domain:name=y</depends>
+ </mbean>
+
+ <mbean code="myBean" name="domain:name=x">
+ <depends optional-attribute-name="anonName">
+ <mbean code="nestedBean" name="domain:name=x.y">
+ ...
+ </mbean>
+ </depends>
+ </mbean>
+-->
+<!ELEMENT depends (#PCDATA | mbean)*>
+
+<!-- The optional-attribute-name attribute specifies the attribute name
+which should be populated with the JMX ObjectName of the depends element.
+This allows an mbean to have access to the name of the mbean on which
+it depends.
+-->
+<!ATTLIST depends optional-attribute-name CDATA #IMPLIED>
+
+<!-- The proxy-type attribute specifies the interface name
+that should be exposed on an MBeanProxy pointing at the dependent
+MBean, specified by the JMX ObjectName.
+
+The special value proxy-type="attribute" will use the
+class declared in the MBeanAttributeInfo as the interface
+for the MBeanProxy.
+
+Example:
+ <mbean code="org.jboss.example.Helper" name="domain:name=helper"/>
+
+ <mbean code="myBean" name="domain:name=x">
+ <depends optional-attribute-name="Helper"
+ proxy-type="org.jboss.example.HelperMBean"
+ >domain:name=helper</depends>
+ </mbean>
+
+ <mbean code="myBean" name="domain:name=x">
+ <depends optional-attribute-name="Helper"
+ proxy-type="attribute"
+ >domain:name=helper</depends>
+ </mbean>
+-->
+<!ATTLIST depends proxy-type CDATA #IMPLIED>
+
+<!-- The depends-list element specifies a series of JMX ObjectName
+strings of mbeans on which the enclosing mbean depends.
+
+Example:
+ <mbean code="myBean" name="domain:name=x">
+ <depends-list optional-attribute-name="myObjectNameList">
+ <depends-list-element>domain:name=y</depends-list-element>
+ <depends-list-element>domain:name=z</depends-list-element>
+ </depends-list>
+ </mbean>
+-->
+<!ELEMENT depends-list (depends-list-element)+>
+
+<!-- The optional-attribute-name attribute specifies the attribute name
+which should be populated with a java.util.List that contains the JMX
+ObjectName(s) of the depends-list elements. This allows an mbean to have
+access to the names of the mbeans on which it depends.
+-->
+<!ATTLIST depends-list optional-attribute-name CDATA #IMPLIED>
+
+<!-- The depends-list-element element specifies a JMX ObjectName string
+for an mbean on which the enclosing mbean depends.
+-->
+<!ELEMENT depends-list-element (#PCDATA | mbean)*>
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-ws-security_1_0.xsd
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-ws-security_1_0.xsd (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-ws-security_1_0.xsd 2008-07-30 20:04:32 UTC (rev 9441)
@@ -0,0 +1,354 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.jboss.com/ws-security/config" targetNamespace="http://www.jboss.com/ws-security/config" elementFormDefault="qualified">
+ <xs:element name="jboss-ws-security">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="key-store-file" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The key store file that will be used for all operations. This file is relative to the deployment. For example, WEB-INF/foo.keystore </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="key-store-type" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The type of the key store. For example, JKS.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="key-store-password" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>This specifies the key store's password.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="trust-store-file" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>This specifies the trust store. The truststore is used to validate all X.509v3 tokens that are included in the message. This file is relative to the deployment. For example, WEB-INF/foo.truststore.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="trust-store-type" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>This specifies the type of the trust store. For example, JKS.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="trust-store-password" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>This specifies the trust store's password.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="key-passwords" type="passwordsType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The passwords for the private keys in the keystore. Only required if the passwords are different from that of the keystore.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="timestamp-verification" type="timestampVerificationType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The tolerances and logging required when verifying the 'created' and 'expires' value of the timestamps.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="config" type="configType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The default security configuration that is applied to all operations on all ports. This is only used if there is no port/operation config.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="port" type="portType" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>The WSDL port.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="nonce-factory-class" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>This specifies the nonce factory class name. It is used to get the custom generator and store of nonces.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="passwordsType">
+ <xs:sequence>
+ <xs:element name="key-password" type="passwordType" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>The password for a private key in the keystore. Necessary only if the password is different from that of the keystore.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="passwordType">
+ <xs:attribute name="alias" type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation>The name of the private key.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="password" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>The password of this private key. If not specified, the keystore password will be used.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="timestampVerificationType">
+ <xs:attribute name="createdTolerance" type="xs:long" use="optional">
+ <xs:annotation>
+ <xs:documentation>The number of seconds in the future the created value on a message will be accepted.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="warnCreated" type="xs:boolean" use="optional">
+ <xs:annotation>
+ <xs:documentation>Specifies if a WARN should be logged if a message in the future is accepted within the configured 'createdTolerance'.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="expiresTolerance" type="xs:long" use="optional">
+ <xs:annotation>
+ <xs:documentation>The number of seconds tolerance when checking the expires value of the timestamp.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="warnExpires" type="xs:boolean" use="optional">
+ <xs:annotation>
+ <xs:documentation>Specifies if a WARN should be logged if an expired message is accepted that is within the 'expiresTolerance'.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="configType" mixed="true">
+ <xs:all>
+ <xs:element name="timestamp" type="timestampType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The timestamp options that can be used to configure WS-Security message expiration.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="username" type="usernameType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Specifies that the message should include a username token if there is a username set on the Call or Proxy object.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="encrypt" type="encryptType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Specifies that the message should be encrypted. If no targets are specified, then just the body will be encrypted.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="sign" type="signType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Specifies that the message should be signed. If no targets are specified then the entire body will be signed.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="requires" type="requiresType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Specifies the security requirements that should be applied when receiving a response from the communicating party. If this is not specified, all messages will be allowed through.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="authenticate" type="authenticateType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Specifies the token to be used for JAAS authentication. If this is not specified, the username token will be used if available.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:all>
+ </xs:complexType>
+ <xs:complexType name="requireTimestampType">
+ <xs:attribute name="maxAge" type="xs:long" use="optional">
+ <xs:annotation>
+ <xs:documentation>The maximum age that a message can be and still be processed.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="requireEncryptionType">
+ <xs:sequence>
+ <xs:element name="targets" type="targetsType" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="requireSignatureType">
+ <xs:sequence>
+ <xs:element name="targets" type="targetsType" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="requiresType">
+ <xs:all>
+ <xs:element name="timestamp" type="requireTimestampType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Indicates that a timestamp element must be present in the message, and that the message can not be older than maxAge.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="encryption" type="requireEncryptionType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Indicates that the specified targets in this message must be encrypted. If no targets are specified, then the full body of the message must be encrypted</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="signature" type="requireSignatureType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Indicates that the specified targets in this message must be signed. If no targets are specified, then the full body of the message must be signed.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:all>
+ </xs:complexType>
+ <xs:complexType name="timestampType">
+ <xs:attribute name="ttl" use="optional">
+ <xs:annotation>
+ <xs:documentation>The Time-To-Live for a message in seconds. The default is no expiration.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="usernameType">
+ <xs:attribute name="digestPassword" type="xs:boolean" use="optional">
+ <xs:annotation>
+ <xs:documentation>If true a password digest will be used as password element. The default is false.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="useNonce" type="xs:boolean" use="optional">
+ <xs:annotation>
+ <xs:documentation>Enables/disables nonce usage in the password digest. The default is true.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="useCreated" type="xs:boolean" use="optional">
+ <xs:annotation>
+ <xs:documentation>Enables/disables usage of the Created element in the password digest. The default is true.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="encryptType">
+ <xs:sequence>
+ <xs:element name="targets" type="targetsType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>A list of targets to apply the parent operation on.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="type" use="required">
+ <xs:annotation>
+ <xs:documentation>The type of token that should should be used when performing encryption. The only supported value is "x509v3", which means to use an X.509v3 cert to encrypt the symmetric key.</xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="x509v3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="alias" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>The name of the certificate to use.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="algorithm">
+ <xs:annotation>
+ <xs:documentation>The symmetric encryption algorithm to use. If not specified aes-128 will be used.</xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="aes-128"/>
+ <xs:enumeration value="aes-192"/>
+ <xs:enumeration value="aes-256"/>
+ <xs:enumeration value="tripledes"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="keyWrapAlgorithm">
+ <xs:annotation>
+ <xs:documentation>The algorithm to use to encrypt the symmetric secret key. If not specified rsa_15 will be used.</xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="rsa_15"/>
+ <xs:enumeration value="rsa_oaep"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="tokenReference" type="tokenReferenceType" use="optional">
+ <xs:annotation>
+ <xs:documentation>Specify the token reference type to be used; default direct reference to the token.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="signType">
+ <xs:sequence>
+ <xs:element name="targets" type="targetsType" minOccurs="0"/>
+ </xs:sequence>
+ <xs:attribute name="type" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="x509v3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="alias" type="xs:string" use="required"/>
+ <xs:attribute name="includeTimestamp" type="xs:boolean" use="optional"/>
+ <xs:attribute name="tokenReference" type="tokenReferenceType" use="optional">
+ <xs:annotation>
+ <xs:documentation>Specify the token reference type to be used; default direct reference to the token.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:simpleType name="tokenReferenceType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="directReference"/>
+ <xs:enumeration value="keyIdentifier"/>
+ <xs:enumeration value="x509IssuerSerial"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="operationType">
+ <xs:sequence>
+ <xs:element name="config" type="configType">
+ <xs:annotation>
+ <xs:documentation>The security configuration for a specific operation on a specific port. If specified the default configuration values are not used.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+ <xs:complexType name="portType">
+ <xs:sequence>
+ <xs:element name="config" type="configType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The default security configuration that is applied to all operations on this port. This is only used if there is no operation configuration defined.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="operation" type="operationType">
+ <xs:annotation>
+ <xs:documentation>The WSDL operation.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+ <xs:complexType name="targetType" mixed="true">
+ <xs:attribute name="contentOnly" type="xs:string" use="optional">
+ <xs:annotation>
+ <xs:documentation>If true, the content of this element will be encrypted as opposed to the entire element.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="type" use="required">
+ <xs:annotation>
+ <xs:documentation>The type of target. Current allowed values are qname, which specifies an XML fully qualified name, and wsuid which maps to an internal WS-Security id</xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="qname"/>
+ <xs:enumeration value="wsuid"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="targetsType">
+ <xs:sequence>
+ <xs:element name="target" type="targetType" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>An element in the message to perform an operation on. The content of this field should match the rules of the specified type.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="authenticateType">
+ <xs:choice minOccurs="1" maxOccurs="1">
+ <xs:element name="usernameAuth" type="usernameAuthType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Specifies that the username token should be used for JAAS authentication.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="signatureCertAuth" type="signatureCertAuthType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Specifies that the certificate token referenced from the signature should be used for JAAS authentication.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ <xs:complexType name="usernameAuthType"/>
+ <xs:complexType name="signatureCertAuthType">
+ <xs:attribute name="certificatePrincipal" use="optional">
+ <xs:annotation>
+ <xs:documentation>This specifies the class to be used to map certificates to principal. It must implement org.jboss.security.auth.certs.CertificatePrincipal. Default is org.jboss.security.auth.certs.SubjectCNMapping</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+</xs:schema>
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/service-ref_4_2.dtd
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/service-ref_4_2.dtd (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/service-ref_4_2.dtd 2008-07-30 20:04:32 UTC (rev 9441)
@@ -0,0 +1,90 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!--
+ $Id: jboss-web_4_0.dtd 60134 2007-01-31 13:14:47Z thomas.diesler(a)jboss.com $
+
+ <!DOCTYPE jboss-web PUBLIC
+ "-//JBoss//DTD Web Service Reference 4.2//EN"
+ "http://www.jboss.org/j2ee/dtd/service-ref_4_2.dtd">
+-->
+
+<!--
+ The service-ref element provides jboss specific deployment values to
+ the web service reference in application-client.xml.
+
+ Example:
+ <service-ref>
+ <service-ref-name>OrganizationService</service-ref-name>
+ <wsdl-override>file:/wsdlRepository/organization-service.wsdl</wsdl-override>
+ </service-ref>
+
+ <service-ref>
+ <service-ref-name>OrganizationService</service-ref-name>
+ <config-name>Secure Client Config</config-name>
+ <config-file>META-INF/jbossws-client-config.xml</config-file>
+ <port-component-ref>
+ <service-endpoint-interface>com.dot.SEI</service-endpoint-interface>
+ <call-property>
+ <prop-name>X</prop-name>
+ <prop-value>Y</prop-value>
+ </call-property>
+ </port-component-ref>
+ </service-ref>
+-->
+<!ELEMENT service-ref (service-ref-name, config-name?, config-file?, port-component-ref*, wsdl-override?, call-property*)>
+
+<!-- The service-ref-name element gives the ENC relative name used
+in the ejb-jar.xml service-ref-name element.
+
+Used in: service-ref
+-->
+<!ELEMENT service-ref-name (#PCDATA)>
+
+<!-- The optional config-name element gives the client configuration name that must be present in
+the configuration given by element config-file.
+
+The default is: Standard Client
+
+Used in: service-ref
+-->
+<!ELEMENT config-name (#PCDATA)>
+
+<!-- The optional config-file element gives the to a URL or resource name for the client configuration.
+The default is: META-INF/standard-jbossws-client-config.xml
+
+Used in: service-ref
+-->
+<!ELEMENT config-file (#PCDATA)>
+
+<!-- The port-component-ref element provides additional information about
+the standard j2ee service-reference/port-component-ref. Currently this includes
+properties that should be associated with the call/stub for the port.
+
+Used in: service-ref
+-->
+<!ELEMENT port-component-ref (service-endpoint-interface?, call-property*)>
+
+<!-- The wsdl-override element the actual wsdl docuement the web service client
+uses to connect to the remote service. It overrides the value of wsdl-file in ejb-jar.xml.
+
+Used in: service-ref
+-->
+<!ELEMENT wsdl-override (#PCDATA)>
+
+<!-- Fully qualified name of service endpoint interface
+-->
+<!ELEMENT service-endpoint-interface ( #PCDATA )>
+
+<!-- Arbitrary jaxrpc property values that should be set on a Call object
+before it's returned to the web service client. The valid properties can be any
+properties supported by the jaxrpc Call implementation.
+-->
+<!ELEMENT call-property ( prop-name, prop-value )>
+
+<!-- The string value of a property name
+-->
+<!ELEMENT prop-name (#PCDATA)>
+
+<!-- The string value of a property value
+-->
+<!ELEMENT prop-value (#PCDATA)>
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2008-07-30 18:27:32 UTC (rev 9440)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2008-07-30 20:04:32 UTC (rev 9441)
@@ -573,6 +573,29 @@
<public publicId="-//JBoss//DTD Web Application 4.2//EN"
uri="dtd/jboss-web_4_2.dtd"
webURL="http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd"/>
+ <public
+ publicId="http://www.jboss.com/ws-security/config"
+ uri="dtd/jboss-ws-security_1_0.xsd">
+ </public>
+ <public
+ publicId="urn:jboss:jaxws-config:2.0"
+ uri="dtd/jaxws-config_2_0.xsd">
+ </public>
+ <public
+ publicId="-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+ uri="dtd/jboss-ds_1_5.dtd"
+ webURL="http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
+ </public>
+ <public
+ publicId="-//JBoss//DTD MBean Service 4.2//EN"
+ uri="dtd/jboss-service_4_2.dtd"
+ webURL="http://www.jboss.org/j2ee/dtd/jboss-service_4_2.dtd">
+ </public>
+ <public
+ publicId="-//JBoss//DTD Web Service Reference 4.2//EN"
+ uri="dtd/service-ref_4_2.dtd"
+ webURL="http://www.jboss.org/j2ee/dtd/service-ref_4_2.dtd">
+ </public>
</catalogContribution>
</extension>
</plugin>
16 years, 4 months
JBoss Tools SVN: r9440 - in trunk/vpe/plugins: org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-07-30 14:27:32 -0400 (Wed, 30 Jul 2008)
New Revision: 9440
Added:
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextTemplate.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeElementMapping.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/IELService.java
Log:
JBIDE-2584
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-07-30 15:05:47 UTC (rev 9439)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-07-30 18:27:32 UTC (rev 9440)
@@ -390,9 +390,16 @@
}
return border;
}
-
+
+ /**
+ * Generates visual node
+ * @param sourceNode
+ * @param visualOldContainer
+ * @return
+ */
protected nsIDOMNode createNode(Node sourceNode,
nsIDOMNode visualOldContainer) {
+
boolean registerFlag = isCurrentMainDocument();
//reads and dispatch events
@@ -400,67 +407,41 @@
if(getPageContext().getSourceBuilder()==null ||includeDocuments==null) {
throw new VpeDisposeException();
-}
+ }
getPageContext().processDisplayEvents();
//check source node can be changed and link can be a null in this case
//we shouldn't process this node
- if(sourceNode==null) {
+ if(sourceNode==null||(
+ sourceNode.getNodeType()!=Node.TEXT_NODE
+ &&sourceNode.getNodeType()!=Node.ELEMENT_NODE
+ &&sourceNode.getNodeType()!=Node.COMMENT_NODE)) {
return null;
}
+
+// switch (sourceNode.getNodeType()) {
- switch (sourceNode.getNodeType()) {
- case Node.ELEMENT_NODE:
+// case Node.ELEMENT_NODE:
// Map<?, ?> xmlnsMap = createXmlns((Element) sourceNode);
Set<Node> ifDependencySet = new HashSet<Node>();
pageContext.setCurrentVisualNode(visualOldContainer);
VpeTemplate template = templateManager.getTemplate(pageContext,
- (Element) sourceNode, ifDependencySet);
+ sourceNode, ifDependencySet);
VpeCreationData creationData = null;
// FIX FOR JBIDE-1568, added by Max Areshkau
try {
-// if(getPageContext().isCreationDataExistInCash(sourceNode)) {
-
-// creationData = getPageContext().getVpeCreationDataFromCash(sourceNode).createHashCopy();
-// } else {
-
-// VpeCreationData
-// Map<String, String> oldAttributes = new HashMap<String, String>();
-// NamedNodeMap map = sourceNode.getAttributes();
-// for( int i = 0 ; i < map.getLength() ; i ++ ){
-// final Attr attr = (Attr) map.item(i);
-//
-// oldAttributes.put(attr.getName(),attr.getValue());
-// System.err.println(MessageFormat.format("name={0},value={1}", attr.getName(),attr.getValue()));
-//
-// }
- if (ElService.getInstance().isCloneableNode(getPageContext(),(Element) sourceNode)) {
- final Element sourceNodeClone = (Element) ((Element) sourceNode).cloneNode(true);
+ if (ElService.getInstance().isCloneableNode(getPageContext(), sourceNode)) {
+ final Node sourceNodeClone = (sourceNode).cloneNode(true);
template.beforeTemplateCreated(getPageContext(), sourceNodeClone, getVisualDocument());
creationData = template.create(getPageContext(), sourceNodeClone, getVisualDocument());
} else {
creationData = template.create(getPageContext(), sourceNode, getVisualDocument());
}
-
-
-//
-// map = sourceNode.getAttributes();
-// for( int i = 0 ; i < map.getLength() ; i ++ ){
-// final Attr attr = (Attr) map.item(i);
-//
-// attr.setValue(oldAttributes.get(attr.getName()));
-// }
-
-// if(creationData.getNode()!=null) {
-//
-// getPageContext().addCreationDataToCash(sourceNode, creationData.createHashCopy());
-//
-// }
-// }
+
} catch (XPCOMException ex) {
VpePlugin.getPluginLog().logError(ex);
VpeTemplate defTemplate = templateManager.getDefTemplate();
@@ -468,46 +449,52 @@
getVisualDocument());
}
- pageContext.setCurrentVisualNode(null);
- nsIDOMElement visualNewElement = null;
+ getPageContext().setCurrentVisualNode(null);
- if(creationData.getNode()!=null) {
-
- visualNewElement = (nsIDOMElement) creationData
- .getNode().queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- }
-
- if ((visualNewElement != null) && template.hasImaginaryBorder()) {
+ nsIDOMNode visualNewNode =creationData.getNode();
- visualNewElement.setAttribute(HTML.ATTR_STYLE, visualNewElement
- .getAttribute(HTML.ATTR_STYLE)
- + VpeStyleUtil.SEMICOLON_STRING + DOTTED_BORDER);
-
- }
+// nsIDOMElement visualNewElement = null;
+ //TODO Max Areshkau process it's correctly
+// if(creationData.getNode()!=null) {
+//
+// visualNewElement = (nsIDOMElement) creationData
+// .getNode().queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+// }
+//
+// if ((visualNewElement != null) && template.hasImaginaryBorder()) {
+//
+// visualNewElement.setAttribute(HTML.ATTR_STYLE, visualNewElement
+// .getAttribute(HTML.ATTR_STYLE)
+// + VpeStyleUtil.SEMICOLON_STRING + DOTTED_BORDER);
+//
+// }
+//
+// if (visualNewElement != null)
+// correctVisualAttribute(visualNewElement);
- if (visualNewElement != null)
- correctVisualAttribute(visualNewElement);
-
nsIDOMElement border = null;
- setTooltip((Element) sourceNode, visualNewElement);
- if (YES_STRING.equals(VpePreference.SHOW_BORDER_FOR_ALL_TAGS
- .getValue())
- && visualNewElement != null) {
- boolean block = true;
- if (template.getTagDescription(null, null, null,
- visualNewElement, null).getDisplayType() == VpeTagDescription.DISPLAY_TYPE_INLINE) {
- block = false;
+ if(sourceNode instanceof Element && visualNewNode!= null) {
+
+ setTooltip((Element) sourceNode, (nsIDOMElement)visualNewNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID));
}
- border = createBorder(sourceNode, visualNewElement, block);
- }
- if (!isCurrentMainDocument() && visualNewElement != null) {
- setReadOnlyElement(visualNewElement);
- }
+// if (YES_STRING.equals(VpePreference.SHOW_BORDER_FOR_ALL_TAGS
+// .getValue())
+// && visualNewElement != null) {
+// boolean block = true;
+// if (template.getTagDescription(null, null, null,
+// visualNewElement, null).getDisplayType() == VpeTagDescription.DISPLAY_TYPE_INLINE) {
+// block = false;
+// }
+// border = createBorder(sourceNode, visualNewElement, block);
+// }
+// if (!isCurrentMainDocument() && visualNewElement != null) {
+// setReadOnlyElement(visualNewElement);
+// }
if (registerFlag) {
VpeElementMapping elementMapping = new VpeElementMapping(
- (Element) sourceNode, visualNewElement, border,
+ sourceNode, visualNewNode, border,
template, ifDependencySet, creationData.getData(),
creationData.getElementData());
// elementMapping.setXmlnsMap(xmlnsMap);
@@ -517,35 +504,36 @@
List<?> childrenInfoList = creationData.getChildrenInfoList();
if (childrenInfoList == null) {
addChildren(template, sourceNode,
- visualNewElement != null ? visualNewElement
+ visualNewNode != null ? visualNewNode
: visualOldContainer);
} else {
addChildren(template, sourceNode, visualOldContainer,
childrenInfoList);
}
}
- pageContext.setCurrentVisualNode(visualOldContainer);
- template.validate(pageContext, (Element) sourceNode,
+ getPageContext().setCurrentVisualNode(visualOldContainer);
+ template.validate(getPageContext(), sourceNode,
visualDocument, creationData);
- pageContext.setCurrentVisualNode(null);
+ getPageContext().setCurrentVisualNode(null);
+
if (border != null)
- return border;
+ return border;
else
- return visualNewElement;
- case Node.TEXT_NODE:
- return createTextNode(sourceNode, registerFlag);
- case Node.COMMENT_NODE:
- if (!YES_STRING.equals(VpePreference.SHOW_COMMENTS.getValue())) {
- return null;
- }
- nsIDOMElement visualNewComment = createComment(sourceNode);
- if (registerFlag) {
- registerNodes(new VpeNodeMapping(sourceNode, visualNewComment));
- }
- return visualNewComment;
+ return visualNewNode;
+// case Node.TEXT_NODE:
+// return createTextNode(sourceNode, registerFlag);
+// case Node.COMMENT_NODE:
+// if (!YES_STRING.equals(VpePreference.SHOW_COMMENTS.getValue())) {
+// return null;
+// }
+// nsIDOMElement visualNewComment = createComment(sourceNode);
+// if (registerFlag) {
+// registerNodes(new VpeNodeMapping(sourceNode, visualNewComment));
+// }
+// return visualNewComment;
+// }
+// return null;
}
- return null;
- }
private void correctVisualAttribute(nsIDOMElement element) {
@@ -1509,9 +1497,9 @@
VpeNodeMapping node = domMapping.getNodeMapping(visualDragElement);
if (node instanceof VpeElementMapping) {
VpeElementMapping elementMapping = (VpeElementMapping) node;
- if (elementMapping != null) {
+ if (elementMapping != null && elementMapping.getSourceNode() instanceof Element) {
return elementMapping.getTemplate().canInnerDrag(pageContext,
- (Element) elementMapping.getSourceNode(),
+ (Element)elementMapping.getSourceNode(),
visualDocument, visualDragElement,
elementMapping.getData());
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeElementMapping.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeElementMapping.java 2008-07-30 15:05:47 UTC (rev 9439)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeElementMapping.java 2008-07-30 18:27:32 UTC (rev 9440)
@@ -17,6 +17,7 @@
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
public class VpeElementMapping extends VpeNodeMapping {
private VpeTemplate template;
@@ -30,10 +31,10 @@
private VpeElementData elementData;
private nsIDOMElement border;
- public VpeElementMapping(Element sourceElement,
- nsIDOMElement visualElement, nsIDOMElement border,
+ public VpeElementMapping(Node sourceElement,
+ nsIDOMNode visualNode, nsIDOMElement border,
VpeTemplate template, Set ifDependencySet, Object data, VpeElementData elementData) {
- super(sourceElement, visualElement);
+ super(sourceElement, visualNode);
this.template = template;
if (ifDependencySet != null && ifDependencySet.size() > 0) {
this.ifDependencySet = ifDependencySet;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2008-07-30 15:05:47 UTC (rev 9439)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2008-07-30 18:27:32 UTC (rev 9440)
@@ -230,6 +230,10 @@
private VpeTemplateFileList templateFileList = new VpeTemplateFileList();
private Set<String> withoutWhitespaceContainerSet = new HashSet<String>();
private Set<String> withoutPseudoElementContainerSet = new HashSet<String>();
+ //text template name
+ private static final String TEXT_TEMPLATE_NAME="#text"; //$NON-NLS-1$
+ //comment template name
+ private static final String COMMENT_TEMPLATE_NAME="#comment"; //$NON-NLS-1$
/**
* added by Max Areshkau, JBIDE-1494
@@ -300,31 +304,55 @@
return null;
}
+ /**
+ *
+ * @param pageContext
+ * @param sourceNode
+ * @return name of template
+ */
private String getTemplateName(VpePageContext pageContext, Node sourceNode) {
- String sourcePrefix = sourceNode.getPrefix();
-
- if (sourcePrefix == null
- || ((IDOMElement)sourceNode).isJSPTag()
- || "jsp".equals(sourcePrefix)) { //$NON-NLS-1$
- return sourceNode.getNodeName();
+
+ if(sourceNode==null) {
+ return null;
}
+ switch (sourceNode.getNodeType()){
- List<TaglibData> taglibs = XmlUtil.getTaglibsForNode(sourceNode,pageContext);
-
- TaglibData sourceNodeTaglib = XmlUtil.getTaglibForPrefix(sourcePrefix, taglibs);
+ case Node.TEXT_NODE:
+
+ return TEXT_TEMPLATE_NAME;
+
+ case Node.COMMENT_NODE:
+
+ return COMMENT_TEMPLATE_NAME;
+
+ case Node.ELEMENT_NODE:
+ String sourcePrefix = sourceNode.getPrefix();
- if(sourceNodeTaglib == null) {
+ if (sourcePrefix == null
+ || ((IDOMElement)sourceNode).isJSPTag()
+ || "jsp".equals(sourcePrefix)) { //$NON-NLS-1$
+ return sourceNode.getNodeName();
+ }
+
+ List<TaglibData> taglibs = XmlUtil.getTaglibsForNode(sourceNode,pageContext);
+
+ TaglibData sourceNodeTaglib = XmlUtil.getTaglibForPrefix(sourcePrefix, taglibs);
+
+ if(sourceNodeTaglib == null) {
+ return null;
+ }
+
+ String sourceNodeUri = sourceNodeTaglib.getUri();
+ String templateTaglibPrefix = getTemplateTaglibPrefix(sourceNodeUri);
+
+ if(templateTaglibPrefix != null) {
+ return templateTaglibPrefix + ":" + sourceNode.getLocalName(); //$NON-NLS-1$
+ }
return null;
+ default :
+ return null;
}
- String sourceNodeUri = sourceNodeTaglib.getUri();
- String templateTaglibPrefix = getTemplateTaglibPrefix(sourceNodeUri);
-
- if(templateTaglibPrefix != null) {
- return templateTaglibPrefix + ":" + sourceNode.getLocalName(); //$NON-NLS-1$
- }
-
- return null;
}
public String getTemplateTaglibPrefix(String sourceUri) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-07-30 15:05:47 UTC (rev 9439)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-07-30 18:27:32 UTC (rev 9440)
@@ -83,7 +83,7 @@
public String replaceEl(IFile resourceFile, String resourceString) {
// Assert.isNotNull(resourceString);
if ((resourceString == null) || (resourceFile == null)) {
- return "";
+ return ""; //$NON-NLS-1$
}
Assert.isNotNull(resourceFile);
String rst = resourceString;
@@ -124,7 +124,7 @@
*
* @return true, if is cloneable node
*/
- public boolean isCloneableNode(VpePageContext pageContext,Element sourceNode) {
+ public boolean isCloneableNode(VpePageContext pageContext,Node sourceNode) {
boolean rst = false;
final IFile file = pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile();
@@ -140,7 +140,7 @@
* @param sourceNode
* @return
*/
- public boolean isInResourcesBundle(VpePageContext pageContext, Element sourceNode) {
+ public boolean isInResourcesBundle(VpePageContext pageContext, Node sourceNode) {
boolean rst = findInResourcesBundle(pageContext, sourceNode);
if (!rst && (sourceNode.getChildNodes() != null) && (sourceNode.getChildNodes().getLength() > 0)) {
@@ -167,7 +167,7 @@
* @param sourceNode
* @return
*/
- private boolean findInResourcesBundle(VpePageContext pageContext, Element sourceNode) {
+ private boolean findInResourcesBundle(VpePageContext pageContext, Node sourceNode) {
boolean rst = false;
BundleMap bundleMap = pageContext.getBundle();
@@ -209,8 +209,9 @@
* @param value
* @return
*/
+ //TODO E Sherbin It's shouldn't bee here
private boolean isContainsEl(final String value) {
- return (value.contains("#{") || value.contains("${"));
+ return (value.contains("#{") || value.contains("${")); //$NON-NLS-1$//$NON-NLS-2$
}
@@ -222,7 +223,7 @@
*
* @return true, if is available for node
*/
- private boolean isAvailableForNode(Element sourceNode, IFile resourceFile) {
+ private boolean isAvailableForNode(Node sourceNode, IFile resourceFile) {
boolean rst = findForNode(sourceNode, resourceFile);
if (!rst && (sourceNode.getChildNodes() != null) && (sourceNode.getChildNodes().getLength() > 0)) {
@@ -247,7 +248,7 @@
* @param resourceFile
* @return
*/
- private boolean findForNode(Element sourceNode, IFile resourceFile) {
+ private boolean findForNode(Node sourceNode, IFile resourceFile) {
boolean rst = false;
final NamedNodeMap nodeMap = sourceNode.getAttributes();
final ResourceReference[] references = ELReferenceList.getInstance().getAllResources(resourceFile);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/IELService.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/IELService.java 2008-07-30 15:05:47 UTC (rev 9439)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/IELService.java 2008-07-30 18:27:32 UTC (rev 9440)
@@ -16,6 +16,7 @@
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
/**
@@ -77,7 +78,7 @@
*
* @return true, if is cloneable node
*/
- public boolean isCloneableNode(VpePageContext pageContext, Element sourceNode);
+ public boolean isCloneableNode(VpePageContext pageContext, Node sourceNode);
/**
@@ -88,6 +89,6 @@
*
* @return true, if is in resources bundle
*/
- boolean isInResourcesBundle(VpePageContext pageContext, Element sourceNode);
+ boolean isInResourcesBundle(VpePageContext pageContext, Node sourceNode);
}
Added: trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextTemplate.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextTemplate.java 2008-07-30 18:27:32 UTC (rev 9440)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+* Copyright (c) 2007 Red Hat, Inc.
+* Distributed under license by Red Hat, Inc. All rights reserved.
+* This program is made available under the terms of the
+* Eclipse Public License v1.0 which accompanies this distribution,
+* and is available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* Red Hat, Inc. - initial API and implementation
+******************************************************************************/
+
+package org.jboss.tools.vpe.html.template;
+
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.TextUtil;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.w3c.dom.Node;
+
+/**
+ * @author mareshkau
+ * Template for text nodes
+ */
+public class HtmlTextTemplate extends VpeAbstractTemplate {
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.vpe.editor.template.VpeTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
+ */
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ String sourceText = sourceNode.getNodeValue();
+
+ if (sourceText.trim().length() <= 0) {
+ return new VpeCreationData(visualDocument.createTextNode(sourceText));
+ }
+ String visualText = TextUtil.visualText(sourceText);
+
+ nsIDOMNode visualNewTextNode = visualDocument
+ .createTextNode(visualText);
+ //TODO Max Areshkau think may be we shouldn't use span
+ nsIDOMElement element = visualDocument.createElement(HTML.TAG_SPAN);
+ element.appendChild(visualNewTextNode);
+
+ return new VpeCreationData(element);
+ }
+
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2008-07-30 15:05:47 UTC (rev 9439)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2008-07-30 18:27:32 UTC (rev 9440)
@@ -2136,7 +2136,13 @@
<vpe:comment />
</vpe:template>
</vpe:tag>
-
+
+ <vpe:tag name="#text" case-sensitive="no">
+ <vpe:template children="no" modify="yes"
+ class="org.jboss.tools.vpe.html.template.HtmlTextTemplate">
+ </vpe:template>
+ </vpe:tag>
+
<vpe:template children="yes" modify="yes">
<vpe:any value="{name()}" title="{tagstring()}" />
</vpe:template>
16 years, 4 months
JBoss Tools SVN: r9439 - in trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor: action and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-07-30 11:05:47 -0400 (Wed, 30 Jul 2008)
New Revision: 9439
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/GenericActionBarContributor.java
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/action/HorizontalAutoLayoutAction.java
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/action/VerticalAutoLayoutAction.java
Log:
fixed the image invisibility of the auto layout buttons
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/GenericActionBarContributor.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/GenericActionBarContributor.java 2008-07-30 14:56:01 UTC (rev 9438)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/GenericActionBarContributor.java 2008-07-30 15:05:47 UTC (rev 9439)
@@ -28,8 +28,10 @@
import org.eclipse.gef.ui.actions.ZoomOutRetargetAction;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.actions.RetargetAction;
+import org.jboss.tools.flow.Activator;
import org.jboss.tools.flow.editor.action.HorizontalAutoLayoutAction;
import org.jboss.tools.flow.editor.action.VerticalAutoLayoutAction;
@@ -58,8 +60,16 @@
addRetargetAction( new RetargetAction(
GEFActionConstants.TOGGLE_GRID_VISIBILITY, "Grid" ));
- addRetargetAction( new RetargetAction(VerticalAutoLayoutAction.ID, null));
- addRetargetAction( new RetargetAction(HorizontalAutoLayoutAction.ID, null));
+ RetargetAction verticalAutoLayoutAction = new RetargetAction(VerticalAutoLayoutAction.ID, null);
+ verticalAutoLayoutAction.setImageDescriptor(
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/layoutV.gif")));
+ addRetargetAction(verticalAutoLayoutAction);
+
+ RetargetAction horizontalAutoLayoutAction = new RetargetAction(HorizontalAutoLayoutAction.ID, null);
+ horizontalAutoLayoutAction.setImageDescriptor(
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/layoutH.gif")));
+ addRetargetAction(horizontalAutoLayoutAction);
+
}
public void contributeToToolBar(IToolBarManager toolBarManager) {
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/action/HorizontalAutoLayoutAction.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/action/HorizontalAutoLayoutAction.java 2008-07-30 14:56:01 UTC (rev 9438)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/action/HorizontalAutoLayoutAction.java 2008-07-30 15:05:47 UTC (rev 9439)
@@ -43,7 +43,7 @@
setText("Auto Layout (Horizontal)");
setImageDescriptor(
ImageDescriptor.createFromURL(
- Activator.getDefault().getBundle().getEntry("/icons/layoutH.gif")));
+ Activator.getDefault().getBundle().getEntry("icons/layoutH.gif")));
setToolTipText("Auto layout the process (horizontal)");
}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/action/VerticalAutoLayoutAction.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/action/VerticalAutoLayoutAction.java 2008-07-30 14:56:01 UTC (rev 9438)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/action/VerticalAutoLayoutAction.java 2008-07-30 15:05:47 UTC (rev 9439)
@@ -55,7 +55,7 @@
setText("Auto Layout (Vertical)");
setImageDescriptor(
ImageDescriptor.createFromURL(
- Activator.getDefault().getBundle().getEntry("/icons/layoutV.gif")));
+ Activator.getDefault().getBundle().getEntry("icons/layoutV.gif")));
setToolTipText("Auto layout the process (vertical)");
}
16 years, 4 months