Author: scabanovich
Date: 2011-05-02 18:50:10 -0400 (Mon, 02 May 2011)
New Revision: 31016
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ParametedType.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/TypeDeclaration.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParametedTypeFactory.java
Log:
JBIDE-8832
https://issues.jboss.org/browse/JBIDE-8832
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java 2011-05-02
22:33:32 UTC (rev 31015)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java 2011-05-02
22:50:10 UTC (rev 31016)
@@ -305,9 +305,9 @@
if(!s1.equals(s2) && Signature.getArrayCount(s1) ==
Signature.getArrayCount(s2)) {
p.setSignature(s2);
}
- result.add(new TypeDeclaration((ParametedType)other, offset, length));
+ result.add(new TypeDeclaration((ParametedType)other, typed.getResource(), offset,
length));
} else {
- result.add(new TypeDeclaration(p, offset, length));
+ result.add(new TypeDeclaration(p, typed.getResource(), offset, length));
}
}
}
@@ -333,9 +333,9 @@
if(!s1.equals(s2) && Signature.getArrayCount(s1) ==
Signature.getArrayCount(s2)) {
p.setSignature(s2);
}
- result.add(new TypeDeclaration((ParametedType)other, offset, length));
+ result.add(new TypeDeclaration((ParametedType)other, typed.getResource(), offset,
length));
} else {
- result.add(new TypeDeclaration(p, offset, length));
+ result.add(new TypeDeclaration(p, typed.getResource(), offset, length));
}
}
}
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java 2011-05-02
22:33:32 UTC (rev 31015)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java 2011-05-02
22:50:10 UTC (rev 31016)
@@ -72,7 +72,7 @@
}
}
- typeDeclaration = new TypeDeclaration(p, offset, length);
+ typeDeclaration = new TypeDeclaration(p, member.getResource(), offset, length);
}
}
} catch (JavaModelException e) {
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ParametedType.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ParametedType.java 2011-05-02
22:33:32 UTC (rev 31015)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ParametedType.java 2011-05-02
22:50:10 UTC (rev 31016)
@@ -191,7 +191,7 @@
String scn = type.getSuperclassName();
if(scn != null && provider.getRange(scn) != null) {
ISourceRange r = provider.getRange(scn);
- superType = new TypeDeclaration(superType, r.getOffset(), r.getLength());
+ superType = new TypeDeclaration(superType, type.getResource(), r.getOffset(),
r.getLength());
}
}
@@ -208,7 +208,7 @@
String scn = type.getSuperInterfaceNames()[i];
if(scn != null && provider.getRange(scn) != null) {
ISourceRange r = provider.getRange(scn);
- t = new TypeDeclaration(t, r.getOffset(), r.getLength());
+ t = new TypeDeclaration(t, type.getResource(), r.getOffset(), r.getLength());
}
}
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/TypeDeclaration.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/TypeDeclaration.java 2011-05-02
22:33:32 UTC (rev 31015)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/TypeDeclaration.java 2011-05-02
22:50:10 UTC (rev 31016)
@@ -19,13 +19,15 @@
*
*/
public class TypeDeclaration extends ParametedType implements ITypeDeclaration {
+ IResource resource;
int length;
int startPosition;
- public TypeDeclaration(ParametedType type, int startPosition, int length) {
+ public TypeDeclaration(ParametedType type, IResource resource, int startPosition, int
length) {
this.setFactory(type.getFactory());
this.type = type.getType();
arrayPrefix = type.arrayPrefix;
+ this.resource = resource;
this.length = length;
this.startPosition = startPosition;
@@ -52,6 +54,6 @@
}
public IResource getResource() {
- return type.getResource();
+ return resource;
}
}
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParametedTypeFactory.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParametedTypeFactory.java 2011-05-02
22:33:32 UTC (rev 31015)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParametedTypeFactory.java 2011-05-02
22:50:10 UTC (rev 31016)
@@ -52,7 +52,7 @@
CDICorePlugin.getDefault().logError(e);
}
if(r != null) {
- parametedType = new TypeDeclaration(parametedType, r.getOffset(), r.getLength());
+ parametedType = new TypeDeclaration(parametedType, type.getResource(), r.getOffset(),
r.getLength());
}
}
parametedType.setFactory(this);
@@ -193,7 +193,7 @@
if(sts.length() > 0) {
ParametedType st = getParametedType(contextType, sts);
if(st != null) {
- result = new TypeDeclaration(st, 0, 0);
+ result = new TypeDeclaration(st, context.getResource(), 0, 0);
}
} else if(result != null) {
result.setSignature(t);