[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] removing unused ActionSets

I get this annoying message in the log of my RCP application:

!ENTRY org.eclipse.ui 4 4 2005-11-14 14:04:42.171
!MESSAGE Invalid Menu Extension (Path is invalid): org.eclipse.ui.edit.text.gotoLastEditPosition


The only way I found to remove this undesired action set is the following code, which works fine, but seems rather heinous (using all kinds of nasty internal classes):

        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))
continue;
IExtension ext = actionSets[i].getConfigurationElement()
.getDeclaringExtension();
reg.removeExtension(ext, new Object[] { actionSets[i] });
}


Is there a better way?

Francis