Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] Finding an IType

Hi all,

I'm writing a plug-in that wants to get an IType (reference to a Class
in my project) from a string (e.g. "Ljava.lang.Integer;" or
"Lorg.somewhere.MyClass;"). How do I do that?

I got this far, but I think I'm stuck:

String name="Ljava.lang.Integer;";
SearchPattern searchPattern = (SearchPattern)
SearchEngine.createSearchPattern(name,
            IJavaSearchConstants.CLASS,
            IJavaSearchConstants.DECLARATIONS,
            true);

What can I do with this searchPattern? The method findIndexMatches
requires a lot of objects, but how do I construct them?

thanks

PhF

-- 
ir. Philippe Faes
Ghent University - Department ELIS
Sint-Pietersnieuwstraat 41 -- B-9000 Gent
Tel:+32 9 264 89 10 - Fax:+32 9 264 35 94
    http://www.elis.UGent.be/~pfaes
ON1DEU   --   LPIC1  --  gpg-key:173720B6

Attachment: signature.asc
Description: This is a digitally signed message part


Back to the top