|
|
Re: Papyrus class diagram to ecore format [message #673198 is a reply to message #673189] |
Sun, 22 May 2011 20:07 |
Jean-Philippe Brabant Messages: 17 Registered: May 2011 |
Junior Member |
|
|
Yes I know no one is going to do the work for me and this is not what I want anyway. After looking at what you told me here is what I got so far.
In org.eclipse.uml2.uml.util.UMLUtil in the subclass UML2EcoreConverter I found the public method "convert" which seem interesting but I don't yet understand it arguments.
I looked at org.eclipse.uml2.uml.ecore.exporter but I found stuff more interesting in the importer class. For exemple, in UMLImporterApplication.java I found a usage String (look at the getUsage() methode here http://pastebin.com/eGrCaBm0). So I guess I probably can use those method as a command line which is a great thing. I still need to figure out how. I might fire the debugger sometime tomorrow but I still have some difficulties to understand the whole picture.
In the UMLImporter.java I found a protected method doComputeEPackages() that create instance of UML2EcoreConverter so I started by looking at that to understand how the converter work.
So overall, what do you think, am I going in the right direction ?
[Updated on: Sun, 22 May 2011 20:09] Report message to a moderator
|
|
|
Re: Papyrus class diagram to ecore format [message #673252 is a reply to message #673198] |
Mon, 23 May 2011 02:45 |
Ed Merks Messages: 33113 Registered: July 2009 |
Senior Member |
|
|
Yes, you're headed in the right direction. It's very hard to understand
the whole picture just looking at static code. When you run it in the
debugger, you can see exactly who calls who and with what arguments.
I.e., it's much easier to understand the dynamic big picture than to try
to deduce it from static analysis of the source code. I'm not sure, but
most of the other converters have associated Ant tasks, so you might
want to just try to reuse those rather than trying to write new command
line interface...
forums-noreply@eclipse.org wrote:
> Yes I know no one is going to do the work for me and this is not what
> I want anyway. After looking at what you told me here is what I got so
> far.
>
> In org.eclipse.uml2.uml.util.UMLUtil in the subclass
> UML2EcoreConverter I found the public method "convert" which seem
> interesting but I don't yet understand it arguments.
> I looked at org.eclipse.uml2.uml.ecore.exporter but I found stuff more
> interesting in the importer class. For exemple, in
> UMLImporterApplication.java I found a usage String (look at the
> getUsage() methode here http://pastebin.com/eGrCaBm0). So I guess I
> probably can use those method as a command line which is a great
> thing. I still need to figure out how. I might fire the debugger
> sometime tomorrow but I still have some difficulties to understand the
> whole picture.
> In the UMLImporter.java I found a protected method
> doComputeEPackages() that create instance of UML2EcoreConverter so I
> started by looking at that.
> So overall, what do you think, am I going in the right direction ?
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.05249 seconds