[Acceleo] Java Services classpath [message #1009681] |
Fri, 15 February 2013 09:08  |
Eclipse User |
|
|
|
Hi,
I'm writing an eclipse plugin with an Action that runs an Acceleo generation.
Inside a template I use the invoke construct to call a java method.
The problem is that Acceleo is not able to find the .class file if I run an eclipse application from the 'eclipse plugins sdk' application.
Here is an idea about file locations:
* developing plugin's sources at "c:/sources_repository/path/plugin_a"
* developing workspace at "c:/workspace"
* testing workspace at "c:/workspace_runtime"
Running the generation, Acceleo asks to AcceleoServicesEclipseUtil.registerService(URI uri, String qualifiedName) to find the class. The provided url is like "c:/sources_repository/path/plugin_a/...emtl" and it does not offers to acceleo any clue about where the bundle is located:
* it is not a platform plugin
* it is not in the workspace (the generator runs in the runtime one !)
* plugin_a is not the plugin symbolic name
Probably it is possible to identify the correct bundle checking the position of all registred bundles against the initial part of uri (note that if there is some kind of eclipse-link, the path may be completely unrelated to the bundle location).
I looked for a solution (different for renaming the plugin folder) that allow me to test and debug the entire application (i.e. inside an eclipse application). The only one I found that everything workins if I call (once) this method before run the generation:
AcceleoServicesEclipseUtil.registerService(Activator.getBundle(), MyJavaService.class.getCanonicalName())
The problem now is that this class is an internal one.
Any suggestion?
There is a way to register the service using only public methods?
thanks in advance
Nicola
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05647 seconds