[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] Re: add a menu entry
|
Delete action is created in GraphicalEditor#createActions by default.
If your editpart creates a command when receiving a REQ_DELETE request, the
action will be enabled if ur delete command can execute. It is quite
convenient to use, isn't it?
Have a look at DeleteAction source will help u to understand. In your own
action you can get current selection in the editor(if it is a selection
action) and then determine which command to use for the selected
editpart(s).
Best,
Jun
"josé" <J_ML@xxxxxxxxxx> wrote in message
news:361e57a6bea3fa7c7caa531683653197$1@xxxxxxxxxxxxxxxxxx
> ok, so far i understood a few things:
>
> If i need to add a new menu entry (like changing the color of some
> figure), i have to implement the Action and add it like redo, undo and
> delete.
>
> But the question remains, how do i "fuse" my implemented action (or the
> delete action) represented with the menu entry with the command i want to
> implement?
>
> Thanks! =)
>