Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 15:13 Go to next message
becks m is currently offline becks mFriend
Messages: 59
Registered: June 2012
Member
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 20:08 Go to previous messageGo to next message
Achim E. is currently offline Achim E.Friend
Messages: 8
Registered: July 2009
Location: Germany
Junior Member
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 14:28 Go to previous messageGo to next message
becks m is currently offline becks mFriend
Messages: 59
Registered: June 2012
Member
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 15:01 Go to previous messageGo to next message
becks m is currently offline becks mFriend
Messages: 59
Registered: June 2012
Member
repeated ...

[Updated on: Wed, 04 July 2012 15:02]

Report message to a moderator

Re: How to remove fast view option in my plugin ? [message #894117 is a reply to message #893564] Fri, 06 July 2012 17:53 Go to previous messageGo to next message
Achim E. is currently offline Achim E.Friend
Messages: 8
Registered: July 2009
Location: Germany
Junior Member
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 10:47 Go to previous messageGo to next message
becks m is currently offline becks mFriend
Messages: 59
Registered: June 2012
Member
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 212 times)
Re: How to remove fast view option in my plugin ? [message #895282 is a reply to message #895276] Thu, 12 July 2012 11:29 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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 12:22 Go to previous messageGo to next message
becks m is currently offline becks mFriend
Messages: 59
Registered: June 2012
Member
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 15:06 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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 16:33 Go to previous messageGo to next message
Achim E. is currently offline Achim E.Friend
Messages: 8
Registered: July 2009
Location: Germany
Junior Member
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 08:42 Go to previous messageGo to next message
becks m is currently offline becks mFriend
Messages: 59
Registered: June 2012
Member
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 05:24 Go to previous message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
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 Sep 20 00:28:09 GMT 2024

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

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

Back to the top