Author: mareshkau
Date: 2008-07-21 05:33:02 -0400 (Mon, 21 Jul 2008)
New Revision: 9190
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
Log:
JBIDE-2505, some code was commented to avoid exception during selections of nodes.
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-20
01:51:46 UTC (rev 9189)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2008-07-21
09:33:02 UTC (rev 9190)
@@ -278,15 +278,15 @@
//here we restore only highlight
getPageContext().getVisualBuilder().setSelectionRectangle(
targetVisualNode);
- //TODO Max Areshkau now it's workd only for simple text, and should be adjusted
- targetVisualNode = targetVisualNode.getFirstChild();
- int visualNodeOffcet =
TextUtil.visualPosition(((Node)targetSourceNode).getNodeValue(),offcetReferenceToSourceNode);
- //added by Max Areshkau restore selection
-// Point visualSelectionRange = SelectionUtil.getVisualSelectionRange(selection);
- VpeDebugUtil.debugInfo(targetVisualNode.getNodeValue());
-// TextUtil.visualPosition(sourceText, sourcePosition)
- selectionController.getSelection((short)1).collapse(targetVisualNode,
visualNodeOffcet);
-// selectionController.getSelection((short)1).extend(targetVisualNode, focus);
+// //TODO Max Areshkau now it's workd only for simple text, and should be adjusted
+// targetVisualNode = targetVisualNode.getFirstChild();
+// int visualNodeOffcet =
TextUtil.visualPosition(((Node)targetSourceNode).getNodeValue(),offcetReferenceToSourceNode);
+// //added by Max Areshkau restore selection
+//// Point visualSelectionRange = SelectionUtil.getVisualSelectionRange(selection);
+// VpeDebugUtil.debugInfo(targetVisualNode.getNodeValue());
+//// TextUtil.visualPosition(sourceText, sourcePosition)
+// selectionController.getSelection((short)1).collapse(targetVisualNode,
visualNodeOffcet);
+//// selectionController.getSelection((short)1).extend(targetVisualNode, focus);
}
Show replies by date