|
Re: How to copy file to workspace [message #1702350 is a reply to message #1702321] |
Tue, 21 July 2015 16:23 |
|
Hi Alexandre,
${workspace.location} generally refers to the (implied) "location" attribute of a SetupTask with the ID "workspace".
This task is typically the WorkspaceTask that's automatically triggered when you provision a (Project-) Stream. This
task is not triggered for Product-only installations, which has sometimes struck me as odd because the lack of a
WorkspaceTask means that at first startup time the Workspace Chooser dialog of the IDE comes up instead of just using my
existing WorkspaceLocationRule (see user.setup). Unfortunately it's not as easy as adding a WorkspaceTask to your
Product; it wouldn't work in a Product. I can't remember if there was a compelling reason to not support a WorkspaceTask
in Products; maybe Ed does...
The other day I helped myself with this task in my user.setup, but it would certainly also work in a Product:
<?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="eclipse.preferences.version=1
RECENT_WORKSPACES_PROTOCOL=3
RECENT_WORKSPACES=${installation.location/ws|property}
MAX_RECENT_WORKSPACES=10
SHOW_WORKSPACE_SELECTION_DIALOG=false
"
targetURL="configuration:/.settings/org.eclipse.ui.ide.prefs"/>
Note that:
1) The Bootstrap trigger is excluded.
2) The ${installation.location/ws|property} expression requires the latest Oomph version (or the property filter would
by interpreted as a path segment).
In any case you can do the following things *in* the started IDE:
1) Use ${osgi.instance.area} like all other System properties (have a look at Help -> Installation Details ->
Configuration).
2) Use "platform:/resource/..." URIs.
I hope that helps.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Am 21.07.2015 um 17:10 schrieb Delegue Alexandre:
> Hi,
> I've created a ProductCatalog to create my own eclipse product with a set of plugin and some preferences. I would like
> to copy a file (archetypesInfo.xml) to workspace but I don't know what is the good variable to use. I've tried
> ${workspace.location} but that doesn't work for me. The variable is required by the installer and is not used when
> eclipse start up.
> How could I get the workspace location ? or how can I set an archetype catalogue ?
> Thanks.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04878 seconds