Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Generating bpmn diagram from xmi file(How to programmatically generate bpmn diagram from xmi file?)
Generating bpmn diagram from xmi file [message #959907] Fri, 26 October 2012 23:18 Go to next message
Tri Kurniawan is currently offline Tri Kurniawan
Messages: 10
Registered: October 2010
Junior Member
Hi,

I'm just wondering if there is a method in generating .bpmn_diagram or .bpmn2 from the corresponding xmi files (i.e. .bpmn or .bpmn20.xml). Obviously, it can be generated by using a menu in Eclipse IDE, but for some reasons I need to generate them from the codes. Does anyone know that?

Thanks,
Tri
Re: Generating bpmn diagram from xmi file [message #960019 is a reply to message #959907] Sat, 27 October 2012 01:31 Go to previous messageGo to next message
Hallvard Traetteberg is currently offline Hallvard Traetteberg
Messages: 594
Registered: July 2009
Location: Trondheim, Norway
Senior Member
Tri,

Use the source, Luke. If there is a menu action, I'm sure the code for
that action is available. Try plug-in spy, which helps you locate the
plugin that contributed an editor, view or... a menu item:
http://scratsh.wordpress.com/2009/06/09/eclipse-3-5-plug-in-spy-and-menus/
Once you have the (name of the) plugin, you can look in that plugin's
plugin.xml to find the reference to the class that implements the
action. From there you can find the code to reuse.

Hallvard

On 26.10.12 20.18, Tri Kurniawan wrote:
> Hi,
>
> I'm just wondering if there is a method in generating .bpmn_diagram or
> .bpmn2 from the corresponding xmi files (i.e. .bpmn or .bpmn20.xml).
> Obviously, it can be generated by using a menu in Eclipse IDE, but for
> some reasons I need to generate them from the codes. Does anyone know that?
>
> Thanks,
> Tri
Re: Generating bpmn diagram from xmi file [message #961042 is a reply to message #960019] Sat, 27 October 2012 21:28 Go to previous messageGo to next message
Tri Kurniawan is currently offline Tri Kurniawan
Messages: 10
Registered: October 2010
Junior Member
Hi Hallvard,

Thanks for your pointer. I just had a try to spy the action. I'm using Galileo. When I was inspecting the plugin extension details of activating 'Initilize bpmn_diagram diagram file' menu, I saw org.eclipse.stp.bpmn.diagram.part.BpmnInitDiagramFileAction as the action class. I have no idea when seeing BpmnInitDiagramFileAction API doc with respect to the engaged method to handle such file generation. Sorry, I'm new in PDE. If you would make your pointer much clearer, it would be highly appreciated.

Thanks,
Tri
Re: Generating bpmn diagram from xmi file [message #961251 is a reply to message #961042] Sun, 28 October 2012 01:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25938
Registered: July 2009
Senior Member
Tri,

Some more tricks to learn... If you use Window->Show
View->Other...->Plug-in Development->Plug-ins, select all the plugins,
and invoke "Add to Java Search" you'll be able to use Ctrl-Shift-T to
open classes in all those plugins. So you can use that to open this
particular action. Looking at the code is more likely to provide the
information than hoping it's somewhere in the Javadoc. If it's not
clear looking at that method, set a breakpoint and walk through the
logic to see what happens when you actually invoke this action. That
should visit all the code you'll need to do the same thing yourself. If
you're completely stuck, maybe someone in the eclipse.bpmn2-modeler
forum will help, but they're more likely to help if it's clear that
you've done a bunch of homework yourself such that you're asking very
specific questions.



On 28/10/2012 2:28 AM, Tri Kurniawan wrote:
> Hi Hallvard,
>
> Thanks for your pointer. I just had a try to spy the action. I'm using
> Galileo. When I was inspecting the plugin extension details of
> activating 'Initilize bpmn_diagram diagram file' menu, I saw
> org.eclipse.stp.bpmn.diagram.part.BpmnInitDiagramFileAction as the
> action class. I have no idea when seeing BpmnInitDiagramFileAction API
> doc with respect to the engaged method to handle such file generation.
> Sorry, I'm new in PDE. If you would make your pointer much clearer, it
> would be highly appreciated.
>
> Thanks,
> Tri
Re: Generating bpmn diagram from xmi file [message #961256 is a reply to message #961042] Sun, 28 October 2012 01:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25938
Registered: July 2009
Senior Member
Tri,

Some more tricks to learn... If you use Window->Show
View->Other...->Plug-in Development->Plug-ins, select all the plugins,
and invoke "Add to Java Search" you'll be able to use Ctrl-Shift-T to
open classes in all those plugins. So you can use that to open this
particular action. Looking at the code is more likely to provide the
information than hoping it's somewhere in the Javadoc. If it's not
clear looking at that method, set a breakpoint and walk through the
logic to see what happens when you actually invoke this action. That
should visit all the code you'll need to do the same thing yourself. If
you're completely stuck, maybe someone in the eclipse.bpmn2-modeler
forum will help, but they're more likely to help if it's clear that
you've done a bunch of homework yourself such that you're asking very
specific questions.



On 28/10/2012 2:28 AM, Tri Kurniawan wrote:
> Hi Hallvard,
>
> Thanks for your pointer. I just had a try to spy the action. I'm using
> Galileo. When I was inspecting the plugin extension details of
> activating 'Initilize bpmn_diagram diagram file' menu, I saw
> org.eclipse.stp.bpmn.diagram.part.BpmnInitDiagramFileAction as the
> action class. I have no idea when seeing BpmnInitDiagramFileAction API
> doc with respect to the engaged method to handle such file generation.
> Sorry, I'm new in PDE. If you would make your pointer much clearer, it
> would be highly appreciated.
>
> Thanks,
> Tri
Re: Generating bpmn diagram from xmi file [message #961262 is a reply to message #961042] Sun, 28 October 2012 01:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25938
Registered: July 2009
Senior Member
Tri,

Some more tricks to learn... If you use Window->Show
View->Other...->Plug-in Development->Plug-ins, select all the plugins,
and invoke "Add to Java Search" you'll be able to use Ctrl-Shift-T to
open classes in all those plugins. So you can use that to open this
particular action. Looking at the code is more likely to provide the
information than hoping it's somewhere in the Javadoc. If it's not
clear looking at that method, set a breakpoint and walk through the
logic to see what happens when you actually invoke this action. That
should visit all the code you'll need to do the same thing yourself. If
you're completely stuck, maybe someone in the eclipse.bpmn2-modeler
forum will help, but they're more likely to help if it's clear that
you've done a bunch of homework yourself such that you're asking very
specific questions.



On 28/10/2012 2:28 AM, Tri Kurniawan wrote:
> Hi Hallvard,
>
> Thanks for your pointer. I just had a try to spy the action. I'm using
> Galileo. When I was inspecting the plugin extension details of
> activating 'Initilize bpmn_diagram diagram file' menu, I saw
> org.eclipse.stp.bpmn.diagram.part.BpmnInitDiagramFileAction as the
> action class. I have no idea when seeing BpmnInitDiagramFileAction API
> doc with respect to the engaged method to handle such file generation.
> Sorry, I'm new in PDE. If you would make your pointer much clearer, it
> would be highly appreciated.
>
> Thanks,
> Tri
Re: Generating bpmn diagram from xmi file [message #961269 is a reply to message #961042] Sun, 28 October 2012 01:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25938
Registered: July 2009
Senior Member
Tri,

Some more tricks to learn... If you use Window->Show
View->Other...->Plug-in Development->Plug-ins, select all the plugins,
and invoke "Add to Java Search" you'll be able to use Ctrl-Shift-T to
open classes in all those plugins. So you can use that to open this
particular action. Looking at the code is more likely to provide the
information than hoping it's somewhere in the Javadoc. If it's not
clear looking at that method, set a breakpoint and walk through the
logic to see what happens when you actually invoke this action. That
should visit all the code you'll need to do the same thing yourself. If
you're completely stuck, maybe someone in the eclipse.bpmn2-modeler
forum will help, but they're more likely to help if it's clear that
you've done a bunch of homework yourself such that you're asking very
specific questions.



On 28/10/2012 2:28 AM, Tri Kurniawan wrote:
> Hi Hallvard,
>
> Thanks for your pointer. I just had a try to spy the action. I'm using
> Galileo. When I was inspecting the plugin extension details of
> activating 'Initilize bpmn_diagram diagram file' menu, I saw
> org.eclipse.stp.bpmn.diagram.part.BpmnInitDiagramFileAction as the
> action class. I have no idea when seeing BpmnInitDiagramFileAction API
> doc with respect to the engaged method to handle such file generation.
> Sorry, I'm new in PDE. If you would make your pointer much clearer, it
> would be highly appreciated.
>
> Thanks,
> Tri
Re: Generating bpmn diagram from xmi file [message #961277 is a reply to message #961042] Sun, 28 October 2012 01:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25938
Registered: July 2009
Senior Member
Tri,

Some more tricks to learn... If you use Window->Show
View->Other...->Plug-in Development->Plug-ins, select all the plugins,
and invoke "Add to Java Search" you'll be able to use Ctrl-Shift-T to
open classes in all those plugins. So you can use that to open this
particular action. Looking at the code is more likely to provide the
information than hoping it's somewhere in the Javadoc. If it's not
clear looking at that method, set a breakpoint and walk through the
logic to see what happens when you actually invoke this action. That
should visit all the code you'll need to do the same thing yourself. If
you're completely stuck, maybe someone in the eclipse.bpmn2-modeler
forum will help, but they're more likely to help if it's clear that
you've done a bunch of homework yourself such that you're asking very
specific questions.



On 28/10/2012 2:28 AM, Tri Kurniawan wrote:
> Hi Hallvard,
>
> Thanks for your pointer. I just had a try to spy the action. I'm using
> Galileo. When I was inspecting the plugin extension details of
> activating 'Initilize bpmn_diagram diagram file' menu, I saw
> org.eclipse.stp.bpmn.diagram.part.BpmnInitDiagramFileAction as the
> action class. I have no idea when seeing BpmnInitDiagramFileAction API
> doc with respect to the engaged method to handle such file generation.
> Sorry, I'm new in PDE. If you would make your pointer much clearer, it
> would be highly appreciated.
>
> Thanks,
> Tri
Re: Generating bpmn diagram from xmi file [message #961961 is a reply to message #961277] Sun, 28 October 2012 15:03 Go to previous message
Tri Kurniawan is currently offline Tri Kurniawan
Messages: 10
Registered: October 2010
Junior Member
Hi Ed,

That's interesting and helpful trick. I'll have a try.

Thanks,
Tri
Previous Topic:serialize non-containment reference
Next Topic:[CDO] PackageNotFoundException when committing a transaction
Goto Forum:
  


Current Time: Tue Jul 29 06:44:42 EDT 2014

Powered by FUDForum. Page generated in 0.02981 seconds