Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Find an IType in the whole (non workspace) classpath
Find an IType in the whole (non workspace) classpath [message #913361] Sat, 15 September 2012 11:30 Go to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Hi JDT,

While trying to fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=389022 I have stumbled on a need to do this:

I have an IProject p; it is a plugin project so it has some dependencies but none of them is in the workspace (all in the target platform). I need to search for an IType t for which I have the FQN.
The JavaCore.create(p).findType(fqn) returns null if the type isn't around in the workspace.

The fact is that I may want to find a reference to t in the case that this t is in a project dependency in the target platform. So rephrasing: having a FQN and insurance that it is on the classpath but in the Target Platform (not in workspace), how can I get a reference to t ?

Thanks.
Re: Find an IType in the whole (non workspace) classpath [message #913518 is a reply to message #913361] Sat, 15 September 2012 21:40 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan Herrmann
Messages: 1020
Registered: July 2009
Senior Member
If t is on the project's classpath I'm surprised it cannot be found by IJavaProject.findType(fqn).
What is the classpath entry that should provide the class?

Stephan
Re: Find an IType in the whole (non workspace) classpath [message #915171 is a reply to message #913518] Sun, 16 September 2012 18:02 Go to previous message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Hi Stephan,

You are right. I had messed with the classpath more than I should have. It is indeed found by the findType method.

Thanks,
Sopot
Previous Topic:How to call the difference view on two Java files
Next Topic:Eclipse doesn't work properly anymore [FIXED]
Goto Forum:
  


Current Time: Mon Oct 20 17:56:23 GMT 2014

Powered by FUDForum. Page generated in 0.01566 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software