aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to remove last edit location tool bar item in my application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to remove last edit location tool bar item in my application" Watch "How to remove last edit location tool bar item in my application" New topic
Author

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

Chethan Sharma
Ranch Hand

Joined: Mar 22, 2006
Posts: 59
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.


chaithu
Darrin Cartwright
Ranch Hand

Joined: Dec 27, 2002
Posts: 107
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?


Life is good on the Ponderosa,<br />but mind where you step.
Chethan Sharma
Ranch Hand

Joined: Mar 22, 2006
Posts: 59
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

Joined: Dec 27, 2002
Posts: 107
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

Joined: Mar 22, 2006
Posts: 59
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,
 
 
subject: How to remove last edit location tool bar item in my application