Author: mareshkau
Date: 2007-12-18 15:28:19 -0500 (Tue, 18 Dec 2007)
New Revision: 5363
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/VpeSourceDomBuilder.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1209
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 2007-12-18
17:25:47 UTC (rev 5362)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2007-12-18
20:28:19 UTC (rev 5363)
@@ -363,7 +363,12 @@
visualSelectedNode = visualNode;
}
setVisualSelectionAtVisualNode(visualSelectedNode, 0);
- sourceBuilder.setSelection(sourceNode, 0, 0);
+ //added by Max Areshkau in scope of JBIDE-1209
+ if(sourceNode.getNodeType()!=Node.TEXT_NODE) {
+ sourceBuilder.setSelection(sourceNode, 0, 0);
+ } else if(sourceNode.getNodeType()==Node.TEXT_NODE) {
+ sourceBuilder.setSelection(sourceNode, 1, 0);
+ }
return sourceNode;
}
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 2007-12-18
17:25:47 UTC (rev 5362)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java 2007-12-18
20:28:19 UTC (rev 5363)
@@ -37,6 +37,7 @@
import org.jboss.tools.vpe.editor.template.VpeTemplate;
import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
import org.jboss.tools.vpe.editor.util.TextUtil;
+import org.jboss.tools.vpe.editor.util.VpeDebugUtil;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMNodeList;
@@ -318,6 +319,10 @@
// if (info != null) {
// info.setSourceCommentValue(pageContext, (Comment)sourceParent);
// }
+ //Added by Max Areshkau in scope of bug JBIDE-1209
+ } else if (sourceParent.getNodeType()==Node.TEXT_NODE) {
+
+ setSelection(sourceParent, 1, 0);
}
}
}