Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » control some initial view settings
control some initial view settings [message #1702644] Thu, 23 July 2015 17:23 Go to next message
Joerg Buchberger is currently offline Joerg BuchbergerFriend
Messages: 46
Registered: July 2009
Member
Hi there

is it possible to predefine the following, using oomph - e.g. in a product setup or project setup?

- define configure contents for problems view (e.g. on selection)
- set package explorer view top level to working sets
- define sequential order of dynamic working sets
- define which perspectives shall be open
- define which views shall be open in which perspective (and their positions)

What can be done with the annotations in the different setup elements?

Cheers
Jörg

Re: control some initial view settings [message #1702688 is a reply to message #1702644] Fri, 24 July 2015 07:01 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
Am 23.07.2015 um 19:23 schrieb Joerg Buchberger:
> Hi there
>
> is it possible to predefine the following, using oomph - e.g. in a product setup or project setup?
>
> - define configure contents for problems view (e.g. on selection)
There's no special task for that. If this information is stored in a specific file you must figure out where that file
lives and how it's structured. Then it's likely possible to use a ResourceCreationTask or TextModifyTask to manipulate
it. If you find it out you should add an entry to https://wiki.eclipse.org/Eclipse_Oomph_Authoring#Tips_and_Tricks ;-)

> - set package explorer view top level to working sets
In oomph.setup we have the following task to do that:

<?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"
content="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xD;&#xA;&lt;section
name=&quot;Workbench&quot;>&#xD;&#xA;&#x9;&lt;section
name=&quot;org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart&quot;>&#xD;&#xA;&#x9;&#x9;&lt;item
value=&quot;true&quot; key=&quot;group_libraries&quot;/>&#xD;&#xA;&#x9;&#x9;&lt;item value=&quot;false&quot;
key=&quot;linkWithEditor&quot;/>&#xD;&#xA;&#x9;&#x9;&lt;item value=&quot;2&quot;
key=&quot;layout&quot;/>&#xD;&#xA;&#x9;&#x9;&lt;item value=&quot;2&quot;
key=&quot;rootMode&quot;/>&#xD;&#xA;&#x9;&#x9;&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;/>&#xD;&#xA;&#x9;&lt;/section>&#xD;&#xA;&lt;/section>&#xD;&#xA;"
targetURL="${workspace.location|uri}/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml"
encoding="UTF-8"/>

Note how the excludedTriggers restrict thistask to the BOOTSTRAP trigger of the installer.

> - define sequential order of dynamic working sets
Same here as for your first question.

> - define which perspectives shall be open
In one of my user products I set the default perspective like so:

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0">
<setup:ResourceCreationTask
id="plugin.customization.ini"
excludedTriggers="STARTUP MANUAL"
content="org.eclipse.ui/defaultPerspectiveId=org.eclipse.papyrus.infra.core.perspective&#xD;&#xA;"
targetURL="${installation.location|uri}/${installation.relativeProductFolder}/plugin_customization.ini"/>
<setup:EclipseIniTask
excludedTriggers="STARTUP MANUAL"
option="-pluginCustomization"
value="${plugin.customization.ini.targetURL|file}"/>
</xmi:XMI>

> - define which views shall be open in which perspective (and their positions)
That's currently not possible with just markup; at least I don't know how. Of course you can build your own small
plugin, implement a PerspectiveFacory, install that plugin with Oomph and then use the trick above to set that
perspective by default.

>
> What can be done with the annotations in the different setup elements?
Most are not (yet) documented. Some are, e.g.,
https://wiki.eclipse.org/Eclipse_Oomph_Authoring#Generating_PDE_Target_Definition_files_.28.2A.target.29_and_their_use_by_Tycho

There are some interfaces that declare annotation constants:

org.eclipse.oomph.base.BaseAnnotationConstants
org.eclipse.oomph.setup.AnnotationConstants
org.eclipse.oomph.setup.EAnnotationConstants

Other annotations are declared directly in the classes that exclusively use them:

org.eclipse.oomph.targlets.internal.core.listeners.PomModulesUpdater
org.eclipse.oomph.targlets.internal.core.listeners.PomArtifactUpdater
org.eclipse.oomph.targlets.internal.core.listeners.TargetDefinitionGenerator

Another way to find the usage of annotations is the Call Hierarchy of these two methods:

org.eclipse.oomph.base.ModelElement.getAnnotations()
org.eclipse.oomph.base.ModelElement.getAnnotation(String)

I hope that helps. If you find the time you could start a new wiki page to collect your findings

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: control some initial view settings [message #1702792 is a reply to message #1702688] Fri, 24 July 2015 15:07 Go to previous messageGo to next message
Joerg Buchberger is currently offline Joerg BuchbergerFriend
Messages: 46
Registered: July 2009
Member
OK, thanks!

I'll put interesting things into Wikis tips and tricks section.

But, I guess I leave most of that fine tuning for later Wink
Starting to get to grips with oomph, thanks to you and Ed.

Have a great weekend!
Jörg

Re: control some initial view settings [message #1745927 is a reply to message #1702792] Wed, 19 October 2016 12:18 Go to previous message
Konrad Windszus is currently offline Konrad WindszusFriend
Messages: 40
Registered: July 2009
Member
How do I achieve the same (working sets as toplevel elements) for the project explorer?
Previous Topic:Edit Preset Variable
Next Topic:How to enable a custom catalogue by default?
Goto Forum:
  


Current Time: Fri Sep 20 08:06:38 GMT 2024

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

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

Back to the top