I am developing a plug-in which is basically create a new project, project contains more than one folder, and the folder contains our own customized editors. Now I dont want to allow the user to rename of the project from anywhere. I can see the rename option in file menu, context menu of project explorer, context menu of package explorer, context menu of navigator. Is it possible to disable/customize the rename option globally. I have tried to use global action handler for rename action,which is basically doing my own job whenever the rename action occurs. But since I want to block/disable the rename option at the time plug-in activator get started, I am able get active view site on the activator class, which doesn’t seems to help me because of the active view might be anyother than above mentioned view at sometimes. Hence I tried to using ‘Rename Participant’ through ltk’s renameparticipant extension and I wrote my own class which extending RenameParticipant, but the class never get initiated even I have given the correct class name in plug-in.xml file.
Since our product is plug-in
Could anyone please advise me that how should I proceed further? I hope that someone has already walk on this path to block the rename option globally.
You can specify your own handler to global rename (id=”org.eclipse.ui.edit.rename”) and Java Rename element (id=”org.eclipse.jdt.ui.edit.text.java.rename.element”) commands using
Handlersextension point. However, it is not possible to disable the context menu item (Refactor > Rename…) in Package Explorer because it is hard-coded.