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: 341
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:How to make my Actions are Editor Associated
Next Topic:Howto change Points of PolylineConnection right
Goto Forum:
  


Current Time: Tue Sep 24 13:29:18 GMT 2024

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

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

Back to the top