Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » API not usable without editor in running eclipse UI?!
API not usable without editor in running eclipse UI?! [message #779746] Mon, 16 January 2012 13:11 Go to next message
Eclipse UserFriend
We use several textual/graphical editors based on different DSL's as
modelling environment in our company. One of the things we do with all
that models and diagrams is to generate a documentation (as odt, doxc,
pdf,...) for several target groups.
In context of a diagram we export typically the documenation for the
visible model elements (for pictogram elements in wording of Graphiti)
and the diagram image self. We do that for GMF based diagrams and (in a
absolute dirty way) now for Graphiti based diagrams. While implementing
that functionality i have seen some problematical things in the
realization of Graphiti. These doesn't allow me a Graphiti support in
our production environment. Let me explain:

- I have not found any way to load a graphiti related resource file
(including the diagram model(s) and mostly also the semantic model) in a
generic way. I can detect that a file is Graphiti related only by
finding the associated 'default editor' (the editor must be the graphiti
editor). To do that i need a Eclipse running in UI mode with installed
editors. Without i can't determine a proper resource loading behaviour
for files containing graphiti related stuff.

- Next: To load a identified file i have to use a 'DiagramEditorInput',
there seems to be no other way to load
org.eclipse.graphiti.mm.pictograms.Diagram instances, because the editor
input does handle all the resource loading aspects (editing domains
etc.). I hope that is changed in Graphiti 0.9.0 (???), but currently i
have strong dependencies to graphiti.ui to load any graphiti based resource.

I would be very happy if graphiti provides a API to load diagram
resources without UI depdendencies.

- Exporting a diagram image by API is currently the dirtiest part. The
complete functionality is hidden in the internal 'UiService' (and
serveral more classes). A image of a diagram can only be rendered in a
running editor... i have really to open a new editor tab in a Eclipse in
UI mode to export the image. The editor must be initialized with all
context menus etc. to be able to render the diagram elements. That's
strange :-(
GMF has also (bad) dependencies to UI to export a diagram image, but not
in that strong way.

Please, please make the API to export a image public (outside of editor
or any GEF graphical viewer). And if all that API functions would be
callable in headless Eclipse without running Workbench you guys will be
my super stars.

Regards
Ralf
Re: API not usable without editor in running eclipse UI?! [message #780225 is a reply to message #779746] Tue, 17 January 2012 12:00 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Ralf,

why don't you use plain EMF to load the Graphiti model and its Diagram? I'm
not sure what Graphiti would need to offer in a generic way if you don't
want to use an editor.

Regarding the diagram export functionality: feel free to open an
enhancement Bugzilla for this. So far there has been no request for such a
functionality.

Michael
Previous Topic:Resolving references to external Files in Businessmodels
Next Topic:How to change model in properties sheet without having an update command on the undo-stack?
Goto Forum:
  


Current Time: Fri Apr 19 20:18:35 GMT 2024

Powered by FUDForum. Page generated in 0.02742 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top