Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Select diagram layout at runtime ?
Select diagram layout at runtime ? [message #65909] Thu, 19 October 2006 21:45 Go to next message
Eclipse UserFriend
Originally posted by: rbbnjmn.yahoo.com

This is a multi-part message in MIME format.

------=_NextPart_000_0006_01C6F38D.45F796B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I want to be able to select the diagram layout from several on a menu.
It seems I need to over-ride the getCommand() menthod on =
ContainerEditPolicy=20
in order to respond differenetly to an arrangeAll request ?

Assuming this is correct, then how to add my subclass of =
ContainerEditPolicy ?

Which of the keys in EditPolicy is used to do this ?
How else might this be done ?
Will the diagram persist the user's last layout choice ?

Thanks

Roy
------=_NextPart_000_0006_01C6F38D.45F796B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff background=3D""><FONT face=3DArial size=3D2>I =
want to be able to=20
select the diagram layout from several on a menu.<BR>It seems I need to=20
over-ride the getCommand() menthod on ContainerEditPolicy <BR>in order =
to=20
respond differenetly to an arrangeAll request ?<BR><BR>Assuming this is =
correct,=20
then how to add my subclass of ContainerEditPolicy ?<BR><BR>Which of the =
keys in=20
EditPolicy is used to do this ?<BR>How else might this be done ?<BR>Will =
the=20
diagram persist the user's last layout choice=20
?<BR><BR>Thanks<BR><BR>Roy</FONT></BODY></HTML>

------=_NextPart_000_0006_01C6F38D.45F796B0--
Re: Select diagram layout at runtime ? [message #65931 is a reply to message #65909] Thu, 19 October 2006 21:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vcciubot.uwaterloo.ca

The policy roles are located in two places EditPolicy - for the gef ones
(including container_role) and EditPolicyRoles for the gmf added ones.

In your container edit part override createDefaultEditPolicies() - call
super first and then call installEditPolicy(role, new YourEditPolicy)

The layout will be persisted.

vlad

On Thu, 19 Oct 2006 14:45:51 -0700, rbbnjmn wrote:

> I want to be able to select the diagram layout from several on a menu.
> It seems I need to over-ride the getCommand() menthod on ContainerEditPolicy
> in order to respond differenetly to an arrangeAll request ?
>
> Assuming this is correct, then how to add my subclass of ContainerEditPolicy ?
>
> Which of the keys in EditPolicy is used to do this ?
> How else might this be done ?
> Will the diagram persist the user's last layout choice ?
>
> Thanks
>
> Roy<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
> <META content="MSHTML 6.00.2900.2802" name=GENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=#ffffff background=""><FONT face=Arial size=2>I want to be able to
> select the diagram layout from several on a menu.<BR>It seems I need to
> over-ride the getCommand() menthod on ContainerEditPolicy <BR>in order to
> respond differenetly to an arrangeAll request ?<BR><BR>Assuming this is correct,
> then how to add my subclass of ContainerEditPolicy ?<BR><BR>Which of the keys in
> EditPolicy is used to do this ?<BR>How else might this be done ?<BR>Will the
> diagram persist the user's last layout choice
> ?<BR><BR>Thanks<BR><BR>Roy</FONT></BODY></HTML>
Re: Select diagram layout at runtime ? [message #65972 is a reply to message #65931] Thu, 19 October 2006 22:29 Go to previous message
Eclipse UserFriend
Originally posted by: rbbnjmn.yahoo.com

Thanks Vlad!

Roy


"Vlad Ciubotariu" <vcciubot@uwaterloo.ca> wrote in message
news:pan.2006.10.19.21.57.22.186558@uwaterloo.ca...
> The policy roles are located in two places EditPolicy - for the gef ones
> (including container_role) and EditPolicyRoles for the gmf added ones.
>
> In your container edit part override createDefaultEditPolicies() - call
> super first and then call installEditPolicy(role, new YourEditPolicy)
>
> The layout will be persisted.
>
> vlad
>
> On Thu, 19 Oct 2006 14:45:51 -0700, rbbnjmn wrote:
>
>> I want to be able to select the diagram layout from several on a menu.
>> It seems I need to over-ride the getCommand() menthod on
>> ContainerEditPolicy
>> in order to respond differenetly to an arrangeAll request ?
>>
>> Assuming this is correct, then how to add my subclass of
>> ContainerEditPolicy ?
>>
>> Which of the keys in EditPolicy is used to do this ?
>> How else might this be done ?
>> Will the diagram persist the user's last layout choice ?
>>
>> Thanks
>>
>> Roy<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>> <HTML><HEAD>
>> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
>> <META content="MSHTML 6.00.2900.2802" name=GENERATOR>
>> <STYLE></STYLE>
>> </HEAD>
>> <BODY bgColor=#ffffff background=""><FONT face=Arial size=2>I want to be
>> able to
>> select the diagram layout from several on a menu.<BR>It seems I need to
>> over-ride the getCommand() menthod on ContainerEditPolicy <BR>in order to
>> respond differenetly to an arrangeAll request ?<BR><BR>Assuming this is
>> correct,
>> then how to add my subclass of ContainerEditPolicy ?<BR><BR>Which of the
>> keys in
>> EditPolicy is used to do this ?<BR>How else might this be done ?<BR>Will
>> the
>> diagram persist the user's last layout choice
>> ?<BR><BR>Thanks<BR><BR>Roy</FONT></BODY></HTML>
>
Previous Topic:Does GMF touch the .ecore file?
Next Topic:Missing properties in the Properties View
Goto Forum:
  


Current Time: Sat Dec 21 14:31:06 GMT 2024

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

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

Back to the top