|
Re: control some initial view settings [message #1702688 is a reply to message #1702644] |
Fri, 24 July 2015 07:01 |
|
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="<?xml version="1.0" encoding="UTF-8"?>
<section
name="Workbench">
	<section
name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart">
		<item
value="true" key="group_libraries"/>
		<item value="false"
key="linkWithEditor"/>
		<item value="2"
key="layout"/>
		<item value="2"
key="rootMode"/>
		<item value="&lt;?xml version=&quot;1.0&quot;
encoding=&quot;UTF-8&quot;?&gt;&#x0D;&#x0A;&lt;packageExplorer
configured=&quot;true&quot; group_libraries=&quot;1&quot; layout=&quot;2&quot;
linkWithEditor=&quot;0&quot; rootMode=&quot;2&quot; sortWorkingSets=&quot;false&quot;
workingSetName=&quot;&quot;&gt;&#x0D;&#x0A;&lt;localWorkingSetManager&gt;&#x0D;&#x0A;&lt;workingSet
editPageId=&quot;org.eclipse.jdt.internal.ui.OthersWorkingSet&quot;
factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1382792884467_1&quot;
label=&quot;Other Projects&quot; name=&quot;Other
Projects&quot;/&gt;&#x0D;&#x0A;&lt;/localWorkingSetManager&gt;&#x0D;&#x0A;&lt;activeWorkingSet
workingSetName=&quot;Other Projects&quot;/&gt;&#x0D;&#x0A;&lt;allWorkingSets
workingSetName=&quot;Other Projects&quot;/&gt;&#x0D;&#x0A;&lt;/packageExplorer&gt;"
key="memento"/>
	</section>
</section>
"
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
"
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
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03999 seconds