Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Best way to not show the select ui preference pages from contributing plugins to RCP application
Best way to not show the select ui preference pages from contributing plugins to RCP application [message #491938] Fri, 16 October 2009 15:42 Go to next message
Greg Babcock is currently offline Greg Babcock
Messages: 53
Registered: July 2009
Member
The preference dialog form my RCP application show the preference settings
for org.eclipse.ui plugin.
Most of the settings do not apply to my application, so I do not want them
displayed. The obvious way to do this would be to make
a copy of the contributing plugin and edit the plugin.xml file, but I am
hoping that there is a better way.

Thanks,

GB
Re: Best way to not show the select ui preference pages from contributing plugins to RCP application [message #491956 is a reply to message #491938] Fri, 16 October 2009 17:38 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You can either use Capabilities/Activities [1] to filter out the preference pages, or create your own command/handler and open the preferences dialog yourself similar to:

org.eclipse.ui.internal.OpenPreferencesAction.run()

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

PW


Re: Best way to not show the select ui preference pages from contributing plugins to RCP application [message #492093 is a reply to message #491956] Sun, 18 October 2009 15:12 Go to previous messageGo to next message
Greg Babcock is currently offline Greg Babcock
Messages: 53
Registered: July 2009
Member
Thank you, I am new to RCP development and didn't know about Activities,
this is clearly the best way to handle this situation.

I have added the following extension point to disable the preference pages,
and also inspected the MutableActivityManager to verify that activity was
getting set, and that it is disabled, but I am still getting the eclipse
preference pages in the dialog. What am I missing?

<extension point="org.eclipse.ui.activities">

<activity id="org.eclipse.ui.preferencePages" name="eclipse preference
pages"> </activity>

<activityPatternBinding activityId="org.eclipse.ui.preferencePages"
pattern="org.eclipse.ui.preferencePages.*">

</activityPatternBinding>


</extension>




"Paul Webster" <pwebster@ca.ibm.com> wrote in message
news:hbab31$epg$1@build.eclipse.org...
> You can either use Capabilities/Activities [1] to filter out the
> preference pages, or create your own command/handler and open the
> preferences dialog yourself similar to:
>
> org.eclipse.ui.internal.OpenPreferencesAction.run()
>
> [1]
> 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
Re: Best way to not show the select ui preference pages from contributing plugins to RCP application [message #492183 is a reply to message #492093] Mon, 19 October 2009 10:58 Go to previous messageGo to next message
Ravi  is currently offline Ravi
Messages: 27
Registered: July 2009
Junior Member
The pattern should match with the preference ids contributed by eclipse ui. check if the preference id have the same prefix you have given for the pattern.

--
Ravi
Re: Best way to not show the select ui preference pages from contributing plugins to RCP application [message #492300 is a reply to message #492183] Mon, 19 October 2009 21:00 Go to previous message
Greg Babcock is currently offline Greg Babcock
Messages: 53
Registered: July 2009
Member
Thank you, after changing the activity pattern binding to
pattern="org.eclipse.ui.*"> it now filters out the preference page as
expected. I am confused about where the preference ID is defined because
what I originally had (pattern="org.eclipse.ui.preferencePages.*") should
have matched, and pattern="org.eclipse.ui.ide.*" matches but it shouldn't.
Below is the pertinent section of extention point decloration if am trying
to filter from the org.eclipse.ui.ide plugin.

<extension point="org.eclipse.ui.preferencePages">
<page name="%PreferencePages.Workbench"

class=" org.eclipse.ui.internal.ide.dialogs.IDEWorkbenchPreferencePa ge "

id="org.eclipse.ui.preferencePages.Workbench">

<keywordReference id="org.eclipse.ui.ide.general"/>

</page>

.....

Regards,



GB




I have modified the
"Ravi" <v.r.sankar@gmail.com> wrote in message
news:hbhgov$3ra$1@build.eclipse.org...
> The pattern should match with the preference ids contributed by eclipse
> ui. check if the preference id have the same prefix you have given for the
> pattern.
>
> --
> Ravi
Previous Topic:Debug a simple file
Next Topic:own eclipse update site
Goto Forum:
  


Current Time: Wed Sep 17 15:56:07 GMT 2014

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

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