Author: scabanovich
Date: 2011-05-02 15:07:32 -0400 (Mon, 02 May 2011)
New Revision: 31006
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ext/impl/ValueInfo.java
Log:
JBIDE-8832
https://issues.jboss.org/browse/JBIDE-8832
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ext/impl/ValueInfo.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ext/impl/ValueInfo.java 2011-05-02
19:06:00 UTC (rev 31005)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ext/impl/ValueInfo.java 2011-05-02
19:07:32 UTC (rev 31006)
@@ -14,6 +14,7 @@
import java.util.List;
import java.util.Properties;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jdt.core.IMemberValuePair;
@@ -32,6 +33,7 @@
import org.w3c.dom.Element;
public class ValueInfo implements IValueInfo {
+ IFile resource;
String value;
public int valueStartPosition;
public int valueLength;
@@ -77,6 +79,9 @@
public static ValueInfo getValueInfo(IAnnotation annotation, String name) {
if(name == null) name = "value"; //$NON-NLS-1$
ValueInfo result = new ValueInfo();
+ if(annotation.getResource() instanceof IFile) {
+ result.setResource((IFile)annotation.getResource());
+ }
ISourceRange r = null;
IMemberValuePair[] ps = null;
try {
@@ -162,4 +167,13 @@
}
}
}
+
+ public void setResource(IFile resource) {
+ this.resource = resource;
+ }
+
+ public IFile getResource() {
+ return resource;
+ }
+
}