Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Rename label of delete Action
Rename label of delete Action [message #213833] Tue, 11 April 2006 13:56 Go to next message
Patrick Tessier is currently offline Patrick TessierFriend
Messages: 323
Registered: July 2009
Location: Paris Saclay, France
Senior Member
Hi,

I try to rename delete action but I don't succeed:
I write this:


IAction DeleteFromDiagram= getAction(ActionFactory.DELETE.getId());
DeleteFromDiagram.setText("Delete from diagram");
DeleteFromDiagram.setDescription("Delete from diagram");
toolBarManager.add(DeleteFromDiagram);

But the label of my delete action when I click upon an node is alway
"delete".
Re: Rename label of delete Action [message #213950 is a reply to message #213833] Wed, 12 April 2006 05:58 Go to previous message
Andreas Schosser is currently offline Andreas SchosserFriend
Messages: 30
Registered: July 2009
Member
Patrick,

you always have to distinguish creating / assigning an action from
registering an action with the ActionRegistry.
You have to ensure, that the action you register with the editor has to be
the same as the one you defined a certain label for.
Furthermore, you should not try to change the COMMON Eclipse (GEF) actions
from the GEF ActionFactory at all.
If you want to achieve a specific 'Delete from Diagram' behaviour, you
should probably implement another delete action.

Regards,

Andreas

--
A. Schosser
Mind8 GmbH


Patrick wrote:

> Hi,
>
> I try to rename delete action but I don't succeed:
> I write this:
>
>
> IAction DeleteFromDiagram= getAction(ActionFactory.DELETE.getId());
> DeleteFromDiagram.setText("Delete from diagram");
> DeleteFromDiagram.setDescription("Delete from diagram");
> toolBarManager.add(DeleteFromDiagram);
>
> But the label of my delete action when I click upon an node is alway
> "delete".
Previous Topic:intersecting elements
Next Topic:move Anchor on node
Goto Forum:
  


Current Time: Sun Nov 27 16:49:33 GMT 2022

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

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

Back to the top