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();