[581744] Improve the templates for creating new project setups
https://bugs.eclipse.org/bugs/show_bug.cgi?id=581744
diff --git a/features/org.eclipse.oomph.setup-feature/feature.xml b/features/org.eclipse.oomph.setup-feature/feature.xml
index 3b0c437..31b5b39 100644
--- a/features/org.eclipse.oomph.setup-feature/feature.xml
+++ b/features/org.eclipse.oomph.setup-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.oomph.setup"
label="%featureName"
- version="1.27.0.qualifier"
+ version="1.28.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.oomph.license"
license-feature-version="0.0.0">
diff --git a/features/org.eclipse.oomph.setup-feature/pom.xml b/features/org.eclipse.oomph.setup-feature/pom.xml
index d811ea2..4587faa 100644
--- a/features/org.eclipse.oomph.setup-feature/pom.xml
+++ b/features/org.eclipse.oomph.setup-feature/pom.xml
@@ -20,6 +20,6 @@
</parent>
<groupId>org.eclipse.oomph.features</groupId>
<artifactId>org.eclipse.oomph.setup</artifactId>
- <version>1.27.0-SNAPSHOT</version>
+ <version>1.28.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/features/org.eclipse.oomph.setup.sdk-feature/feature.xml b/features/org.eclipse.oomph.setup.sdk-feature/feature.xml
index d77e5b0..7389e45 100644
--- a/features/org.eclipse.oomph.setup.sdk-feature/feature.xml
+++ b/features/org.eclipse.oomph.setup.sdk-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.oomph.setup.sdk"
label="%featureName"
- version="1.26.0.qualifier"
+ version="1.27.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.oomph.license"
license-feature-version="0.0.0">
diff --git a/features/org.eclipse.oomph.setup.sdk-feature/pom.xml b/features/org.eclipse.oomph.setup.sdk-feature/pom.xml
index 675e4a9..b42d2d2 100644
--- a/features/org.eclipse.oomph.setup.sdk-feature/pom.xml
+++ b/features/org.eclipse.oomph.setup.sdk-feature/pom.xml
@@ -20,6 +20,6 @@
</parent>
<groupId>org.eclipse.oomph.features</groupId>
<artifactId>org.eclipse.oomph.setup.sdk</artifactId>
- <version>1.26.0-SNAPSHOT</version>
+ <version>1.27.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/features/org.eclipse.oomph.setup.ui.ide-feature/feature.xml b/features/org.eclipse.oomph.setup.ui.ide-feature/feature.xml
index 327ff10..02ad8d6 100644
--- a/features/org.eclipse.oomph.setup.ui.ide-feature/feature.xml
+++ b/features/org.eclipse.oomph.setup.ui.ide-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.oomph.setup.ui.ide"
label="%featureName"
- version="1.12.0.qualifier"
+ version="1.13.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.oomph.license"
license-feature-version="0.0.0">
diff --git a/features/org.eclipse.oomph.setup.ui.ide-feature/pom.xml b/features/org.eclipse.oomph.setup.ui.ide-feature/pom.xml
index 06f681e..edfa16f 100644
--- a/features/org.eclipse.oomph.setup.ui.ide-feature/pom.xml
+++ b/features/org.eclipse.oomph.setup.ui.ide-feature/pom.xml
@@ -20,6 +20,6 @@
</parent>
<groupId>org.eclipse.oomph.features</groupId>
<artifactId>org.eclipse.oomph.setup.ui.ide</artifactId>
- <version>1.12.0-SNAPSHOT</version>
+ <version>1.13.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/plugins/org.eclipse.oomph.setup.editor/META-INF/MANIFEST.MF b/plugins/org.eclipse.oomph.setup.editor/META-INF/MANIFEST.MF
index c043738..9d36a8b 100644
--- a/plugins/org.eclipse.oomph.setup.editor/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.oomph.setup.editor/META-INF/MANIFEST.MF
@@ -2,16 +2,16 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.oomph.setup.editor;singleton:=true
-Bundle-Version: 1.24.0.qualifier
+Bundle-Version: 1.25.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.oomph.setup.presentation.SetupEditorPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
-Export-Package: org.eclipse.oomph.setup.editor;version="1.24.0";x-internal:=true,
- org.eclipse.oomph.setup.presentation;version="1.24.0";x-internal:=true,
- org.eclipse.oomph.setup.presentation.handlers;version="1.24.0";x-internal:=true,
- org.eclipse.oomph.setup.presentation.templates;version="1.24.0";x-internal:=true
+Export-Package: org.eclipse.oomph.setup.editor;version="1.25.0";x-internal:=true,
+ org.eclipse.oomph.setup.presentation;version="1.25.0";x-internal:=true,
+ org.eclipse.oomph.setup.presentation.handlers;version="1.25.0";x-internal:=true,
+ org.eclipse.oomph.setup.presentation.templates;version="1.25.0";x-internal:=true
Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
org.eclipse.core.runtime;bundle-version="[3.24.0,4.0.0)",
@@ -27,7 +27,7 @@
org.eclipse.emf.ecore.xmi;bundle-version="[2.10.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.edit.ui;bundle-version="[2.10.0,3.0.0)";visibility:=reexport,
org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.oomph.ui;bundle-version="[1.18.0,2.0.0)",
+ org.eclipse.oomph.ui;bundle-version="[1.19.0,2.0.0)",
org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
org.eclipse.oomph.base.edit;bundle-version="[1.16.0,2.0.0)";visibility:=reexport,
org.eclipse.oomph.setup.p2.edit;bundle-version="[1.15.0,2.0.0)",
diff --git a/plugins/org.eclipse.oomph.setup.editor/pom.xml b/plugins/org.eclipse.oomph.setup.editor/pom.xml
index afd692e..46ee3fa 100644
--- a/plugins/org.eclipse.oomph.setup.editor/pom.xml
+++ b/plugins/org.eclipse.oomph.setup.editor/pom.xml
@@ -20,7 +20,7 @@
</parent>
<groupId>org.eclipse.oomph</groupId>
<artifactId>org.eclipse.oomph.setup.editor</artifactId>
- <version>1.24.0-SNAPSHOT</version>
+ <version>1.25.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
diff --git a/plugins/org.eclipse.oomph.setup.editor/src/org/eclipse/oomph/setup/presentation/templates/GenericSetupTemplate.java b/plugins/org.eclipse.oomph.setup.editor/src/org/eclipse/oomph/setup/presentation/templates/GenericSetupTemplate.java
index 53affec..be11a3b 100644
--- a/plugins/org.eclipse.oomph.setup.editor/src/org/eclipse/oomph/setup/presentation/templates/GenericSetupTemplate.java
+++ b/plugins/org.eclipse.oomph.setup.editor/src/org/eclipse/oomph/setup/presentation/templates/GenericSetupTemplate.java
@@ -468,7 +468,7 @@
{
// The list of choices in the eclipse target platform variable, provide the key information to dynamic update the templates.
VariableTask eclipseTargetPlatformVariable = getVariable(eclipseProjectCatalog, "eclipse.target.platform"); //$NON-NLS-1$
- if (eclipseTargetPlatformVariable != null)
+ if (eclipseTargetPlatformVariable != null && eclipseTargetPlatformVariable.getValue() == null)
{
// Update the product template's product release train choices.
VariableTask productReleaseTrainVariable = getVariable(modelElement, "product.release.train"); //$NON-NLS-1$
@@ -537,41 +537,43 @@
else
{
// Update the modular targlet task with the latest set of available releases.
- EObject projectTargletTask = getTargletTask(modelElement, "Modular Target"); //$NON-NLS-1$
- if (projectTargletTask != null)
+ VariableTask targetPlatformVariable = getVariable(modelElement, "eclipse.target.platform"); //$NON-NLS-1$
+ if (targetPlatformVariable != null && !"${eclipse.target.platform.latest}".equals(targetPlatformVariable.getDefaultValue())) //$NON-NLS-1$
{
- EObject projectTarglet = (EObject)((List<?>)projectTargletTask.eGet(projectTargletTask.eClass().getEStructuralFeature("targlets"))).get(0); //$NON-NLS-1$
- @SuppressWarnings("unchecked")
- List<RepositoryList> repositoryLists = (List<RepositoryList>)projectTarglet.eGet(projectTarglet.eClass().getEStructuralFeature("repositoryLists")); //$NON-NLS-1$
- RepositoryList repositoryList = repositoryLists.get(0);
- repositoryLists.clear();
-
- VariableTask targetPlatformVariable = getVariable(modelElement, "eclipse.target.platform"); //$NON-NLS-1$
-
- for (VariableChoice variableChoice : eclipseTargetPlatformVariable.getChoices())
+ EObject projectTargletTask = getTargletTask(modelElement, "Modular Target"); //$NON-NLS-1$
+ if (projectTargletTask != null)
{
- String trainName = variableChoice.getValue();
- if (!"None".equals(trainName)) //$NON-NLS-1$
+ EObject projectTarglet = (EObject)((List<?>)projectTargletTask.eGet(projectTargletTask.eClass().getEStructuralFeature("targlets"))).get(0); //$NON-NLS-1$
+ @SuppressWarnings("unchecked")
+ List<RepositoryList> repositoryLists = (List<RepositoryList>)projectTarglet.eGet(projectTarglet.eClass().getEStructuralFeature("repositoryLists")); //$NON-NLS-1$
+ RepositoryList repositoryList = repositoryLists.get(0);
+ repositoryLists.clear();
+
+ for (VariableChoice variableChoice : eclipseTargetPlatformVariable.getChoices())
{
- if (targetPlatformVariable != null)
+ String trainName = variableChoice.getValue();
+ if (!"None".equals(trainName)) //$NON-NLS-1$
{
- // Ensure that the default choice is the latest one, and of course do that only once for the first/latest train name.
- targetPlatformVariable.setDefaultValue(trainName);
- targetPlatformVariable = null;
- }
-
- RepositoryList newRepositoryList = EcoreUtil.copy(repositoryList);
- newRepositoryList.setName(trainName);
-
- for (Repository repository : newRepositoryList.getRepositories())
- {
- if (repository.getURL().contains("download.eclipse.org/releases")) //$NON-NLS-1$
+ if (targetPlatformVariable != null)
{
- repository.setURL("https://download.eclipse.org/releases/" + trainName.toLowerCase()); //$NON-NLS-1$
+ // Ensure that the default choice is the latest one, and of course do that only once for the first/latest train name.
+ targetPlatformVariable.setDefaultValue(trainName);
+ targetPlatformVariable = null;
}
- }
- repositoryLists.add(newRepositoryList);
+ RepositoryList newRepositoryList = EcoreUtil.copy(repositoryList);
+ newRepositoryList.setName(trainName);
+
+ for (Repository repository : newRepositoryList.getRepositories())
+ {
+ if (repository.getURL().contains("download.eclipse.org/releases")) //$NON-NLS-1$
+ {
+ repository.setURL("https://download.eclipse.org/releases/" + trainName.toLowerCase()); //$NON-NLS-1$
+ }
+ }
+
+ repositoryLists.add(newRepositoryList);
+ }
}
}
}
@@ -861,6 +863,11 @@
}
else
{
+ if ("project.git.setup.url".equals(variable.getName())) //$NON-NLS-1$
+ {
+ value = expandString(value, usedVariables);
+ }
+
String filters = matcher.group(4);
if (filters != null)
{
@@ -942,8 +949,9 @@
{
try
{
- IProject project = EcorePlugin.getWorkspaceRoot().getProject(new Path(value).segment(0));
- IPath location = project.getLocation();
+ Path fullPath = new Path(value);
+ IContainer container = EcorePlugin.getWorkspaceRoot().getFolder(fullPath);
+ IPath location = container.getLocation();
StringBuilder path = new StringBuilder();
if (location != null)
{
@@ -1022,8 +1030,8 @@
{
URI repositoryURI = URI.createURI(matcher.group(1));
String host = repositoryURI.host();
- List<String> segments = repositoryURI.isHierarchical() ? repositoryURI.segmentsList()
- : URI.createURI(repositoryURI.opaquePart()).segmentsList();
+ List<String> segments = new ArrayList<>(
+ repositoryURI.isHierarchical() ? repositoryURI.segmentsList() : URI.createURI(repositoryURI.opaquePart()).segmentsList());
String firstSegment = segments.get(0);
String lastSegment = segments.get(segments.size() - 1);
List<String> qualifiedName = StringUtil.explode(lastSegment, ".-"); //$NON-NLS-1$
@@ -1052,9 +1060,16 @@
}
else if ("github.com".equals(host)) //$NON-NLS-1$
{
- if ("eclipse".equals(firstSegment)) //$NON-NLS-1$
+ projectRemoteURIs = "github.remoteURIs"; //$NON-NLS-1$
+ String lastNameSegment = qualifiedName.get(qualifiedName.size() - 1);
+ if ("git".equals(lastNameSegment)) //$NON-NLS-1$
{
- projectRemoteURIs = "github.remoteURIs"; //$NON-NLS-1$
+ qualifiedName.remove(qualifiedName.size() - 1);
+ }
+
+ if (lastSegment.endsWith(".git")) //$NON-NLS-1$
+ {
+ segments.set(segments.size() - 1, lastSegment.substring(0, lastSegment.length() - 4));
}
}
diff --git a/plugins/org.eclipse.oomph.setup.editor/templates/@EclipseProjectTemplate@.setup b/plugins/org.eclipse.oomph.setup.editor/templates/@EclipseProjectTemplate@.setup
index d00daa6..c8886ae 100644
--- a/plugins/org.eclipse.oomph.setup.editor/templates/@EclipseProjectTemplate@.setup
+++ b/plugins/org.eclipse.oomph.setup.editor/templates/@EclipseProjectTemplate@.setup
@@ -53,18 +53,45 @@
xsi:type="setup:VariableTask"
name="project.git.path"
value="${project.name}/org.eclipse.${project.name}"
- label="Git path">
+ label="Git Path">
<description>
- The Git path of the project's Eclipse repository.
- It will be expanded depending on the repository URI choice, e.g., 'http://git.eclipse.org/c/<git.path>.git.
+ The Git path of the project's repository.
+ It will be expanded depending on the repository URI choice, e.g., 'http://github.com/<git.path>.git.
+ </description>
+ </setupTask>
+ <setupTask
+ xsi:type="setup:VariableTask"
+ name="project.git.branch"
+ value="master"
+ label="Git Default Branch">
+ <description>
+ The Git branch to check out by default.
+ </description>
+ </setupTask>
+ <setupTask
+ xsi:type="setup:VariableTask"
+ name="project.git.setup.url"
+ value="github.com"
+ label="Git Setup URL">
+ <choice
+ value="https://git.eclipse.org/c/${project.git.path}.git/plain/${setup.location|clonePath}/${setup.filename}"
+ label="git.eclipse.org"/>
+ <choice
+ value="https://raw.githubusercontent.com/${project.git.path}/${project.git.branch}/${setup.location|clonePath}/${setup.filename}"
+ label="github.com"/>
+ <description>
+ The location of the setup file in the Git repository.
</description>
</setupTask>
<setupTask
xsi:type="setup:VariableTask"
name="project.remote.uris"
- value="eclipse.git.remoteURIs"
+ value="github.remoteURIs"
label="Remote URIs">
<choice
+ value="github.remoteURIs"
+ label="GitHub"/>
+ <choice
value="eclipse.git.remoteURIs"
label="Git"/>
<choice
@@ -81,7 +108,7 @@
<setupTask
xsi:type="setup:VariableTask"
name="project.jre"
- value="${jre.location-11}"
+ value="${jre.location-17}"
label="JRE">
<choice
value="${jre.location-1.4}"
@@ -128,6 +155,15 @@
<choice
value="${jre.location-18}"
label="JavaSE-18"/>
+ <choice
+ value="${jre.location-19}"
+ label="JavaSE-19"/>
+ <choice
+ value="${jre.location-20}"
+ label="JavaSE-20"/>
+ <choice
+ value="${jre.location-21}"
+ label="JavaSE-21"/>
<description>Define the JRE needed to compile and run the Java projects of ${scope.project.label}</description>
</setupTask>
<setupTask
@@ -154,22 +190,34 @@
<setupTask
xsi:type="setup:EclipseIniTask"
option="-Xmx"
- value="1024m"
+ value="2048m"
vm="true">
<description>Set the heap space needed to work with the projects of ${scope.project.label}</description>
</setupTask>
<setupTask
xsi:type="setup:ResourceCreationTask"
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">
<description>Initialize JDT's package explorer to show working sets as its root objects</description>
+ <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>
+
+ </content>
</setupTask>
<setupTask
xsi:type="setup:VariableTask"
name="eclipse.target.platform"
- defaultValue="Neon"
+ defaultValue="${eclipse.target.platform.latest}"
storageURI="scope://Workspace"/>
<setupTask
xsi:type="setup.p2:P2Task">
@@ -206,8 +254,7 @@
<setupTask
xsi:type="setup.targlets:TargletTask">
<targlet
- name="${scope.project.label}"
- activeRepositoryList="${eclipse.target.platform}">
+ name="${scope.project.label}">
<requirement
name="org.eclipse.sdk.feature.group"/>
<requirement
@@ -215,52 +262,9 @@
<sourceLocator
rootFolder="$${git.clone.${project.name}.location}"
locateNestedProjects="true"/>
- <repositoryList
- name="Photon">
+ <repositoryList>
<repository
- url="https://download.eclipse.org/releases/photon"/>
- <repository
- url="https://download.eclipse.org/cbi/updates/license"/>
- </repositoryList>
- <repositoryList
- name="Oxygen">
- <repository
- url="https://download.eclipse.org/releases/oxygen"/>
- <repository
- url="https://download.eclipse.org/cbi/updates/license"/>
- </repositoryList>
- <repositoryList
- name="Neon">
- <repository
- url="https://download.eclipse.org/releases/neon"/>
- <repository
- url="https://download.eclipse.org/cbi/updates/license"/>
- </repositoryList>
- <repositoryList
- name="Mars">
- <repository
- url="https://download.eclipse.org/releases/mars"/>
- <repository
- url="https://download.eclipse.org/cbi/updates/license"/>
- </repositoryList>
- <repositoryList
- name="Luna">
- <repository
- url="https://download.eclipse.org/releases/luna"/>
- <repository
- url="https://download.eclipse.org/cbi/updates/license"/>
- </repositoryList>
- <repositoryList
- name="Kepler">
- <repository
- url="https://download.eclipse.org/releases/kepler"/>
- <repository
- url="https://download.eclipse.org/cbi/updates/license"/>
- </repositoryList>
- <repositoryList
- name="Juno">
- <repository
- url="https://download.eclipse.org/releases/juno"/>
+ url="https://download.eclipse.org/releases/${eclipse.target.platform}"/>
<repository
url="https://download.eclipse.org/cbi/updates/license"/>
</repositoryList>
@@ -287,12 +291,12 @@
</workingSet>
<description>The dynamic working sets for ${scope.project.label}</description>
</setupTask>
- <stream name="master"
- label="Master">
+ <stream name="${project.git.branch}"
+ label="${project.git.branch|camel}">
<setupTask
xsi:type="setup:EclipseIniTask"
option="-Doomph.redirection.${project.name}"
- value="=https://git.eclipse.org/c/${project.git.path}.git/plain/${setup.location|clonePath}/${setup.filename}->$${git.clone.${project.name}.location|uri}/${setup.location|clonePath}/${setup.filename}"
+ value="=${project.git.setup.url}->$${git.clone.${project.name}.location|uri}/${setup.location|clonePath}/${setup.filename}"
vm="true">
<annotation
source="http://www.eclipse.org/oomph/setup/FeatureSubstitution">
diff --git a/plugins/org.eclipse.oomph.setup.editor/templates/@GithubProjectTemplate@.setup b/plugins/org.eclipse.oomph.setup.editor/templates/@GithubProjectTemplate@.setup
index d70678d..7986f84 100644
--- a/plugins/org.eclipse.oomph.setup.editor/templates/@GithubProjectTemplate@.setup
+++ b/plugins/org.eclipse.oomph.setup.editor/templates/@GithubProjectTemplate@.setup
@@ -35,7 +35,6 @@
<description>
The lower case name of the project.
The project's qualified name will be prefixed by "com.github.'.
-
</description>
</setupTask>
<setupTask
@@ -61,8 +60,17 @@
</setupTask>
<setupTask
xsi:type="setup:VariableTask"
+ name="project.git.branch"
+ value="master"
+ label="Git Default Branch">
+ <description>
+ The default branch to check of of the Git repository.
+ </description>
+ </setupTask>
+ <setupTask
+ xsi:type="setup:VariableTask"
name="project.jre"
- value="${jre.location-11}"
+ value="${jre.location-17}"
label="JRE">
<choice
value="${jre.location-1.4}"
@@ -109,6 +117,15 @@
<choice
value="${jre.location-18}"
label="JavaSE-18"/>
+ <choice
+ value="${jre.location-19}"
+ label="JavaSE-19"/>
+ <choice
+ value="${jre.location-20}"
+ label="JavaSE-20"/>
+ <choice
+ value="${jre.location-21}"
+ label="JavaSE-21"/>
<description>The JRE needed to build the project and to run the project's tools and tests.</description>
</setupTask>
<setupTask
@@ -135,22 +152,34 @@
<setupTask
xsi:type="setup:EclipseIniTask"
option="-Xmx"
- value="1024m"
+ value="2048m"
vm="true">
<description>Set the heap space needed to work with the projects of ${scope.project.label}</description>
</setupTask>
<setupTask
xsi:type="setup:ResourceCreationTask"
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">
<description>Initialize JDT's package explorer to show working sets as its root objects</description>
+ <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>
+
+ </content>
</setupTask>
<setupTask
xsi:type="setup:VariableTask"
name="eclipse.target.platform"
- defaultValue="Neon"
+ defaultValue="${eclipse.target.platform.latest}"
storageURI="scope://Workspace"/>
<setupTask
xsi:type="setup.p2:P2Task">
@@ -187,8 +216,7 @@
<setupTask
xsi:type="setup.targlets:TargletTask">
<targlet
- name="${scope.project.label}"
- activeRepositoryList="${eclipse.target.platform}">
+ name="${scope.project.label}">
<requirement
name="org.eclipse.sdk.feature.group"/>
<requirement
@@ -196,40 +224,9 @@
<sourceLocator
rootFolder="$${git.clone.${project.name}.location}"
locateNestedProjects="true"/>
- <repositoryList
- name="Photon">
+ <repositoryList>
<repository
- url="https://download.eclipse.org/releases/photon"/>
- </repositoryList>
- <repositoryList
- name="Oxygen">
- <repository
- url="https://download.eclipse.org/releases/oxygen"/>
- </repositoryList>
- <repositoryList
- name="Neon">
- <repository
- url="https://download.eclipse.org/releases/neon"/>
- </repositoryList>
- <repositoryList
- name="Mars">
- <repository
- url="https://download.eclipse.org/releases/mars"/>
- </repositoryList>
- <repositoryList
- name="Luna">
- <repository
- url="https://download.eclipse.org/releases/luna"/>
- </repositoryList>
- <repositoryList
- name="Kepler">
- <repository
- url="https://download.eclipse.org/releases/kepler"/>
- </repositoryList>
- <repositoryList
- name="Juno">
- <repository
- url="https://download.eclipse.org/releases/juno"/>
+ url="https://download.eclipse.org/releases/${eclipse.target.platform}"/>
</repositoryList>
</targlet>
</setupTask>
@@ -254,12 +251,12 @@
</workingSet>
<description>The dynamic working sets for ${scope.project.label}</description>
</setupTask>
- <stream name="master"
- label="Master">
+ <stream name="${project.git.branch}"
+ label="${project.git.branch|camel}">
<setupTask
xsi:type="setup:EclipseIniTask"
option="-Doomph.redirection.${project.name}"
- value="=https://raw.githubusercontent.com/${project.git.path}/master/${setup.location|clonePath}/${setup.filename}->$${git.clone.${project.name}.location|uri}/${setup.location|clonePath}/${setup.filename}"
+ value="=https://raw.githubusercontent.com/${project.git.path}/${project.git.branch}/${setup.location|clonePath}/${setup.filename}->$${git.clone.${project.name}.location|uri}/${setup.location|clonePath}/${setup.filename}"
vm="true">
<annotation
source="http://www.eclipse.org/oomph/setup/FeatureSubstitution">
diff --git a/plugins/org.eclipse.oomph.setup.editor/templates/@SimpleProjectTemplate@.setup b/plugins/org.eclipse.oomph.setup.editor/templates/@SimpleProjectTemplate@.setup
index 47a97c9..41aef2c 100644
--- a/plugins/org.eclipse.oomph.setup.editor/templates/@SimpleProjectTemplate@.setup
+++ b/plugins/org.eclipse.oomph.setup.editor/templates/@SimpleProjectTemplate@.setup
@@ -44,6 +44,13 @@
</setupTask>
<setupTask
xsi:type="setup:VariableTask"
+ name="project.git.branch"
+ value="master"
+ label="Git Default Branch">
+ <description>The default branch branch name.</description>
+ </setupTask>
+ <setupTask
+ xsi:type="setup:VariableTask"
type="CONTAINER"
name="setup.location"
label="Folder">
@@ -57,8 +64,8 @@
<description>The camel case filename of the new project setup model.</description>
</setupTask>
</setupTask>
- <stream name="master"
- label="Master"/>
+ <stream name="${project.git.branch}"
+ label="${project.git.branch|camel}"/>
<logicalProjectContainer
xsi:type="setup:ProjectCatalog"
href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']"/>