Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Show a subset of preference pages and options in RCP App(don't want to show Java/Debug/Team etc.)
Show a subset of preference pages and options in RCP App [message #515167] Wed, 17 February 2010 23:50 Go to next message
Jennifer is currently offline JenniferFriend
Messages: 9
Registered: February 2010
Junior Member
Hi,

I'm trying to create a dumbed down interface to only show the UI elements I want the users to see.

I have two preference pages I would like to show. For some reason I have the Java/Debug/Team pages. I guess because they were required plugins in the Eclipse product.

I tried creating an array of IDs when opening the preference page, but it only does a search and then you can't even see the other page I want to show.

So in the ActionBarAdvisor, I now have

editMenu.add(new OpenPreferencesAction(getActionBarConfigurer().getWindowConf igurer().getWindow()));

However I did create my own PreferencesAction and modified

String[] ids = {"Assembly", "Visualiser"};
PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(null, "Assembly", ids, null);

but that just opens the ugly search screen.

Any way I can customize this? I would remove java plugins since I don't need them in my opinion, but if I remove them from the product dependencies, I get the good old

org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Require-Bundle: org.eclipse.equinox.preferences; bundle-version="[3.2.0,4.0.0)"

So... any ideas? Smile

I should also add that I'd love to remove references to anything Java or Team in the right click options as well.

I'm hoping there's a plugin development option I've missed to run with the bare minimum, and then clicking "add required plugins" won't add everything and won't cause an error.
Re: Show a subset of preference pages and options in RCP App [message #515382 is a reply to message #515167] Thu, 18 February 2010 10:54 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Jennifer wrote:
> However I did create my own PreferencesAction and modified
> String[] ids = {"Assembly", "Visualiser"};
> PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(null,
> "Assembly", ids, null);
>
> but that just opens the ugly search screen.
>

Which search screen? Can you attach a small PNG?

In 3.5 there's a version of that method that takes a constant,
org.eclipse.ui.dialogs.PreferencesUtil.OPTION_FILTER_LOCKED, so the user
cannot "unfilter" the dialog.

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: Show a subset of preference pages and options in RCP App [message #515483 is a reply to message #515382] Thu, 18 February 2010 22:16 Go to previous messageGo to next message
Jennifer is currently offline JenniferFriend
Messages: 9
Registered: February 2010
Junior Member
Thanks for your reply. I haven't tried it.

Instead I went through all the plugins and removed references to jdt, debug and team. That meant I had to fix up some code and comment out some functionality I wasn't using.

I needed it to be gone from the right click options as well, so this was for the best. Would be nice to exclude them contributing to the UI somehow, but I guess that's just not an option.
Re: Show a subset of preference pages and options in RCP App [message #515600 is a reply to message #515483] Fri, 19 February 2010 14:05 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

In the general case, you can use activites/capabilities to exclude
certain kinds of UI elements (wizards, actionSets, and I think
preference pages).

See
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench_scalability.htm

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


Previous Topic:TextEditor - need correct approach for dynamic update of regions and markers
Next Topic:Cannot detect selection generated by double click in selectionChanged()
Goto Forum:
  


Current Time: Sun Dec 21 01:24:33 GMT 2014

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

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