Author: scabanovich
Date: 2007-07-17 12:12:16 -0400 (Tue, 17 Jul 2007)
New Revision: 2476
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java
Log:
EXIN-217 Method getLocationFor moved to AbstractContextVariable
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java 2007-07-17
15:30:43 UTC (rev 2475)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java 2007-07-17
16:12:16 UTC (rev 2476)
@@ -97,6 +97,26 @@
return s1 == null ? s2 == null : s1.equals(s2);
}
+ /**
+ * @param path
+ * @return source reference for some member of declaration.
+ * e.g. if you need source reference for @Name you have to
+ * invoke getLocationFor("name");
+ */
+ public ISeamTextSourceReference getLocationFor(String path) {
+ final IValueInfo valueInfo = attributes.get(path);
+ ISeamTextSourceReference reference = new ISeamTextSourceReference() {
+ public int getLength() {
+ return valueInfo != null ? valueInfo.getLength() : 0;
+ }
+
+ public int getStartPosition() {
+ return valueInfo != null ? valueInfo.getStartPosition() : 0;
+ }
+ };
+ return reference;
+ }
+
public void setName(IValueInfo value) {
attributes.put(ISeamXmlComponentDeclaration.NAME, value);
name = value == null ? null : value.getValue();
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java 2007-07-17
15:30:43 UTC (rev 2475)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java 2007-07-17
16:12:16 UTC (rev 2476)
@@ -14,7 +14,6 @@
import org.eclipse.jdt.core.IMethod;
import org.jboss.tools.seam.core.ISeamAnnotatedFactory;
-import org.jboss.tools.seam.core.ISeamTextSourceReference;
import org.jboss.tools.seam.core.ISeamXmlComponentDeclaration;
import org.jboss.tools.seam.core.IValueInfo;
import org.jboss.tools.seam.core.event.Change;
@@ -49,26 +48,6 @@
return changes;
}
- /**
- * @param path
- * @return source reference for some member of declaration.
- * e.g. if you need source reference for @Name you have to
- * invoke getLocationFor("name");
- */
- public ISeamTextSourceReference getLocationFor(String path) {
- final IValueInfo valueInfo = attributes.get(path);
- ISeamTextSourceReference reference = new ISeamTextSourceReference() {
- public int getLength() {
- return valueInfo != null ? valueInfo.getLength() : 0;
- }
-
- public int getStartPosition() {
- return valueInfo != null ? valueInfo.getStartPosition() : 0;
- }
- };
- return reference;
- }
-
public void setAutoCreate(IValueInfo value) {
attributes.put(ISeamXmlComponentDeclaration.AUTO_CREATE, value);
setAutoCreate(value != null && "true".equals(value.getValue()));