Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Remove unused preference pages
Remove unused preference pages [message #359945] Tue, 28 July 2009 13:33
Peter Lang is currently offline Peter LangFriend
Messages: 153
Registered: July 2009
Senior Member
Hi,

In an GMF-editor there are loads of preferences provided by other plugins.
There's Xtext, ATL, CDO, EMF Compare, Ecore Diagram and so on, even when I
have only the required plugins in my run configuration.

While the preferences of my own GMF-application might be necessary, most
others are not useful (and have no impact) in this context.

So I wrote the following code to have them removed:

PreferenceManager preferenceManager =
getWorkbench().getPreferenceManager();
for (IPreferenceNode node : preferenceManager.getRootSubNodes()) {
if ( ! node.getId().startsWith(XxxDiagramEditorPlugin.ID)) {
preferenceManager.remove(node);
}
}

Is there a better way to accomplish this?

Where to put this code?

The first position I thought of is XxxDiagramEditorPlugin.start, but
workbench is not initialized at this time so
getWorkbench().getPreferenceManager() populates my Error Log quite nice :)

Thanks in advance!
Previous Topic:WrappingLable cannot display Chinese
Next Topic:Triggering EMF Validation from GMF
Goto Forum:
  


Current Time: Tue Mar 09 08:41:26 GMT 2021

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

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

Back to the top