Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Perspective customizations not being respected
Perspective customizations not being respected [message #915740] Mon, 17 September 2012 17:57 Go to next message
Mario Marinato is currently offline Mario Marinato
Messages: 28
Registered: March 2011
Location: Brazil
Junior Member
On an RCP application we develop, the user can customize the perspectives, choosing which menu and toolbar items should be displayed.

When user goes to Window -> Customize Perspective... -> Tool Bar Visibility and then unchecks a tool bar on the Tool Bar Structure pane and presses OK, the tool bar disappears properly.

But when the application is restarted, the tool bar is back, even though it still appears unchecked on the customization dialog.

I found an ugly workaround for that, which is to perform on startup-time the same actions performed when the user confirms on the customization dialog.

This workaround can be run on two moments:

a) On our ApplicationWorkbenchWindowAdvisor class, method postWindowOpen. On this case, the full tool bar appears and then it gets configured as the user wants. This approach's drawback is that the user sees the change happening.

b) On the same ApplicationWorkbenchWindowAdvisor class, method preWindowOpen, add a PerspectiveListener to configurer.getWindow() and then act on its perspectiveActivated method. This approach prevents user from seeing the change happen.

Does anyone know if there's a better way to do that? I believe we're lacking a configuration step to be made for this feature to work properly.

Our RCP application is based on Eclipse 3.8.


Mário Marinato
From Brazil
Re: Perspective customizations not being respected [message #915785 is a reply to message #915740] Mon, 17 September 2012 20:25 Go to previous messageGo to next message
Jeeeyul Lee is currently offline Jeeeyul Lee
Messages: 108
Registered: July 2009
Location: Seoul
Senior Member

Did you set IWorkbenchConfigurer#setSaveAndRestore(true)?

If you did, 4.2 has same (toolbar visibility) problems.
for instance, reset perspective not restores toolbar visibility till re-launch.
4.2 is almost same with 3.8, So it should be bug.

I heard eclipse ui team suffers serious lack of human resource.
(see http://www.jroller.com/andyl/entry/something_is_really_broken_with)

How sad.
Re: Perspective customizations not being respected [message #916011 is a reply to message #915785] Tue, 18 September 2012 08:00 Go to previous messageGo to next message
Mario Marinato is currently offline Mario Marinato
Messages: 28
Registered: March 2011
Location: Brazil
Junior Member
Yes, we use setSaveAndRestore, and it's working, because when our RCP is restarted the settings are there when you open the dialog.
They are not read properly.


Mário Marinato
From Brazil
Re: Perspective customizations not being respected [message #916069 is a reply to message #916011] Tue, 18 September 2012 09:34 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5256
Registered: July 2009
Senior Member
Please file a bug and post the bug-id here (if there does not exist
already one), my guess is that you can expect a fix in 4.3 only unless
you provide a patch to fix it in 3.8.

Tom

Am 18.09.12 14:01, schrieb Mario Marinato:
> Yes, we use setSaveAndRestore, and it's working, because when our RCP is
> restarted the settings are there when you open the dialog.
> They are not read properly.
Re: Perspective customizations not being respected [message #916214 is a reply to message #916069] Tue, 18 September 2012 14:29 Go to previous message
Mario Marinato is currently offline Mario Marinato
Messages: 28
Registered: March 2011
Location: Brazil
Junior Member
Before filing a bug, I'm trying to discover if we are doing something wrong, because on Eclipse itself this configuration works properly.

Mário Marinato
From Brazil
Previous Topic:org.eclipse.e4.core.di.InjectionException: org.eclipse.core.runtime.AssertionFailedException:
Next Topic:Cut,Copy commands enabledWhen
Goto Forum:
  


Current Time: Wed Jul 30 01:12:29 EDT 2014

Powered by FUDForum. Page generated in 0.49559 seconds