Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Suppressing preference contributions
Suppressing preference contributions [message #500749] Fri, 27 November 2009 23:47 Go to next message
J. Michael Dean, M.D. is currently offline J. Michael Dean, M.D.Friend
Messages: 218
Registered: July 2009
Senior Member
> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--B_3342185229_10392865
Content-type: text/plain;
charset="US-ASCII"
Content-transfer-encoding: 7bit

This topic has arisen previously, in which an RCP preference page is
receiving unwanted contributions from other parts of Eclipse that make these
contributions. The solution suggested was to get the PreferenceManager and
remove contributions in the postWindowOpen method of
ApplicationWorkbenchWindowAdvisor:

public void postWindowOpen() {
IStatusLineManager statusLine =
getWindowConfigurer().getActionBarConfigurer().getStatusLine Manager();
statusLine.setMessage("Decision support application initialized
....");
PreferenceManager preferenceManager =
PlatformUI.getWorkbench().getPreferenceManager();
preferenceManager.remove("org.eclipse.ui.Workbench");
}

However, this solution has no apparent effect in my application. If I use
preferenceManager.removeAll(), by the way, it does remove all preferences
including my own.

Any assistance will be greatly appreciated!

- Mike

--B_3342185229_10392865
Content-type: text/html;
charset="US-ASCII"
Content-transfer-encoding: quoted-printable

<HTML>
<HEAD>
<TITLE>Suppressing preference contributions</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Calibri, Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:11pt=
'>This topic has arisen previously, in which an RCP preference page is recei=
ving unwanted contributions from other parts of Eclipse that make these cont=
ributions. &nbsp;The solution suggested was to get the PreferenceManager and=
remove contributions in the postWindowOpen method of ApplicationWorkbenchWi=
ndowAdvisor:<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;public void postWindowOpen() {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;IStatusLineManager statusLi=
ne =3D getWindowConfigurer().getActionBarConfigurer().getStatusLine Manager(); <=
BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;statusLine.setMessage(&quot=
;Decision support application initialized ...&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;PreferenceManager preferenc=
eManager =3D PlatformUI.getWorkbench().getPreferenceManager();<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;preferenceManager.remove(&q=
uot;org.eclipse.ui.Workbench&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<BR>
However, this solution has no apparent effect in my application. &nbsp;If I=
use preferenceManager.removeAll(), by the way, it does remove all preferenc=
es including my own.<BR>
<BR>
Any assistance will be greatly appreciated!<BR>
<BR>
- Mike</SPAN></FONT>
</BODY>
</HTML>


--B_3342185229_10392865--
Re: Suppressing preference contributions [message #500755 is a reply to message #500749] Sat, 28 November 2009 07:15 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
You are probably not removing the actual preference page ("o.e.ui.workbench" is probably not a preference page id).

Here is code that I use that has worked:

pm.remove("org.eclipse.help.ui.browsersPreferencePage");

You can probably just debug this to see what preference pages it knows about to the the correct Id to use.


Re: Suppressing preference contributions [message #500766 is a reply to message #500755] Sat, 28 November 2009 11:45 Go to previous message
J. Michael Dean, M.D. is currently offline J. Michael Dean, M.D.Friend
Messages: 218
Registered: July 2009
Senior Member
> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--B_3342228320_13005874
Content-type: text/plain;
charset="US-ASCII"
Content-transfer-encoding: 7bit

Thanks! Quite right. For others who might want to get rid of the "general"
contribution:

preferenceManager.remove("org.eclipse.ui.preferencePages.Workbench ");

On 11/28/09 12:15 AM, in article heqimj$u9t$1@build.eclipse.org, "Francis
Upton" <francisu@ieee.org> wrote:

> You are probably not removing the actual preference page ("o.e.ui.workbench"
> is probably not a preference page id).
>
> Here is code that I use that has worked:
>
> pm.remove("org.eclipse.help.ui.browsersPreferencePage");
>
> You can probably just debug this to see what preference pages it knows about
> to the the correct Id to use.


--B_3342228320_13005874
Content-type: text/html;
charset="US-ASCII"
Content-transfer-encoding: quoted-printable

<HTML>
<HEAD>
<TITLE>Re: Suppressing preference contributions</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Calibri, Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:11pt=
'>Thanks! &nbsp;Quite right. &nbsp;For others who might want to get rid of t=
he &quot;general&quot; contribution:<BR>
<BR>
preferenceManager.remove(&quot;org.eclipse.ui.preference Pages.Workbench&quo=
t;);<BR>
<BR>
On 11/28/09 12:15 AM, in article <a href=3D"heqimj$u9t$1@build.eclipse.org">h=
eqimj$u9t$1@build.eclipse.org</a>, &quot;Francis Upton&quot; &lt;<a href=3D"fr=
ancisu@ieee.org">francisu@ieee.org</a>&gt; wrote:<BR>
<BR>
<FONT COLOR=3D"#0000FF">&gt; You are probably not removing the actual prefere=
nce page (&quot;o.e.ui.workbench&quot; <BR>
&gt; is probably not a preference page id).<BR>
&gt; <BR>
&gt; Here is code that I use that has worked:<BR>
&gt; <BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;pm.remove(&quot;org.ec=
lipse.help.ui.browsersPreferencePage&quot;);<BR>
&gt; <BR>
&gt; You can probably just debug this to see what preference pages it knows=
about <BR>
&gt; to the the correct Id to use.<BR>
</FONT></SPAN></FONT>
</BODY>
</HTML>


--B_3342228320_13005874--
Previous Topic:preventing exit code window
Next Topic:Showing extra tree in navigator for my custom file types
Goto Forum:
  


Current Time: Tue Mar 19 09:37:53 GMT 2024

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

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

Back to the top