|
|
|
|
Re: Displaying a GMF-Graph in an Eclipse Viewpart [message #192158 is a reply to message #186911] |
Wed, 11 June 2008 15:44 |
Eclipse User |
|
|
|
Originally posted by: javier.roca.planningforce.com
Hello There,
Did somebody try to use a GMF-Graph in a ViewPart with the edition
enabled (e.g. able to delete the objects)? Is there a way to
"short-circuit" this? Moreover, Can we have a GMF Editor in a composite
without using a WorkbenchPage?
Regards
Tobias Jähnel wrote:
> Hi Alex,
>
> thank you for this information.
> I found this option and tested it. It seems to only effect the editor
> default for new diagrams.
>
> There is a measurementUnit parameter in each _diagram file. The editor
> takes care of it an interpretes the coordinates according to its value
> (either Pixel or HiMetric).
>
> From the Diagram object, I can get this parameter using the method
> getMeasurementUnit().
> To make my view also interpret the coordinates according to this value,
> I created the RootEditPart as follows:
>
> new DiagramRootEditPart(diag.getMeasurementUnit());
>
> I wonder why this is not done automatically.
>
> Thanks again for pointing into the right direction. :)
>
> Toby
>
> Alex Shatalin schrieb:
>> Hello Tobias,
>>
>>> So I added the line:
>>> viewer.setRootEditPart(new
>>> DiagramRootEditPart(MeasurementUnit.PIXEL_LITERAL));
>> You can modiry "Units" property of GenDiagram element in your .gmfgen
>> model and set "Pixel" value there to get corresponding code generated.
>>
>> -----------------
>> Alex Shatalin
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.03186 seconds