Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Can preferences of views (e.g. "Problems" view) be centralized via OOMPH
Can preferences of views (e.g. "Problems" view) be centralized via OOMPH [message #1842145] Thu, 10 June 2021 08:52 Go to next message
Cristian Spiescu is currently offline Cristian SpiescuFriend
Messages: 100
Registered: July 2009
Senior Member
Hi,

The "preference recorder" is a great tool to enforce common settings among the various Eclipse installations.

However, there are settings that are not available in the "Preferences" screen. For example settings specific to view. Some examples:
* "Problems" view > Show > Errors/Warnings on selection.
* or "right click" on a perspective > Show Text

Is there a technique to find the settings corresponding to the "human" actions above, and then propagate them via OOMPH?

Thanks in advance!

Cristian.
Re: Can preferences of views (e.g. "Problems" view) be centralized via OOMPH [message #1842152 is a reply to message #1842145] Thu, 10 June 2021 13:29 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
These things are not stored as preference but more likely as dialog settings in <workspace>/.metadata/.plugins/*/dialog_settings.xml so brute for searching these is the only way. Then, or example, a setup might have a task like this can be used to preconfigure the package explorer viewer to show working sets initially:
<?xml version="1.0" encoding="UTF-8"?>
<setup:ResourceCreationTask
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    excludedTriggers="STARTUP MANUAL"
    targetURL="${workspace.location|uri}/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml"
    encoding="UTF-8">
  <description>Initialize the Package Explorer to display workings sets.</description>
  <content>
    &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
    &lt;section name=&quot;Workbench&quot;>
    	&lt;section name=&quot;org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart&quot;>
    		&lt;item value=&quot;true&quot; key=&quot;group_libraries&quot;/>
    		&lt;item value=&quot;false&quot; key=&quot;linkWithEditor&quot;/>
    		&lt;item value=&quot;2&quot; key=&quot;layout&quot;/>
    		&lt;item value=&quot;2&quot; key=&quot;rootMode&quot;/>
    		&lt;item value=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;packageExplorer configured=&amp;quot;true&amp;quot; group_libraries=&amp;quot;1&amp;quot; layout=&amp;quot;2&amp;quot; linkWithEditor=&amp;quot;0&amp;quot; rootMode=&amp;quot;2&amp;quot; sortWorkingSets=&amp;quot;false&amp;quot; workingSetName=&amp;quot;&amp;quot;&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;localWorkingSetManager&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;workingSet editPageId=&amp;quot;org.eclipse.jdt.internal.ui.OthersWorkingSet&amp;quot; factoryID=&amp;quot;org.eclipse.ui.internal.WorkingSetFactory&amp;quot; id=&amp;quot;1382792884467_1&amp;quot; label=&amp;quot;Other Projects&amp;quot; name=&amp;quot;Other Projects&amp;quot;/&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;/localWorkingSetManager&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;activeWorkingSet workingSetName=&amp;quot;Other Projects&amp;quot;/&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;allWorkingSets workingSetName=&amp;quot;Other Projects&amp;quot;/&amp;gt;&amp;#x0D;&amp;#x0A;&amp;lt;/packageExplorer&amp;gt;&quot; key=&quot;memento&quot;/>
    	&lt;/section>
    &lt;/section>

  </content>
</setup:ResourceCreationTask>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Can preferences of views (e.g. "Problems" view) be centralized via OOMPH [message #1842153 is a reply to message #1842152] Thu, 10 June 2021 13:39 Go to previous messageGo to next message
Cristian Spiescu is currently offline Cristian SpiescuFriend
Messages: 100
Registered: July 2009
Senior Member
Thanks Ed.

1) Is your example extracted from a file that exists in some Git repo? If yes, may I have the URL? To look eventually for other inspiring tasks?

2) So the process is: I create a snapshot of the workspace. I change the desired setting. I do a diff against the snapshot to see where the info was written. And then create "Resource Creation" tasks. With mode "force = false" => I propagate an initial setting if the user doesn't have anything. Or with mode "force = true" => I enforce my setting. But the granularity is high, and I may break the user's settings. Or try the "Text Modification" task, to insert snippets if they don't exist. Is this correct?

Regards,
Cristian

[Updated on: Thu, 10 June 2021 13:41]

Report message to a moderator

Re: Can preferences of views (e.g. "Problems" view) be centralized via OOMPH [message #1842155 is a reply to message #1842153] Thu, 10 June 2021 14:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Yes, it comes from Oomph's own setup, but you'll find many copies of this. A good way to get inspiration is to use Navigate -> Open Setup -> Parent Models -> Catalog Index Eclipse. This is effective all setups. You'll find all the Eclipse.org and Github projects with setups. And of course you can use Ctrl-F to find things.

And yes, the process is as you describe. Often you can guess which plugin is involved...




Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Can preferences of views (e.g. "Problems" view) be centralized via OOMPH [message #1842193 is a reply to message #1842155] Fri, 11 June 2021 08:31 Go to previous message
Cristian Spiescu is currently offline Cristian SpiescuFriend
Messages: 100
Registered: July 2009
Senior Member
Thank you very much Ed!
Previous Topic:Silent failure of HTTPS authentication in Eclipse Installer
Next Topic:Converting .p2f to P2 Director task
Goto Forum:
  


Current Time: Thu Apr 25 10:36:39 GMT 2024

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

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

Back to the top