|
|
Re: What is the API equivalent of emf.Ecore2Java [message #640126 is a reply to message #640026] |
Fri, 19 November 2010 09:13 |
Lara Ziosi Messages: 3 Registered: July 2009 |
Junior Member |
|
|
Hi Ed,
I've been spending time over the API this week without getting very far. I understand that it is open source and self documenting however it is complex for a new user, hence this question.
I have seen that the Task uses the class:
org.eclipse.emf.importer.ecore.taskdefs.EcoreGeneratorTask
contained in the ANT Task separate jar file. This extends:
org.eclipse.emf.importer.ecore.EcoreImporterApplication
which in turn extends:
org.eclipse.emf.importer.ModelImporterApplication
from the plugin org.eclipse.emf.importer.
If I do not want to use the ANT infrastructure at all, which should be just unnecessary overhead in the case of a plugin, should I use ModelImporterApplication, and if so, what would be the required call sequence?
This has a number of methods that I do not clearly understand, such as adjustGenModel, handleEPackage etc.
Thank you for any hints that could put me on the right path.
Thank you, Lara
|
|
|
Re: What is the API equivalent of emf.Ecore2Java [message #640195 is a reply to message #640126] |
Fri, 19 November 2010 14:09 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Lara,
Lara Ziosi wrote:
> Hi Ed,
>
> I've been spending time over the API this week without getting very
> far. I understand that it is open source and self documenting however
> it is complex for a new user, hence this question.
>
> I have seen that the Task uses the class:
>
> org.eclipse.emf.importer.ecore.taskdefs.EcoreGeneratorTask
>
> contained in the ANT Task separate jar file. This extends:
>
> org.eclipse.emf.importer.ecore.EcoreImporterApplication
Yes, this is the reusable piece that's also used within the IDE for the
import wizard.
>
> which in turn extends:
>
> org.eclipse.emf.importer.ModelImporterApplication
>
> from the plugin org.eclipse.emf.importer.
>
> If I do not want to use the ANT infrastructure at all, which should be
> just unnecessary overhead in the case of a plugin, should I use
> ModelImporterApplication, and if so, what would be the required call
> sequence?
Yes you should. I'd suggest doing a bit more dynamic analysis. I.e.,
set breakpoint and watch how things are exercised from the import wizard
in the IDE.
>
> This has a number of methods that I do not clearly understand, such as
> adjustGenModel, handleEPackage etc.
It will be better to do dynamic analysis (watch it work in the debugger)
than static analysis (stare at the code and hope it becomes clear how
the methods get invoked in a running application).
>
> Thank you for any hints that could put me on the right path.
The debugger is your best friend.
>
> Thank you, Lara
>
>
>
>
>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03787 seconds