Getting rid of “Convert Line Delimiters to”
March 20th, 2006
If you're having dependencies to org.eclipse.ui.ide and you launch your RCP you'll automatically get an entry in the menu-bar that is called "Convert Line Delimiters to" and also "Last Edit Location", although you don't need it. To remove this entries place the following lines in your ApplicationActionBarAdvisor
JAVA:
-
-
ActionSetRegistry reg = WorkbenchPlugin.getDefault().getActionSetRegistry();
-
IActionSetDescriptor[] actionSets = reg.getActionSets();
-
// removing annoying gotoLastPosition Message.
-
for (int i = 0; i <actionSets.length; i++)
-
{
-
if (!actionSets[i].getId().equals(actionSetId))
-
continue;
-
IExtension ext = actionSets[i].getConfigurationElement()
-
.getDeclaringExtension();
-
}
-
// Removing convert line delimiters menu.
-
actionSetId = "org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo"; //$NON-NLS-1$
-
for (int i = 0; i <actionSets.length; i++)
-
{
-
if (!actionSets[i].getId().equals(actionSetId))
-
continue;
-
IExtension ext = actionSets[i].getConfigurationElement()
-
.getDeclaringExtension();
-
}
-
-
Entry Filed under: Uncategorized, RCP

2 Comments
1. dillboy | July 13th, 2006 at 8:14 pm
Thanks!
2. brownmik | July 17th, 2006 at 9:43 pm
New to Eclipse PDE - can’t believe it’s this hard to turn off menu items!
Thanks!