• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to remove last edit location tool bar item in my application

 
Chethan Sharma
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Could you please let me know how to remove "Last Edit Location" tool bar item in my application.

In Eclipse We can disabled "Last Edit Location" from
Winodw >> Customize perspective and press commands tab -uncheck the Editor Navigation item from Available Command groups.
 
Darrin Cartwright
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chethan,
Are you creating a new application based on Eclipse. and wanting to remove the "Last Edit Location" tool bar button from the new application?
 
Chethan Sharma
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for the response.

Exactly I am developing RCP application using Eclipse3.2.2.
In my application I want to remove "Last Edit Location" tool bar item.

Thanks,
 
Darrin Cartwright
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never even looked at the Eclipse source code, so this is just some advice.
Have you searched through the source code and config files looking for the string "Last Edit Location". This should give you some idea how the button is created. Most projects of this size will use a resource or property file to specify what buttons display where etc. So I doubt you will find an explicit line that looks like:

inside of a .java file, but you never know! Anyway, be sure to search through the properties files as well.

Good luck!
 
Chethan Sharma
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The application is developing using swt.
this way I resolved this one. Thanks for your response.


=============================
private MenuManager createWindowMenu(IWorkbenchWindow window) {

....
.........
ActionSetRegistry reg = WorkbenchPlugin.getDefault().getActionSetRegistry();
IActionSetDescriptor[] actionSets = reg.getActionSets();
String actionSetId[] = {"org.eclipse.ui.edit.text.actionSet.navigation" };

for (int i = 0; i < actionSets.length; i++) {
if ((!actionSets[i].getId().equals(actionSetId[0]))
&& (!actionSets[i].getId().equals(actionSetId[1])))
continue;
IExtension ext = actionSets[i].getConfigurationElement().getDeclaringExtension();
reg.removeExtension(ext, new Object[] { actionSets[i] });
}

return menu;
}

Thanks,
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic