|API not usable without editor in running eclipse UI?! [message #779746]
||Mon, 16 January 2012 13:11
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
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.
Powered by FUDForum
. Page generated in 0.01578 seconds