How to find fully qualified type name from simple type name? [message #595186] |
Tue, 31 October 2006 18:40 |
Eclipse User |
|
|
|
Originally posted by: m.bartsch.rdg.ac.uk
Hi all,
How can I find the fully qualified type name of an aspect from a simple
type name in my plug-in? If I have an IType object (e.g. theJavaType)
that represents a class, then
theJavaType.resolveType( "someClass" );
works fine and returns the fully qual. name of "someClass" which is
visible in theJavaType. If I have an IType that represent an aspect
(e.g. theAspectType), then it does not work and null is returned for
another aspect "someAspect" that is visible in theAspectType:
IType theAspectType = ... // Get IType for aspect E
String[][] tp = theAspectType.resolveType( "someAspect" );
// returns null;
The aspect in question could look like:
public aspect E
{
declare precedence : someAspect, someOtherAspect;
}
It should be noted that IType is org.eclipse.jdt.core.IType and not
org.aspectj.org.eclipse.jdt.core.IType and I assume that I should be
using the latter, but I do not know how to retrieve it. Is there maybe
an easier way to resolve a type name than using IType.resolveType?
Thanks a lot,
Marc.
|
|
|
Powered by
FUDForum. Page generated in 0.02700 seconds