Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to disable renaming of a project programmatically.
How to disable renaming of a project programmatically. [message #492340] Tue, 20 October 2009 01:32 Go to next message
Nayna Jain is currently offline Nayna Jain
Messages: 23
Registered: July 2009
Junior Member
Hi all,

Just like C/C++, we have defined our own project Type and project nature.

So, when eclipse projects are of this particular nature and type, we don't want the Rename Action to be shown or disabled.

Or if this is not possible , we want to just show an error message that renaming is not possible and stop the renaming of this project.

Currently we are doing this using resource change listeners... But in this case the events are notified only after renaming. And so , though we show the user that 'renaming is not allowed' , the renaming is done.. So, we have to also show that rename to the original name for it to work.. And here is the point where we want that either by itself we disable renaming or we undo the renaming operation programmatically and showing to the user just that "renaming is not possible".

Any pointers for this ?

Thanks & Regards,
- Nayna Jain
Re: How to disable renaming of a project programmatically. [message #492422 is a reply to message #492340] Tue, 20 October 2009 08:13 Go to previous message
Ravi  is currently offline Ravi
Messages: 27
Registered: July 2009
Junior Member
Try to set your custom action handler for rename action/command. Cut/Copy/paste have global handles and can be configured depending on the context.
<viewsite> .getActionBars().setGlobalActionHandler(IWorkbenchActionDefi nitionIds.RENAME, <ur rename action>);
Previous Topic:Incremental reconciling strategy synchronization
Next Topic:How to get the project path
Goto Forum:
  


Current Time: Mon Apr 21 03:07:10 EDT 2014

Powered by FUDForum. Page generated in 0.02854 seconds