Suppressing preference contributions [message #500749] |
Fri, 27 November 2009 23:47  |
Eclipse User |
|
|
|
> 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. The solution suggested was to get the PreferenceManager and=
remove contributions in the postWindowOpen method of ApplicationWorkbenchWi=
ndowAdvisor:<BR>
<BR>
public void postWindowOpen() {<BR>
IStatusLineManager statusLi=
ne =3D getWindowConfigurer().getActionBarConfigurer().getStatusLine Manager(); <=
BR>
statusLine.setMessage("=
;Decision support application initialized ...");<BR>
PreferenceManager preferenc=
eManager =3D PlatformUI.getWorkbench().getPreferenceManager();<BR>
preferenceManager.remove(&q=
uot;org.eclipse.ui.Workbench");<BR>
}<BR>
<BR>
However, this solution has no apparent effect in my application. 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   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
> 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! Quite right. For others who might want to get rid of t=
he "general" contribution:<BR>
<BR>
preferenceManager.remove("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>, "Francis Upton" <<a href=3D"fr=
ancisu@ieee.org">francisu@ieee.org</a>> wrote:<BR>
<BR>
<FONT COLOR=3D"#0000FF">> You are probably not removing the actual prefere=
nce page ("o.e.ui.workbench" <BR>
> is probably not a preference page id).<BR>
> <BR>
> Here is code that I use that has worked:<BR>
> <BR>
> pm.remove("org.ec=
lipse.help.ui.browsersPreferencePage");<BR>
> <BR>
> You can probably just debug this to see what preference pages it knows=
about <BR>
> to the the correct Id to use.<BR>
</FONT></SPAN></FONT>
</BODY>
</HTML>
--B_3342228320_13005874--
|
|
|
Powered by
FUDForum. Page generated in 0.03128 seconds