Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » remember pallete selection ?
remember pallete selection ? [message #199424] Tue, 29 July 2008 19:13 Go to next message
Shilpa Toraskar is currently offline Shilpa ToraskarFriend
Messages: 65
Registered: July 2009
Member
Is it possible to remember pallette selection ? If yes, how do we do it ?


Thanks in advance
Re: remember pallete selection ? [message #199481 is a reply to message #199424] Wed, 30 July 2008 04:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lifesting.gmail.com

Jorge wrote:
> Is it possible to remember pallette selection ? If yes, how do we do it ?
>
>
> Thanks in advance
>
>
Hi, Jorge, try the below test.

1 Open class XXXPaletteFactory in the generated diagram editor plug-in.
XXX is equivalent to the EMF package you used in most time.

2 In the method createYYYTool, YYY is the name of the tool you want to
remember, which is defined in XXX.gmftool, set annotation "generated" to
"generated NOT" and add a statement above the last return, e.g:

/**
* @generated NOT
*/
private ToolEntry createDistrict1CreationTool() {
......
......
......
//Remember tool selection
entry.setToolProperty(AbstractTool.PROPERTY_UNLOAD_WHEN_FINI SHED,
Boolean.TRUE);

return entry;
}
Re: remember pallete selection ? [message #199487 is a reply to message #199481] Wed, 30 July 2008 04:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lifesting.gmail.com

David BY Chan wrote:
> Jorge wrote:
>> Is it possible to remember pallette selection ? If yes, how do we do it ?
>>
>>
>> Thanks in advance
>>
> Hi, Jorge, try the below test.
>
> 1 Open class XXXPaletteFactory in the generated diagram editor plug-in.
> XXX is equivalent to the EMF package you used in most time.
>
> 2 In the method createYYYTool, YYY is the name of the tool you want to
> remember, which is defined in XXX.gmftool, set annotation "generated" to
> "generated NOT" and add a statement above the last return, e.g:
>
> /**
> * @generated NOT
> */
> private ToolEntry createDistrict1CreationTool() {
> .....
> .....
> .....
> //Remember tool selection
> entry.setToolProperty(AbstractTool.PROPERTY_UNLOAD_WHEN_FINI SHED,
> Boolean.TRUE);
>
> return entry;
> }
Sorry, I set the wrong value ,try

entry.setToolProperty(AbstractTool.PROPERTY_UNLOAD_WHEN_FINI SHED,
Boolean.FALSE);
Re: remember pallete selection ? [message #199704 is a reply to message #199487] Thu, 31 July 2008 22:05 Go to previous message
Shilpa Toraskar is currently offline Shilpa ToraskarFriend
Messages: 65
Registered: July 2009
Member
Thanks David. It works !

"David BY Chan" <lifesting@gmail.com> wrote in message
news:g6oqk1$th$2@build.eclipse.org...
> David BY Chan wrote:
>> Jorge wrote:
>>> Is it possible to remember pallette selection ? If yes, how do we do it
>>> ?
>>>
>>>
>>> Thanks in advance
>>>
>> Hi, Jorge, try the below test.
>>
>> 1 Open class XXXPaletteFactory in the generated diagram editor plug-in.
>> XXX is equivalent to the EMF package you used in most time.
>>
>> 2 In the method createYYYTool, YYY is the name of the tool you want to
>> remember, which is defined in XXX.gmftool, set annotation "generated" to
>> "generated NOT" and add a statement above the last return, e.g:
>>
>> /**
>> * @generated NOT
>> */
>> private ToolEntry createDistrict1CreationTool() {
>> .....
>> .....
>> .....
>> //Remember tool selection
>> entry.setToolProperty(AbstractTool.PROPERTY_UNLOAD_WHEN_FINI SHED,
>> Boolean.TRUE);
>>
>> return entry;
>> }
> Sorry, I set the wrong value ,try
>
> entry.setToolProperty(AbstractTool.PROPERTY_UNLOAD_WHEN_FINI SHED,
> Boolean.FALSE);
Previous Topic:How to get outer data in model.
Next Topic:GMF Diagram-EMF Model Sync problem
Goto Forum:
  


Current Time: Sat Jun 06 11:50:27 GMT 2020

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

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

Back to the top