Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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: Sun Jul 06 23:43:16 EDT 2025

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

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

Back to the top