Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to suppress the workspace preference page
How to suppress the workspace preference page [message #554965] Tue, 24 August 2010 23:23 Go to next message
Jon Svede is currently offline Jon SvedeFriend
Messages: 83
Registered: July 2009
Member
I am opening the preferences dialog using org.eclipse.ui.window.preferences as my command ID and the preferences open with the 'General' top level option. I have not yet implemented my own preference page. However, the users would like the 'workspace' node under the 'General' node to be removed. Is it possible to selectively suppress individual preference pages?

In some online tutorials I saw an example where they simply implemented an actual preference page and this caused the whole 'General' top level to go away. Is that accurate?
Re: How to suppress the workspace preference page [message #555100 is a reply to message #554965] Wed, 25 August 2010 12:51 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

you can use an activity and pattern like
<contributing.plugin.id/preference.page.id>. But you might need an
expression based activity to make the node disappear.

http://help.eclipse.org > Platform Plug-in Developer Guide ... see the
sections on activities and capabilities.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: How to suppress the workspace preference page [message #555224 is a reply to message #555100] Wed, 25 August 2010 22:44 Go to previous messageGo to next message
Jon Svede is currently offline Jon SvedeFriend
Messages: 83
Registered: July 2009
Member
Thanks, Paul.

I think this post and my other post are actually related. The "General" preferences are contributed by the org.eclipse.ui.ide plugin, which I am including due to the requirement to re-use the File >> Open menu item.

I am thinking I can kill two birds with one stone by removing the dependency on the ui.ide plugin and instead implement my own command for opening a file. As a result of doing this I will also be able to cache the last file system location (which is what my other post is related to).

Anyone have another suggestion?
Re: How to suppress the workspace preference page [message #555357 is a reply to message #555224] Thu, 26 August 2010 12:09 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

That's probably your best bet. the IDE plugin contains most of our IDE
implementation ... while code re-use is always a goal, it would probably
serve you better to implement what you need using the ide handler as a
template.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: How to suppress the workspace preference page [message #664751 is a reply to message #554965] Mon, 11 April 2011 20:16 Go to previous message
Dirk Alexander Schaefer is currently offline Dirk Alexander SchaeferFriend
Messages: 12
Registered: July 2009
Junior Member
you could also, in your WorkbenchAdvisor, override postStartup and do:

PreferenceManager pm = PlatformUI.getWorkbench().getPreferenceManager();

for (IPreferenceNode node : pm.getRootSubNodes()) {
if(node.getId().equals("org.eclipse.ui.preferencePages.Workbench ")) {
node.remove("org.eclipse.ui.preferencePages.Editors");
node.remove("org.eclipse.ui.preferencePages.Workspace");
node.remove("org.eclipse.ui.preferencePages.ContentTypes");
}
}

greez,

dirk

[Updated on: Mon, 11 April 2011 20:16]

Report message to a moderator

Previous Topic:Show Multiple Perspectives as Tabs in Perspective bar
Next Topic:instance of same View placing
Goto Forum:
  


Current Time: Thu Mar 28 16:10:00 GMT 2024

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

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

Back to the top