Author: scabanovich
Date: 2007-07-26 10:34:48 -0400 (Thu, 26 Jul 2007)
New Revision: 2685
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProperty.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java
Log:
EXIN-217 Implemented text position calculation for SeamProperty.
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProperty.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProperty.java 2007-07-26
14:32:15 UTC (rev 2684)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProperty.java 2007-07-26
14:34:48 UTC (rev 2685)
@@ -13,6 +13,8 @@
import java.util.List;
import org.jboss.tools.seam.core.ISeamProperty;
+import org.jboss.tools.seam.core.ISeamXmlComponentDeclaration;
+import org.jboss.tools.seam.core.IValueInfo;
import org.jboss.tools.seam.core.event.Change;
import org.jboss.tools.seam.core.event.ISeamValue;
@@ -30,6 +32,18 @@
if(value != null) adopt((SeamObject)value);
}
+ public int getLength() {
+ IValueInfo info = attributes.get(ISeamXmlComponentDeclaration.NAME);
+ if(info != null) return info.getLength();
+ return 0;
+ }
+
+ public int getStartPosition() {
+ IValueInfo info = attributes.get(ISeamXmlComponentDeclaration.NAME);
+ if(info != null) return info.getStartPosition();
+ return 0;
+ }
+
public List<Change> merge(SeamObject s) {
List<Change> changes = super.merge(s);
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java 2007-07-26
14:32:15 UTC (rev 2684)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java 2007-07-26
14:34:48 UTC (rev 2685)
@@ -161,6 +161,7 @@
SeamProperty p = new SeamProperty();
p.setId(xml);
+ p.setName(new XMLValueInfo(c, "&" + a.getName()));
p.setName(toCamelCase(xml, false));
SeamValueString v = new SeamValueString();
v.setId("value");
Show replies by date