| GetPlugin from TargetPlatform [message #912924] |
Fri, 14 September 2012 08:11  |
Stefan Weiser Messages: 15 Registered: February 2012 |
Junior Member |
|
|
Hello!
I'm looking for a solution to get a plugin from the TargetPlaform. The usecase is as follows:
I've got an Eclipse-Workspace, where I develop a Code-Generator. The Code-Generator reads out XML-files, which provides information to generate the code.
So I start the Generator as Eclipse-Plugin and get another Eclipse, where the generator is executable. The XMLs are now placed into the Target-Platform (not in the workspace). The Generator should load out the XML-Files out of the Target-Platform and generate Code into the Workspace.
My problem is that I don't know how to get the files out of the target platform. Platform.getExtensionRegistry() provides the possibility to get the extensions of the startet Eclipse, where the Generator gets developed. But I don't receive the extensions of the target-platform, where the XMLs are situated.
If my problem is not clear, I will try to explain it more clearly.
I hope somebody has an idea.
|
|
|
|
| Re: GetPlugin from TargetPlatform [message #922989 is a reply to message #913049] |
Tue, 25 September 2012 10:16   |
Stefan Weiser Messages: 15 Registered: February 2012 |
Junior Member |
|
|
Thx for that help!
I've found the Plugins of the TargetPlatform by using
PluginRegistry.getExternalModels();
I've seen the possibility to handle plugins via the org.osgi.framework.Bundle, but I don't find any object, which delivers a Bundle-Object of the given Target-Platform. Using
Platform.getBundle(String symbolicName)
doesn't deliver bundles of the TargetPlatform. And using
PluginRegistry.getExternalModels()[i].getBundleDescription().getBundle()
doesn't deliver anything, only Null.
Is it the only way to call the file by creating an InputStream and creating a temporary java.io.File?
[Updated on: Tue, 25 September 2012 10:24] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01566 seconds