| [SOLVED] JDT API: Searching for classes in plug-ins [message #896106] |
Tue, 17 July 2012 05:31  |
Eclipse User |
|
|
|
Hi,
I have the following situation:
I've defined two DSLs (LibraryDSL and NetworkDSL). The LibraryDSL can be used to define so called element types and allows you to reference a Java class containing the Java implementation of such a type. This looks something like this:
library MyLibrary {
type ElementType {
implementingClass = "org.example.MyImplementingClass";
}
}
The classes referenced by the LibraryDSL must be in the project's classpath.
This works pretty fine using the JDT's SearchEngine.
This project (call it "TheLibraryProject") containing the LibraryDSL file and the implementation classes is a plug-in project. It is created by the system developers.
Additionally there is the NetworkDSL. NetworkDSL files reference the LibraryDSL and are created by the user. The NetworkDSL files are created in a general project ("NetworkProject") without a Java or PDE nature. They look something like this:
import "platform:/plugin/org.example/MyLibrary.librarydsl";
network nw {
element elem1 of ElementType {
}
}
Now I want to implement a builder for the "NetworkProject" which reads the .networkdsl file and creates instances of the implementation class for each network element.
How can I search for classes in a plug-in from a non-Java project?
Thank you very much for your help!
Best regards,
Stefan Wülfrath
[Updated on: Wed, 18 July 2012 08:24] by Moderator
|
|
|
|
|
|
| Re: JDT API: Searching for classes in plug-ins [message #896518 is a reply to message #896332] |
Wed, 18 July 2012 12:08  |
Eclipse User |
|
|
|
Stefan Wülfrath wrote on Wed, 18 July 2012 07:29I'm developing a new Eclipse plug-in including a new project nature.
BTW: a project can have multiple natures, so nothing should stop you from having your own nature and the Java nature and perhaps the PDE nature so you can ask the project for files on its class path.
Anyway, since you don't seem to require finding the class file, just accessing the loaded class, your solution might be OK.
Stephan
|
|
|
Powered by
FUDForum. Page generated in 0.05867 seconds