Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » injecting layout information to an ecore model to generate a diagram
injecting layout information to an ecore model to generate a diagram [message #51911] Wed, 20 September 2006 08:13 Go to next message
Eclipse UserFriend
Hi,

I want to reuse several elements in an svg document to create an ecore
model. This model however needs to be postprocessed to insert more
metainformation, that needs to be kept seperate from the actual svg
description, because I do not want to mix the visual representation of
my model from its the logical representation. I could easily transform
the svg file into an ecore model and open this with the ecore editor,
but then i would lose the svg layout information, and re-layout the
diagram by hand...

Is it possible to also generate an ecore_diagram formatted file to keep
the layout information, given from x,y coordinates of the elements
contained in the svg description?

Felix
Re: injecting layout information to an ecore model to generate a diagram [message #52323 is a reply to message #51911] Wed, 20 September 2006 13:02 Go to previous message
Eclipse UserFriend
Guess, you could do smth like:

Node view = detectDiagramElementForSVGElement(...)
Location location = (Location) view.getLayoutConstraint();
IMapMode mapMode = MeasurementUnitHelper.getMapMode(...);
location.setX(mapMode.DPtoLP(xCoordinateFromSVG));
location.setY(mapMode.DPtoLP(yCoordinateFromSVG));

Artem

"Felix Dorner" <felix_do@web.de> wrote in message
news:eerbaa$npm$1@utils.eclipse.org...
> Hi,
>
> I want to reuse several elements in an svg document to create an ecore
> model. This model however needs to be postprocessed to insert more
> metainformation, that needs to be kept seperate from the actual svg
> description, because I do not want to mix the visual representation of my
> model from its the logical representation. I could easily transform the
> svg file into an ecore model and open this with the ecore editor, but then
> i would lose the svg layout information, and re-layout the diagram by
> hand...
>
> Is it possible to also generate an ecore_diagram formatted file to keep
> the layout information, given from x,y coordinates of the elements
> contained in the svg description?
>
> Felix
Previous Topic:Possible bug: Imposible to add multi-references to a Node with GMF editor while the tree editor work
Next Topic:How to auto generate the value for an attribute
Goto Forum:
  


Current Time: Thu May 08 18:59:14 EDT 2025

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

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

Back to the top