How to manually register blackbox units? [message #904464] |
Tue, 28 August 2012 13:19 |
Eclipse User |
|
|
|
Hello,
I want to use java blackbox units. However, I'm using QVTo not within
Eclipse, but withing an EJB Java Application. So I can't use the
org.eclipse.m2m.qvt.oml.javaBlackboxUnits extension point.
I found the BlackboxRegistry class, but I saw this very discouraging
piece of code:
private BlackboxRegistry() {
try {
if(EMFPlugin.IS_ECLIPSE_RUNNING) {
fProviders = Eclipse.readProviders();
} else {
fProviders = Collections.emptyList();
}
} catch (RuntimeException e) {
fProviders = Collections.emptyList();
QvtPlugin.error(e);
}
}
Usages of BlackboxRegistry.INSTANCE also seem not to allow me to
intercept this in any way.
Hopefully I have missed something important, any hints greatly appreciated!
Marius
|
|
|
|
Re: How to manually register blackbox units? [message #904816 is a reply to message #904611] |
Wed, 29 August 2012 07:49 |
Eclipse User |
|
|
|
On 28.08.2012 22:19, Ed Willink wrote:
> The EMF extension points use extensions as just one way of populating
> a registry. Unfortunately the BlackboxRegistry does not follow this
> idiom. If you care to submit a patch emulating EMF registries, it
> should solve your problems and be available for others.
I needed Blackboxes just to tell QVT how to create a few custom types. I
was able to get rid of those types so I now only use plain Ecore types,
and my need for Blackboxes has gone. Should I need them again in the
future, I will attempt to fix this. Glancing over the EP processing code
I noticed that a great many internal data types are used there. To
properly allow manual registering of a (Java)BlackboxProvider, some
refactoring will be required I guess.
> Please submit a Bugzilla anyway.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=388293
Regards
Marius
|
|
|
|
|
Re: How to manually register blackbox units? [message #945689 is a reply to message #922973] |
Mon, 15 October 2012 14:36 |
Eclipse User |
|
|
|
On 25.09.2012 15:55, thomas legrand wrote:
> Hi,
>
> I developed that patch by modifying the JavaBlackboxRegistry and
> JavaBlackboxProvider classes in org.eclipse.m2m.qvt.oml. The blackbox
> libraries are now searched in the whole classpath.
>
> This patch works and it's actually deployed on our online modeler at
> www.genmymodel.com .
>
> Would you be interested by this patch ? Where should I submit it ?
>
> Tom
Hello Thomas,
sorry for the late response - I would indeed be interested in this
patch. Can you append it to this ticked as a partial solution:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=388293
Thanks
Marius
|
|
|
Powered by
FUDForum. Page generated in 0.04236 seconds