Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to remove fast view option in my plugin ?
How to remove fast view option in my plugin ? [message #892896] Sun, 01 July 2012 11:13 Go to next message
Eclipse UserFriend
Hi,

How can I disable the fast view option in my plugin?


Thanks
Re: How to remove fast view option in my plugin ? [message #893393 is a reply to message #892896] Tue, 03 July 2012 16:08 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

not quite sure if I understand your problem, but take a look at your WorkbenchWindowAdvisor class. There's a method called preWindowOpen().

Add the following code sample to this method and the FastViews are gone.

public void preWindowOpen() {

...
...
final IWorkbenchWindowConfigurer configurer = getWindowConfigurer();

...
...
configurer.setShowFastViewBars(false);
...
...
}
Re: How to remove fast view option in my plugin ? [message #893554 is a reply to message #893393] Wed, 04 July 2012 10:28 Go to previous messageGo to next message
Eclipse UserFriend
Achim Ehrmann wrote on Tue, 03 July 2012 16:08
Hi,

not quite sure if I understand your problem, but take a look at your WorkbenchWindowAdvisor class. There's a method called preWindowOpen().

Add the following code sample to this method and the FastViews are gone.

public void preWindowOpen() {

...
...
final IWorkbenchWindowConfigurer configurer = getWindowConfigurer();

...
...
configurer.setShowFastViewBars(false);
...
...
}


Hi,
Yes You got my point.

I did exactly what you've told but the fast view bar is still there in the perspective and I still can use the fast view option.
what have i missed ?
Re: How to remove fast view option in my plugin ? [message #893564 is a reply to message #893393] Wed, 04 July 2012 11:01 Go to previous messageGo to next message
Eclipse UserFriend
repeated ...

[Updated on: Wed, 04 July 2012 11:02] by Moderator

Re: How to remove fast view option in my plugin ? [message #894117 is a reply to message #893564] Fri, 06 July 2012 13:53 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

what do you mean by "the fast view bar is still there in the perspective".

The fast view bar is not part of the perspective. It's part of the workbench status bar.

Can you please provide a screenshot so we do not talk about different things.
Re: How to remove fast view option in my plugin ? [message #895276 is a reply to message #894117] Thu, 12 July 2012 06:47 Go to previous messageGo to next message
Eclipse UserFriend
I've attached the image as the forum doesn't allow me to post links now.
I want not to show this icon or this bar in the image when I open my perpective.
but show it in other perspectives
  • Attachment: Untitled.png
    (Size: 64.86KB, Downloaded 236 times)
Re: How to remove fast view option in my plugin ? [message #895282 is a reply to message #895276] Thu, 12 July 2012 07:29 Go to previous messageGo to next message
Eclipse UserFriend
After you make your change for your RCP app, be sure to clear your workspace or reset your perspective.

PW
Re: How to remove fast view option in my plugin ? [message #895305 is a reply to message #895282] Thu, 12 July 2012 08:22 Go to previous messageGo to next message
Eclipse UserFriend
Why do I need to reset if I'm modifying in the preWindowOpen ?
public void preWindowOpen() {

...
...
final IWorkbenchWindowConfigurer configurer = getWindowConfigurer();

...
...
configurer.setShowFastViewBars(false);
...
...
}
Re: How to remove fast view option in my plugin ? [message #895365 is a reply to message #895305] Thu, 12 July 2012 11:06 Go to previous messageGo to next message
Eclipse UserFriend
You would only need a reset if you've ever opened the perspective once without running through that configurer code. Generally, though, you would do that in your WorkbenchWindowAdvisor constructor, no?

PW
Re: How to remove fast view option in my plugin ? [message #895388 is a reply to message #895365] Thu, 12 July 2012 12:33 Go to previous messageGo to next message
Eclipse UserFriend
During startup the FastViewBar.restoreState(...) method is called, to restore the workbench state from last application run.

This state is stored in your .metadata directory in a file called workbench.xml under folder .plugins\org.eclipse.ui.workbench.

This file will be written, when you've called the method setSaveAndRestore(true) from the workbench configurer.

I assume, you've done this the first time, when you're RCP application is running with the missing statement configurer.setShowFastViewBars(false).

So, if you don't follow the advice of Paul, the workbench state will always be restored from last run, which means your FastView is always visible.
Re: How to remove fast view option in my plugin ? [message #895709 is a reply to message #895388] Sun, 15 July 2012 04:42 Go to previous messageGo to next message
Eclipse UserFriend
I did setSaveAndRestore(true) but how can I do reset ?
Re: How to remove fast view option in my plugin ? [message #895795 is a reply to message #895709] Mon, 16 July 2012 01:24 Go to previous message
Eclipse UserFriend
On 2012-07-15 10:42, becks m wrote:
> I did setSaveAndRestore(true) but how can I do reset ?

You could take advantage of the reset perspective command as follows:

<menuContribution
allPopups="false"
locationURI="toolbar:org.eclipse.ui.main.toolbar">
<toolbar
id="myclient.ui.windowBar"
label="%toolbar.label.window">
<command
commandId="org.eclipse.ui.window.resetPerspective"
style="push">
</command>
</toolbar>
</menuContribution>


HTH & Greetings from Bremen,

Daniel Krügler
Previous Topic:Null Service Reference
Next Topic:TableLayout layouts too early
Goto Forum:
  


Current Time: Fri Aug 29 19:02:13 EDT 2025

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

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

Back to the top