Default preference pages [message #1051917] |
Mon, 29 April 2013 11:21 |
Sebastien Pennec Messages: 27 Registered: April 2013 Location: Switzerland |
Junior Member |
|
|
Hello,
I am currently evaluating a migration for my app, from RCP 3.5 to 4.3.
After I followed a tutorial by Lars Vogel, I now use the compatibility layer + a LegacyIE.e4xmi file to manage E4-only components. This file is still in its default state: I have not added anything myself up to now.
When I launch my app and go to the preferences, I can see the pages that are usually added by the app, but I also find pages that are added by another way that I don't manage yet. These pages are typical Eclipse pages:
General -> Appearance, Content types, Editors, Keys, Perspectives, Workspace.
I would like to remove these pages from the app. A way I found to be effective, is to reach to the PreferenceManager at startup time (in my implementation of IPerspectiveFactory) and remove all pages whose ID is one of an Eclipse component.
PreferenceManager preferenceManager = PlatformUI.getWorkbench().getPreferenceManager();
List elements = preferenceManager.getElements(PreferenceManager.PRE_ORDER);
for (Object o: elements) {
WorkbenchPreferenceNode node = (WorkbenchPreferenceNode)o;
if (node.getId().startsWith("org.eclipse")) {
preferenceManager.remove(node);
}
}
However, I don't find it very good to let these pages be created just to remove them later.
Is there a way to prevent the creation of these preference pages?
Thanks for your help,
Sebastien
|
|
|
Powered by
FUDForum. Page generated in 0.02143 seconds