Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Switching preferences when switching perspective?(Is it possible to switch preferences when switching perspective?)
Switching preferences when switching perspective? [message #1745124] Wed, 05 October 2016 12:34 Go to next message
Miles Daffin is currently offline Miles DaffinFriend
Messages: 3
Registered: October 2016
Location: United Kingdom
Junior Member
Hi Folks,

Is is possible to associate preference sets with a particular perspective so that switching to this perspective causes a set of preferences to be applied until the user switches to another perspective?

Cheers,

Miles





Re: Switching preferences when switching perspective? [message #1745159 is a reply to message #1745124] Wed, 05 October 2016 20:36 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 685
Registered: January 2012
Senior Member

Not out of the box. You can listen to perspective changes (best to use the E4 model changes: see org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher) and apply your changes before and after.

But unless you're providing a locked down application, where the user cannot customize perspectives, I'd urge you to use a different approach. Just as developers customize their perspectives, and may use a totally different perspective to do work than anticipated, users may not use your carefully groomed perspectives, or use them in different ways.

Brian.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: Switching preferences when switching perspective? [message #1745303 is a reply to message #1745159] Fri, 07 October 2016 11:44 Go to previous messageGo to next message
Miles Daffin is currently offline Miles DaffinFriend
Messages: 3
Registered: October 2016
Location: United Kingdom
Junior Member
Hi Brian,

Thanks for replying. Do you have any alternate suggestions? Some context may help.

We have RCP app that uses a plugin_customisation.ini file in the primary product plugin to apply a bunch of default preferences to various thirdparty plugins that we rely on. We consider that these preferences enhance the usability of the product. Obviously, these defaults only apply when the app is running in stand-alone mode. When people install it into another product from our p2 repo these settings are ignored. So we are looking for a simple way in this context (simple for the user and for us) of switching these suggested defaults on.

Miles

Re: Switching preferences when switching perspective? [message #1745334 is a reply to message #1745303] Fri, 07 October 2016 13:56 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 685
Registered: January 2012
Senior Member

I think you should look at Activities (aka Capabilities in the Preferences). They're not fully implemented in 4.x: I think the filtering/hiding of menu items and toolbar items isn't complete. You can hook into activity switches, and you can also programmatically activate and deactivate activities.

Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:Kepler: Can not exit after -clean
Next Topic:Is there a way to force Accessibility to re-read the active page?
Goto Forum:
  


Current Time: Thu Nov 23 15:17:22 GMT 2017

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

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