[oaw] Problem invoking JavaMetamodel from plugin [message #560572] |
Wed, 13 December 2006 08:48 |
Eclipse User |
|
|
|
Originally posted by: tobiasbuhr.gmx.de
Hi all,
I try to invoke a workflow from a eclipse plugin via
WorkflowRunner.run(). All types, that are some kind of
<metaModel id="mm_my"
class="org.openarchitectureware.type.emf.EmfMetaModel">
<metaModelPackage value="my.MyPackage"/>
</metaModel>
are recognized correctly, but self created Java-Classes, that I try to
access with the JavaMetaModel
<metaModel id="mm_java"
class="org.openarchitectureware.type.impl.java.JavaMetaModel "/>
are not recognized:
---
2212 [main] ERROR org.openarchitectureware.workflow.WorkflowRunner -
Couldn't resolve type for 'mypackage::MyObject'. Did you forget to
configure the corresponding metamodel?:in my.ext on line 24 'Boolean
doSomething(mypackage::MyObject o)'
org.openarchitectureware.expression.EvaluationException: Couldn't
resolve type for 'mypackage::MyObject'. Did you forget to configure the
corresponding metamodel?:in my.ext on line 24 'Boolean
doSomething(mypackage::MyObject o)' at
org.openarchitectureware.xtend.ast.Extension.init(Extension. java:145)
---
If I start the workflow in the Eclipse-Platform via "Run ->
WorkflowRunner" everything goes fine.
Examining the executed WorkflowRunner.main() method, I took a look at
the resource loaders. I played around a little with them, but I did not
get it right (main method uses ResourceLoaderDefaultImpl but if I do so,
oaw stuff won't be found). Currently (with all non JavaMetamodels beeing
recognized correctly), I have to use the follwing line for having all
stuff (oaw, metamodels) loaded correctly (as it was posted often here):
ResourceLoaderFactory.setCurrentThreadResourceLoader(new
ResourceLoaderImpl(getClass().getClassLoader()));
---
Does anybody know something (loading own resources correctly, how to use
JavaMetaModels from own code)???
Thanks, Tobias
|
|
|
Powered by
FUDForum. Page generated in 0.03034 seconds