Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » I want to hide perspective bar on my RCP application(3.0M9)
I want to hide perspective bar on my RCP application(3.0M9) [message #243880] Sun, 23 May 2004 04:00 Go to next message
mizuno is currently offline mizuno
Messages: 5
Registered: July 2009
Junior Member
Hi,

I wrote a simple RCP application, which has only on brank perspective,
to study RCP on Eclipse 3.0 M9.
I added an statement,"configurer.setShowPerspectiveBar(false)",
in the preWindowOpen method in my WorkbenchAdvisor class
to hide "perspective bar(perspective swithcher)" on the RCP
application, because the application use only one perspective
and does not need "Switching Perspective" functionality.
But it did not work.

Is this a bug of Eclipse 3.0M9 or are there any other solutions
to hide perspective bar?

The source code of my Workbench Advisor is as follows:

- Workbench Advisor
public class SampleAdvisor extends WorkbenchAdvisor {

public String getInitialWindowPerspectiveId() {
return "myrcp.sample.samplePerspective";
}

public void preWindowOpen(IWorkbenchWindowConfigurer configurer) {
super.preWindowOpen(configurer);
configurer.setShowMenuBar(false);
configurer.setShowPerspectiveBar(false);
configurer.setInitialSize(new Point(500,500));
configurer.setTitle("Sample");
}
}

Thanks.
Re: I want to hide perspective bar on my RCP application(3.0M9) [message #244071 is a reply to message #243880] Sun, 23 May 2004 18:03 Go to previous messageGo to next message
Eclipse User
Originally posted by: noone.nowhere.com

I got the same kind of problem until I implemented the
createWindowContents method.

Mark



Tak wrote:

> Hi,

> I wrote a simple RCP application, which has only on brank perspective,
> to study RCP on Eclipse 3.0 M9.
> I added an statement,"configurer.setShowPerspectiveBar(false)",
> in the preWindowOpen method in my WorkbenchAdvisor class
> to hide "perspective bar(perspective swithcher)" on the RCP
> application, because the application use only one perspective
> and does not need "Switching Perspective" functionality.
> But it did not work.

> Is this a bug of Eclipse 3.0M9 or are there any other solutions
> to hide perspective bar?

> The source code of my Workbench Advisor is as follows:

> - Workbench Advisor
> public class SampleAdvisor extends WorkbenchAdvisor {

> public String getInitialWindowPerspectiveId() {
> return "myrcp.sample.samplePerspective";
> }

> public void preWindowOpen(IWorkbenchWindowConfigurer configurer) {
> super.preWindowOpen(configurer);
> configurer.setShowMenuBar(false);
> configurer.setShowPerspectiveBar(false);
> configurer.setInitialSize(new Point(500,500));
> configurer.setTitle("Sample");
> }
> }

> Thanks.
Re: I want to hide perspective bar on my RCP application(3.0M9) [message #244709 is a reply to message #244071] Tue, 25 May 2004 06:23 Go to previous messageGo to next message
yuqui is currently offline yuqui
Messages: 4
Registered: July 2009
Junior Member
I also have the same problem.

I overrode the createWindowContents method in my WorkbenchAdvisor class
as Mark mentioned, and called
"configurer.setShowPerspectiveBar(false)" in this method.
But it doesn't work.

What should I do to hide the perspective bar?
Please tell me what method did you call to solve this problem.
And if you know, could you tell me why you have to override this method
not preWindowOpen method or other?


Mark McLaren wrote:

> I got the same kind of problem until I implemented the
> createWindowContents method.

> Mark



> Tak wrote:

> > Hi,

> > I wrote a simple RCP application, which has only on brank perspective,
> > to study RCP on Eclipse 3.0 M9.
> > I added an statement,"configurer.setShowPerspectiveBar(false)",
> > in the preWindowOpen method in my WorkbenchAdvisor class
> > to hide "perspective bar(perspective swithcher)" on the RCP
> > application, because the application use only one perspective
> > and does not need "Switching Perspective" functionality.
> > But it did not work.

> > Is this a bug of Eclipse 3.0M9 or are there any other solutions
> > to hide perspective bar?

> > The source code of my Workbench Advisor is as follows:

> > - Workbench Advisor
> > public class SampleAdvisor extends WorkbenchAdvisor {

> > public String getInitialWindowPerspectiveId() {
> > return "myrcp.sample.samplePerspective";
> > }

> > public void preWindowOpen(IWorkbenchWindowConfigurer configurer) {
> > super.preWindowOpen(configurer);
> > configurer.setShowMenuBar(false);
> > configurer.setShowPerspectiveBar(false);
> > configurer.setInitialSize(new Point(500,500));
> > configurer.setTitle("Sample");
> > }
> > }

> > Thanks.
Re: I want to hide perspective bar on my RCP application(3.0M9) [message #244720 is a reply to message #244071] Tue, 25 May 2004 06:44 Go to previous messageGo to next message
mizuno is currently offline mizuno
Messages: 5
Registered: July 2009
Junior Member
Hi Mark,

Do you mean I can hide "perspective bar" by implementing
"configurer.setShowPerspectiveBar(false)" in the
createWindowContents method?

I implemented the createWindowContents method, but I could
not hide "perspective bar"?

Would you please show me the sample coding?

By the way, do anyone know the reason my code did not work?
Is this a bug of Eclipse 3.0M9?

Thanks


Mark McLaren wrote:

> I got the same kind of problem until I implemented the
> createWindowContents method.

> Mark



> Tak wrote:

> > Hi,

> > I wrote a simple RCP application, which has only on brank perspective,
> > to study RCP on Eclipse 3.0 M9.
> > I added an statement,"configurer.setShowPerspectiveBar(false)",
> > in the preWindowOpen method in my WorkbenchAdvisor class
> > to hide "perspective bar(perspective swithcher)" on the RCP
> > application, because the application use only one perspective
> > and does not need "Switching Perspective" functionality.
> > But it did not work.

> > Is this a bug of Eclipse 3.0M9 or are there any other solutions
> > to hide perspective bar?

> > The source code of my Workbench Advisor is as follows:

> > - Workbench Advisor
> > public class SampleAdvisor extends WorkbenchAdvisor {

> > public String getInitialWindowPerspectiveId() {
> > return "myrcp.sample.samplePerspective";
> > }

> > public void preWindowOpen(IWorkbenchWindowConfigurer configurer) {
> > super.preWindowOpen(configurer);
> > configurer.setShowMenuBar(false);
> > configurer.setShowPerspectiveBar(false);
> > configurer.setInitialSize(new Point(500,500));
> > configurer.setTitle("Sample");
> > }
> > }

> > Thanks.
Re: I want to hide perspective bar on my RCP application(3.0M9) [message #245861 is a reply to message #244709] Wed, 26 May 2004 17:07 Go to previous message
Eclipse User
Originally posted by: noone.nowhere.com

Sorry I'm not an expert here. All I know is that when I tried to run the
RCP browser demo without overrideing createWindowContents I could see the
perspective bar. The browser demo is at:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org. eclipse.ui.examples.rcp.browser/readme.html



Hope this helps

Mark



yuqui wrote:

> I also have the same problem.

> I overrode the createWindowContents method in my WorkbenchAdvisor class
> as Mark mentioned, and called
> "configurer.setShowPerspectiveBar(false)" in this method.
> But it doesn't work.

> What should I do to hide the perspective bar?
> Please tell me what method did you call to solve this problem.
> And if you know, could you tell me why you have to override this method
> not preWindowOpen method or other?


> Mark McLaren wrote:

> > I got the same kind of problem until I implemented the
> > createWindowContents method.

> > Mark



> > Tak wrote:

> > > Hi,

> > > I wrote a simple RCP application, which has only on brank perspective,
> > > to study RCP on Eclipse 3.0 M9.
> > > I added an statement,"configurer.setShowPerspectiveBar(false)",
> > > in the preWindowOpen method in my WorkbenchAdvisor class
> > > to hide "perspective bar(perspective swithcher)" on the RCP
> > > application, because the application use only one perspective
> > > and does not need "Switching Perspective" functionality.
> > > But it did not work.

> > > Is this a bug of Eclipse 3.0M9 or are there any other solutions
> > > to hide perspective bar?

> > > The source code of my Workbench Advisor is as follows:

> > > - Workbench Advisor
> > > public class SampleAdvisor extends WorkbenchAdvisor {

> > > public String getInitialWindowPerspectiveId() {
> > > return "myrcp.sample.samplePerspective";
> > > }

> > > public void preWindowOpen(IWorkbenchWindowConfigurer configurer) {
> > > super.preWindowOpen(configurer);
> > > configurer.setShowMenuBar(false);
> > > configurer.setShowPerspectiveBar(false);
> > > configurer.setInitialSize(new Point(500,500));
> > > configurer.setTitle("Sample");
> > > }
> > > }

> > > Thanks.
Previous Topic:XML reader/writer API within Eclipse?
Next Topic:M9 Java editor really slow
Goto Forum:
  


Current Time: Wed Aug 20 05:05:03 EDT 2014

Powered by FUDForum. Page generated in 0.02317 seconds