Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Please help(Its really urgent)....UNDO FEATURE FOR EDITOR
Please help(Its really urgent)....UNDO FEATURE FOR EDITOR [message #465490] Fri, 30 March 2007 07:00 Go to next message
Eclipse UserFriend
Originally posted by: tapamayghosh.gmail.com

I'm in the novice state of RCP Application.Please anyone help me to solve following problem.It would be really great if anyone can help me.
Thanks.

PROBLEM :

1) I Have created an editor by extending EditorPart.

2) Now I want to implement undo action exactly similar to the Eclipse.

3) In ApplicationActionBarAdvisor,

I have I have created an action by writing following codes,

// Inside makeActions() method.

IWorkbechAction undoAction=ActionFactory.UNDO.create(window) ;

register(undoAction);


// in fillcoolbar() method I have added this action.

toolBar.add(undoAction);


Above written code is providing an icon in the toolbar but this is always disabled.

But same steps did work for implementing "Save Action"

I know there something different which I dont know. because "Undo" is gonna be a retargetable action. will anyone help me urgently to solv this problem.I'm really in a critical situation.

Thanks in Advance
Re: Please help(Its really urgent)....UNDO FEATURE FOR EDITOR [message #465505 is a reply to message #465490] Fri, 30 March 2007 14:16 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Tapamay Ghosh wrote:

>I'm in the novice state of RCP Application.Please anyone help me to solve following problem.It would be really great if anyone can help me.
> Thanks.
>
>PROBLEM :
>
> 1) I Have created an editor by extending EditorPart.
>
> 2) Now I want to implement undo action exactly similar to the Eclipse.
>
> 3) In ApplicationActionBarAdvisor,
>
> I have I have created an action by writing following codes,
>
>// Inside makeActions() method.
>
>IWorkbechAction undoAction=ActionFactory.UNDO.create(window) ;
>
>register(undoAction);
>
>
You also need to retarget the undo (and redo) actions. See
AbstractTextEditor.createUndoRedoActions() for how this can be achieved.

Dani

>
>// in fillcoolbar() method I have added this action.
>
> toolBar.add(undoAction);
>
>
> Above written code is providing an icon in the toolbar but this is always disabled.
>
> But same steps did work for implementing "Save Action"
>
> I know there something different which I dont know. because "Undo" is gonna be a retargetable action. will anyone help me urgently to solv this problem.I'm really in a critical situation.
>
> Thanks in Advance
>
>
Previous Topic:Example of client-server aplication using Eclipse RCP
Next Topic:How to use my own Extension point as Extension by other plugin?
Goto Forum:
  


Current Time: Tue Apr 16 06:35:41 GMT 2024

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

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

Back to the top