injecting layout information to an ecore model to generate a diagram [message #51911] |
Wed, 20 September 2006 08:13  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04210 seconds