Author: scabanovich
Date: 2011-07-26 15:15:35 -0400 (Tue, 26 Jul 2011)
New Revision: 33210
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/PropertiesTextEditorComponent.java
Log:
JBIDE-9087
https://issues.jboss.org/browse/JBIDE-9087
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/PropertiesTextEditorComponent.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/PropertiesTextEditorComponent.java 2011-07-26
19:14:07 UTC (rev 33209)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/PropertiesTextEditorComponent.java 2011-07-26
19:15:35 UTC (rev 33210)
@@ -227,10 +227,12 @@
public void selectModelObject(XModelObject object) {
String text = getText();
- String name = object.getAttributeValue("dirtyname"); //$NON-NLS-1$
+ String name = object.getAttributeValue("name"); //$NON-NLS-1$
+ String dname = object.getAttributeValue("dirtyname"); //$NON-NLS-1$
String nvs = object.getAttributeValue("name-value-separator"); //$NON-NLS-1$
- int i = text.indexOf(name + nvs);
+ int i = text.indexOf(dname + nvs);
if(i < 0) return;
+ i = text.indexOf(name, i);
int j = text.indexOf('\n', i);
if(j < 0) j = text.length();
selectAndReveal(i, j - i);