Author: sdzmitrovich
Date: 2008-03-11 05:37:34 -0400 (Tue, 11 Mar 2008)
New Revision: 6829
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/EditableTemplateAdapter.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1865
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/EditableTemplateAdapter.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/EditableTemplateAdapter.java 2008-03-11
05:44:41 UTC (rev 6828)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/EditableTemplateAdapter.java 2008-03-11
09:37:34 UTC (rev 6829)
@@ -50,12 +50,12 @@
/**
* name of "view" tag
*/
- private static final String VIEW_TAGNAME = "view";
+ private static final String VIEW_TAGNAME = "view"; //$NON-NLS-1$
/**
* name of "locale" attribute
*/
- private static final String LOCALE_ATTRNAME = "locale";
+ private static final String LOCALE_ATTRNAME = "locale"; //$NON-NLS-1$
/*
* (non-Javadoc)
@@ -746,7 +746,9 @@
int visualAnchor = 0;
nsIDOMNode visualNode = null;
nsIDOMNode visualParent = null;
- if (focusNode == anchorNode) {
+ if ((focusNode == anchorNode)
+ && isNodeEditable(pageContext, focusNode, elementMapping
+ .getElementData())) {
visualNode = getVisualNode(pageContext, focusNode, elementMapping
.getElementData());
@@ -772,7 +774,8 @@
selection.collapse(visualNode, visualFocus);
- // selection.extend(visualNode, visualAnchor - visualFocus);
+// if(visualFocus!=visualAnchor)
+// selection.extend(visualNode, visualAnchor );
pageContext.getVisualBuilder().setSelectionRectangle(
(nsIDOMElement) visualParent);
}