Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Default preference pages(How to manage pages that are automatically added in my app)
Default preference pages [message #1051917] Mon, 29 April 2013 11:21
Sebastien Pennec is currently offline Sebastien Pennec
Messages: 22
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
Previous Topic:Eclipse Context - does EclipseContext keep strong or weak references?
Next Topic:e4mf
Goto Forum:
  


Current Time: Thu Oct 30 17:34:30 GMT 2014

Powered by FUDForum. Page generated in 0.12473 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software