Create a figure without model representation in an existing GEF editor [message #249235] |
Thu, 11 June 2009 07:45 |
Eclipse User |
|
|
|
Originally posted by: alexia.allanic.atosorigin.com
Hi,
I want to create for a GEF editor without modifying it an action which
can add a figure (for example a rectangle).
I don't want to add my action in the palette but if possible in a menu.
The figure created doesn't have to be persisted in the diagram file.
Is This kind of action is possible ? And how can i realize it ?
Regards
Alexia
|
|
|
|
Re: Create a figure without model representation in an existing GEF editor [message #249285 is a reply to message #249267] |
Mon, 15 June 2009 10:01 |
Eclipse User |
|
|
|
Originally posted by: alexia.allanic.atosorigin.com
Hi,
I have many GEF editors and I want to add a generic action which permits
to add a figure which mustn't be add on the model, the diagram file.
Ben Vitale a écrit :
> You can certainly write an action that will just add a Figure without a
> backing edit part or model. But then you will have to manage the state
> of that figure yourself. Might be easier to use a model, but tweak
> whatever serializes your model to not serialize that object. Perhaps
> you would like to elaborate on the use case a bit?
>
> Regarding the action itself, just read the platform developer guide on
> how to put actions in menus. Then instantiate your action such that it
> knows how to get a handle to the graphical viewer. The DeleteAction that
> the Logic Example uses is one example of how to hook up a GEF type of
> action.
>
> Hope that helps
> Ben
>
> ALLANIC Alexia wrote:
>> Hi,
>>
>> I want to create for a GEF editor without modifying it an action which
>> can add a figure (for example a rectangle).
>>
>> I don't want to add my action in the palette but if possible in a menu.
>> The figure created doesn't have to be persisted in the diagram file.
>>
>> Is This kind of action is possible ? And how can i realize it ?
>> Regards
>>
>> Alexia
|
|
|
Re: Create a figure without model representation in an existing GEF editor [message #249303 is a reply to message #249285] |
Tue, 16 June 2009 09:32 |
Tristan Faure Messages: 460 Registered: July 2009 |
Senior Member |
|
|
HI !
i work in the same team as Alexia
Actually we have a plugin which works with some Gef editors : GMF ...
we want to add a menu which permit to add a rectangle on any diagram
working for our plugin.
We have some possibilites :
1) designing a top level generic plugin which only works with gef
possibilites
2) designing a plugin with specific editor capacities
in both way we don't know how to add dynamically a figure which is not
expected by current editor
if somebody has a solution it could be a pleasure :)
Regards
Tristan FAURE
ALLANIC Alexia a écrit :
> Hi,
>
> I have many GEF editors and I want to add a generic action which
> permits to add a figure which mustn't be add on the model, the diagram
> file.
>
> Ben Vitale a écrit :
>> You can certainly write an action that will just add a Figure without
>> a backing edit part or model. But then you will have to manage the
>> state of that figure yourself. Might be easier to use a model, but
>> tweak whatever serializes your model to not serialize that object.
>> Perhaps you would like to elaborate on the use case a bit?
>>
>> Regarding the action itself, just read the platform developer guide
>> on how to put actions in menus. Then instantiate your action such
>> that it knows how to get a handle to the graphical viewer. The
>> DeleteAction that the Logic Example uses is one example of how to
>> hook up a GEF type of action.
>>
>> Hope that helps
>> Ben
>>
>> ALLANIC Alexia wrote:
>>> Hi,
>>>
>>> I want to create for a GEF editor without modifying it an action
>>> which can add a figure (for example a rectangle).
>>>
>>> I don't want to add my action in the palette but if possible in a menu.
>>> The figure created doesn't have to be persisted in the diagram file.
>>>
>>> Is This kind of action is possible ? And how can i realize it ?
>>> Regards
>>>
>>> Alexia
|
|
|
Powered by
FUDForum. Page generated in 0.03304 seconds