summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Merks2014-06-01 06:46:26 (EDT)
committerEd Merks2014-06-01 06:47:02 (EDT)
commit9396bf5522ea398442d6e55e545a9edcba9f6665 (patch)
treee32fc75e09ec46cd7f8db7db7736defc42bef0d8
parent2ba1c9183c1d0d2a80c02e54d76f716b7d29d1fe (diff)
downloadorg.eclipse.oomph-9396bf5522ea398442d6e55e545a9edcba9f6665.zip
org.eclipse.oomph-9396bf5522ea398442d6e55e545a9edcba9f6665.tar.gz
org.eclipse.oomph-9396bf5522ea398442d6e55e545a9edcba9f6665.tar.bz2
[435610] Induce variables for scope properties.
-rw-r--r--plugins/org.eclipse.oomph.setup.core/src/org/eclipse/oomph/internal/setup/core/SetupTaskPerformer.java144
-rw-r--r--plugins/org.eclipse.oomph.setup.core/src/org/eclipse/oomph/internal/setup/core/util/ProductCatalogURIHandlerImpl.java50
-rw-r--r--plugins/org.eclipse.oomph.setup.editor/src/org/eclipse/oomph/setup/presentation/SetupEditor.java77
-rw-r--r--plugins/org.eclipse.oomph.setup.git/model/Git.ecore2
-rw-r--r--plugins/org.eclipse.oomph.setup.git/src/org/eclipse/oomph/setup/git/GitCloneTask.java3
-rw-r--r--plugins/org.eclipse.oomph.setup.git/src/org/eclipse/oomph/setup/git/impl/GitCloneTaskImpl.java2
-rw-r--r--plugins/org.eclipse.oomph.setup.git/src/org/eclipse/oomph/setup/git/impl/GitPackageImpl.java4
-rw-r--r--setups/interim/emf.setup21
-rw-r--r--setups/models/Git.ecore2
-rw-r--r--setups/oomph.setup2
-rw-r--r--setups/org.eclipse.setup2
-rw-r--r--setups/product-catalog.setup2
-rw-r--r--setups/project-catalog.setup6
13 files changed, 251 insertions, 66 deletions
diff --git a/plugins/org.eclipse.oomph.setup.core/src/org/eclipse/oomph/internal/setup/core/SetupTaskPerformer.java b/plugins/org.eclipse.oomph.setup.core/src/org/eclipse/oomph/internal/setup/core/SetupTaskPerformer.java
index f4164b0..6d09388 100644
--- a/plugins/org.eclipse.oomph.setup.core/src/org/eclipse/oomph/internal/setup/core/SetupTaskPerformer.java
+++ b/plugins/org.eclipse.oomph.setup.core/src/org/eclipse/oomph/internal/setup/core/SetupTaskPerformer.java
@@ -32,6 +32,7 @@ import org.eclipse.oomph.setup.Project;
import org.eclipse.oomph.setup.ProjectCatalog;
import org.eclipse.oomph.setup.ResourceCopyTask;
import org.eclipse.oomph.setup.Scope;
+import org.eclipse.oomph.setup.ScopeType;
import org.eclipse.oomph.setup.SetupFactory;
import org.eclipse.oomph.setup.SetupPackage;
import org.eclipse.oomph.setup.SetupTask;
@@ -983,18 +984,18 @@ public class SetupTaskPerformer extends AbstractSetupTaskContext
if (!productVersion.eIsProxy())
{
List<Scope> configurableItems = new ArrayList<Scope>();
- List<SetupTaskContainer> setupTaskContainers = new ArrayList<SetupTaskContainer>();
+ List<Scope> scopes = new ArrayList<Scope>();
Product product = productVersion.getProduct();
configurableItems.add(product);
- setupTaskContainers.add(product);
+ scopes.add(product);
ProductCatalog productCatalog = product.getProductCatalog();
configurableItems.add(productCatalog);
- setupTaskContainers.add(0, productCatalog);
+ scopes.add(0, productCatalog);
configurableItems.add(productVersion);
- setupTaskContainers.add(productVersion);
+ scopes.add(productVersion);
if (stream != null)
{
@@ -1004,39 +1005,132 @@ public class SetupTaskPerformer extends AbstractSetupTaskContext
for (; project != null; project = project.getParentProject())
{
configurableItems.add(project);
- setupTaskContainers.add(3, project);
+ scopes.add(3, project);
}
if (projectCatalog != null)
{
configurableItems.add(projectCatalog);
- setupTaskContainers.add(3, projectCatalog);
+ scopes.add(3, projectCatalog);
}
configurableItems.add(stream);
- setupTaskContainers.add(stream);
+ scopes.add(stream);
}
configurableItems.add(installation);
- setupTaskContainers.add(installation);
+ scopes.add(installation);
if (workspace != null)
{
configurableItems.add(workspace);
- setupTaskContainers.add(workspace);
+ scopes.add(workspace);
}
- setupTaskContainers.add(user);
+ scopes.add(user);
- for (SetupTaskContainer setupTaskContainer : setupTaskContainers)
+ String qualifier = null;
+
+ for (Scope scope : scopes)
{
- getSetupTasks(trigger, result, configurableItems, setupTaskContainer);
+ ScopeType type = scope.getType();
+ String name = scope.getName();
+ String label = scope.getLabel();
+ if (label == null)
+ {
+ label = name;
+ }
+
+ String description = scope.getDescription();
+ if (description == null)
+ {
+ description = label;
+ }
+
+ switch (type)
+ {
+ case PRODUCT_CATALOG:
+ {
+ generateScopeVariables(result, "product.catalog", qualifier, name, label, description);
+ qualifier = name;
+ break;
+ }
+ case PRODUCT:
+ {
+ generateScopeVariables(result, "product", qualifier, name, label, description);
+ qualifier += "." + name;
+ break;
+ }
+ case PRODUCT_VERSION:
+ {
+ generateScopeVariables(result, "product.version", qualifier, name, label, description);
+ qualifier = null;
+ break;
+ }
+ case PROJECT_CATALOG:
+ {
+ generateScopeVariables(result, "project.catalog", qualifier, name, label, description);
+ qualifier = name;
+ break;
+ }
+ case PROJECT:
+ {
+ generateScopeVariables(result, "project", qualifier, name, label, description);
+ qualifier += "." + name;
+ break;
+ }
+ case STREAM:
+ {
+ generateScopeVariables(result, "project.stream", qualifier, name, label, description);
+ qualifier = null;
+ break;
+ }
+ case INSTALLATION:
+ {
+ generateScopeVariables(result, "installation", qualifier, name, label, description);
+ break;
+ }
+ case WORKSPACE:
+ {
+ generateScopeVariables(result, "workspace", qualifier, name, label, description);
+ break;
+ }
+ case USER:
+ {
+ generateScopeVariables(result, "user", qualifier, name, label, description);
+ break;
+ }
+ }
+
+ getSetupTasks(trigger, result, configurableItems, scope);
}
}
return result;
}
+ private void generateScopeVariables(EList<SetupTask> setupTasks, String type, String qualifier, String name, String label, String description)
+ {
+ setupTasks.add(createVariable(setupTasks, "scope." + type + ".name", name, null));
+
+ if (qualifier != null)
+ {
+ setupTasks.add(createVariable(setupTasks, "scope." + type + ".name.qualified", qualifier + "." + name, null));
+ }
+
+ setupTasks.add(createVariable(setupTasks, "scope." + type + ".label", label, null));
+ setupTasks.add(createVariable(setupTasks, "scope." + type + ".description", description, null));
+ }
+
+ private VariableTask createVariable(EList<SetupTask> setupTasks, String name, String value, String description)
+ {
+ VariableTask variable = SetupFactory.eINSTANCE.createVariableTask();
+ variable.setName(name);
+ variable.setValue(value);
+ variable.setDescription(description);
+ return variable;
+ }
+
private void getSetupTasks(Trigger trigger, EList<SetupTask> setupTasks, List<Scope> configurableItems, SetupTaskContainer setupTaskContainer)
{
for (SetupTask setupTask : setupTaskContainer.getSetupTasks())
@@ -1698,7 +1792,31 @@ public class SetupTaskPerformer extends AbstractSetupTaskContext
{
recordRules(user.getAttributeRules(), true);
- AdapterFactoryItemDelegator itemDelegator = new AdapterFactoryItemDelegator(adapterFactory);
+ AdapterFactoryItemDelegator itemDelegator = new AdapterFactoryItemDelegator(adapterFactory)
+ {
+ @Override
+ public String getText(Object object)
+ {
+ String result = super.getText(object);
+ if (object instanceof ProjectCatalog)
+ {
+ if (!result.endsWith("Projects"))
+ {
+ result += " Projects";
+ }
+ }
+ else if (object instanceof ProductCatalog)
+ {
+ if (!result.endsWith("Products"))
+ {
+ result += " Products";
+ }
+ }
+
+ return result;
+ }
+ };
+
EList<SetupTask> userSetupTasks = user.getSetupTasks();
if (!unresolvedVariables.isEmpty())
{
diff --git a/plugins/org.eclipse.oomph.setup.core/src/org/eclipse/oomph/internal/setup/core/util/ProductCatalogURIHandlerImpl.java b/plugins/org.eclipse.oomph.setup.core/src/org/eclipse/oomph/internal/setup/core/util/ProductCatalogURIHandlerImpl.java
index 7eeef12..4d383d2 100644
--- a/plugins/org.eclipse.oomph.setup.core/src/org/eclipse/oomph/internal/setup/core/util/ProductCatalogURIHandlerImpl.java
+++ b/plugins/org.eclipse.oomph.setup.core/src/org/eclipse/oomph/internal/setup/core/util/ProductCatalogURIHandlerImpl.java
@@ -59,7 +59,7 @@ public class ProductCatalogURIHandlerImpl extends URIHandlerImpl
{
private static final Date NOW = new Date();
- private static final URI SELF_HOSTED_PRODUCT_CATALOG_URI = URI.createURI("catalog:/self-hosted-product-catalog.setup");
+ private static final URI SELF_PRODUCT_CATALOG_URI = URI.createURI("catalog:/self-product-catalog.setup");
@Override
public boolean canHandle(URI uri)
@@ -70,7 +70,7 @@ public class ProductCatalogURIHandlerImpl extends URIHandlerImpl
@Override
public InputStream createInputStream(URI uri, Map<?, ?> options) throws IOException
{
- if (SELF_HOSTED_PRODUCT_CATALOG_URI.equals(uri))
+ if (SELF_PRODUCT_CATALOG_URI.equals(uri))
{
class ProductCatalogInput extends InputStream implements URIConverter.Loadable
{
@@ -87,7 +87,7 @@ public class ProductCatalogURIHandlerImpl extends URIHandlerImpl
if (in == null)
{
ByteArrayOutputStream out = new ByteArrayOutputStream();
- Resource resource = Resource.Factory.Registry.INSTANCE.getFactory(SELF_HOSTED_PRODUCT_CATALOG_URI).createResource(SELF_HOSTED_PRODUCT_CATALOG_URI);
+ Resource resource = Resource.Factory.Registry.INSTANCE.getFactory(SELF_PRODUCT_CATALOG_URI).createResource(SELF_PRODUCT_CATALOG_URI);
resource.getContents().add(create());
resource.save(out, null);
in = new ByteArrayInputStream(out.toByteArray());
@@ -108,34 +108,34 @@ public class ProductCatalogURIHandlerImpl extends URIHandlerImpl
private ProductCatalog create()
{
ProductCatalog productCatalog = SetupFactory.eINSTANCE.createProductCatalog();
- productCatalog.setName("self.hosted.product.catalog");
- productCatalog.setLabel("Self-hosted Products");
- productCatalog.setDescription("The product catalog for the self hosted product and the empty product");
+ productCatalog.setName("self");
+ productCatalog.setLabel("Self Products");
+ productCatalog.setDescription("The product catalog for the self product and the empty product");
InstallationTask installationTask = SetupFactory.eINSTANCE.createInstallationTask();
installationTask.setID("installation");
productCatalog.getSetupTasks().add(installationTask);
{
- Product selfHostedProduct = SetupFactory.eINSTANCE.createProduct();
- selfHostedProduct.setName("self.hosted.product");
- selfHostedProduct.setLabel("Self-hosted Product");
- selfHostedProduct.setDescription("The self-hosted product");
- productCatalog.getProducts().add(selfHostedProduct);
+ Product selfProduct = SetupFactory.eINSTANCE.createProduct();
+ selfProduct.setName("product");
+ selfProduct.setLabel("Self Product");
+ selfProduct.setDescription("The self product");
+ productCatalog.getProducts().add(selfProduct);
VariableTask variable = SetupFactory.eINSTANCE.createVariableTask();
variable.setName("installation.location");
variable.setValue(SetupContext.PRODUCT_ROOT_LOCATION.toFileString());
- selfHostedProduct.getSetupTasks().add(variable);
+ selfProduct.getSetupTasks().add(variable);
- ProductVersion selfHostedProductVersion = SetupFactory.eINSTANCE.createProductVersion();
- selfHostedProductVersion.setName("self.hosted.product.version");
- selfHostedProductVersion.setLabel("Self-hosted Product Version");
- selfHostedProductVersion.setDescription("The self-hosted product version");
- selfHostedProduct.getVersions().add(selfHostedProductVersion);
+ ProductVersion selfProductVersion = SetupFactory.eINSTANCE.createProductVersion();
+ selfProductVersion.setName("version");
+ selfProductVersion.setLabel("Self Product Version");
+ selfProductVersion.setDescription("The self product version");
+ selfProduct.getVersions().add(selfProductVersion);
- P2Task selfHostedP2Task = SetupP2Factory.eINSTANCE.createP2Task();
- selfHostedProductVersion.getSetupTasks().add(selfHostedP2Task);
+ P2Task selfP2Task = SetupP2Factory.eINSTANCE.createP2Task();
+ selfProductVersion.getSetupTasks().add(selfP2Task);
IProvisioningAgent agent = P2Util.getCurrentProvisioningAgent();
IProfileRegistry profileRegistry = (IProfileRegistry)agent.getService(IProfileRegistry.class.getName());
@@ -144,7 +144,7 @@ public class ProductCatalogURIHandlerImpl extends URIHandlerImpl
{
int xxx; // TODO Use AgentManager
- EList<Requirement> requirements = selfHostedP2Task.getRequirements();
+ EList<Requirement> requirements = selfP2Task.getRequirements();
IQueryResult<IInstallableUnit> query = profile.query(QueryUtil.createIUAnyQuery(), null);
for (IInstallableUnit iu : query)
{
@@ -171,7 +171,7 @@ public class ProductCatalogURIHandlerImpl extends URIHandlerImpl
java.net.URI[] knownRepositories = metadataRepositoryManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
if (knownRepositories.length > 0)
{
- EList<Repository> repositories = selfHostedP2Task.getRepositories();
+ EList<Repository> repositories = selfP2Task.getRepositories();
for (java.net.URI knownRepository : knownRepositories)
{
Repository repository = P2Factory.eINSTANCE.createRepository(knownRepository.toString());
@@ -182,7 +182,7 @@ public class ProductCatalogURIHandlerImpl extends URIHandlerImpl
{
Product emptyProduct = SetupFactory.eINSTANCE.createProduct();
- emptyProduct.setName("self.hosted.empty.product");
+ emptyProduct.setName("empty.product");
emptyProduct.setLabel("Empty Product");
emptyProduct.setDescription("The empty product");
productCatalog.getProducts().add(emptyProduct);
@@ -193,9 +193,9 @@ public class ProductCatalogURIHandlerImpl extends URIHandlerImpl
emptyProduct.getSetupTasks().add(variable);
ProductVersion emptyProductVersion = SetupFactory.eINSTANCE.createProductVersion();
- emptyProductVersion.setName("self.hosted.empty.product.version");
- emptyProductVersion.setLabel("Self-hosted Empty Product Version");
- emptyProductVersion.setDescription("The self-hosted empty product version");
+ emptyProductVersion.setName("version");
+ emptyProductVersion.setLabel("Self Empty Product Version");
+ emptyProductVersion.setDescription("The self empty product version");
emptyProduct.getVersions().add(emptyProductVersion);
P2Task emptyP2Task = SetupP2Factory.eINSTANCE.createP2Task();
diff --git a/plugins/org.eclipse.oomph.setup.editor/src/org/eclipse/oomph/setup/presentation/SetupEditor.java b/plugins/org.eclipse.oomph.setup.editor/src/org/eclipse/oomph/setup/presentation/SetupEditor.java
index dee15a9..0c191ad 100644
--- a/plugins/org.eclipse.oomph.setup.editor/src/org/eclipse/oomph/setup/presentation/SetupEditor.java
+++ b/plugins/org.eclipse.oomph.setup.editor/src/org/eclipse/oomph/setup/presentation/SetupEditor.java
@@ -32,8 +32,10 @@ import org.eclipse.oomph.setup.Trigger;
import org.eclipse.oomph.setup.VariableTask;
import org.eclipse.oomph.setup.provider.SetupItemProviderAdapterFactory;
import org.eclipse.oomph.setup.ui.SetupLabelProvider;
+import org.eclipse.oomph.util.Pair;
import org.eclipse.oomph.util.StringUtil;
+import org.eclipse.emf.common.CommonPlugin;
import org.eclipse.emf.common.command.BasicCommandStack;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CommandStack;
@@ -48,8 +50,10 @@ import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
import org.eclipse.emf.common.ui.viewer.ColumnViewerInformationControlToolTipSupport;
import org.eclipse.emf.common.ui.viewer.IViewerProvider;
import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.SegmentSequence;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EObject;
@@ -170,6 +174,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
+import java.util.Comparator;
import java.util.EventObject;
import java.util.HashMap;
import java.util.HashSet;
@@ -1715,6 +1720,72 @@ public class SetupEditor extends MultiPageEditorPart implements IEditingDomainPr
getTreeViewer().expandToLevel(expandLevel);
}
+ private List<String> sortStrings(Collection<? extends String> strings)
+ {
+ EList<Pair<SegmentSequence, String>> pairs = new BasicEList<Pair<SegmentSequence, String>>();
+ for (String string : strings)
+ {
+ pairs.add(new Pair<SegmentSequence, String>(SegmentSequence.create(".", string), string));
+ }
+
+ @SuppressWarnings("unchecked")
+ Pair<SegmentSequence, String>[] array = pairs.toArray(new Pair[pairs.size()]);
+ return sort(array);
+ }
+
+ private List<VariableTask> sortVariables(Collection<? extends VariableTask> variables)
+ {
+ EList<Pair<SegmentSequence, VariableTask>> pairs = new BasicEList<Pair<SegmentSequence, VariableTask>>();
+ for (VariableTask variable : variables)
+ {
+ pairs.add(new Pair<SegmentSequence, VariableTask>(SegmentSequence.create(".", variable.getName()), variable));
+ }
+
+ @SuppressWarnings("unchecked")
+ Pair<SegmentSequence, VariableTask>[] array = pairs.toArray(new Pair[pairs.size()]);
+ return sort(array);
+ }
+
+ private <T> List<T> sort(Pair<SegmentSequence, T>[] pairs)
+ {
+ Arrays.sort(pairs, new Comparator<Pair<SegmentSequence, T>>()
+ {
+ private final Comparator<String> comparator = CommonPlugin.INSTANCE.getComparator();
+
+ public int compare(Pair<SegmentSequence, T> o1, Pair<SegmentSequence, T> o2)
+ {
+ SegmentSequence s1 = o1.getElement1();
+ SegmentSequence s2 = o2.getElement1();
+ int length1 = s1.segmentCount();
+ int length2 = s2.segmentCount();
+
+ int length = Math.min(length1, length2);
+
+ for (int i = 0; i < length; ++i)
+ {
+ String e1 = s1.segment(i);
+ String e2 = s2.segment(i);
+
+ int result = comparator.compare(e1, e2);
+ if (result != 0)
+ {
+ return result;
+ }
+ }
+
+ return length1 - length2;
+ }
+ });
+
+ List<T> result = new ArrayList<T>(pairs.length);
+ for (Pair<SegmentSequence, T> pair : pairs)
+ {
+ result.add(pair.getElement2());
+ }
+
+ return result;
+ }
+
private ItemProvider getTriggeredTasks(Project project)
{
final ItemProvider projectItem = new ItemProvider(labelProvider.getText(project), labelProvider.getImage(project));
@@ -1768,7 +1839,7 @@ public class SetupEditor extends MultiPageEditorPart implements IEditingDomainPr
ItemProvider undeclaredVariablesItem = new VariableContainer(setupTaskPerformer, "Undeclared Variables", UNDECLARED_VARIABLE_GROUP_IMAGE);
EList<Object> undeclaredVariablesItemChildren = undeclaredVariablesItem.getChildren();
Set<String> undeclaredVariables = setupTaskPerformer.getUndeclaredVariables();
- for (String key : undeclaredVariables)
+ for (String key : sortStrings(undeclaredVariables))
{
VariableTask contextVariableTask = SetupFactory.eINSTANCE.createVariableTask();
contextVariableTask.setName(key);
@@ -1784,7 +1855,7 @@ public class SetupEditor extends MultiPageEditorPart implements IEditingDomainPr
ItemProvider unresolvedVariablesItem = new VariableContainer(setupTaskPerformer, "Unresolved Variables", VARIABLE_GROUP_IMAGE);
EList<Object> unresolvedVariablesItemChildren = unresolvedVariablesItem.getChildren();
List<VariableTask> unresolvedVariables = setupTaskPerformer.getUnresolvedVariables();
- for (VariableTask contextVariableTask : unresolvedVariables)
+ for (VariableTask contextVariableTask : sortVariables(unresolvedVariables))
{
unresolvedVariablesItemChildren.add(contextVariableTask);
parents.put(contextVariableTask, unresolvedVariablesItem);
@@ -1798,7 +1869,7 @@ public class SetupEditor extends MultiPageEditorPart implements IEditingDomainPr
ItemProvider resolvedVariablesItem = new VariableContainer(setupTaskPerformer, "Resolved Variables", VARIABLE_GROUP_IMAGE);
EList<Object> resolvedVariablesItemChildren = resolvedVariablesItem.getChildren();
List<VariableTask> resolvedVariables = setupTaskPerformer.getResolvedVariables();
- for (VariableTask contextVariableTask : resolvedVariables)
+ for (VariableTask contextVariableTask : sortVariables(resolvedVariables))
{
resolvedVariablesItemChildren.add(contextVariableTask);
parents.put(contextVariableTask, resolvedVariablesItem);
diff --git a/plugins/org.eclipse.oomph.setup.git/model/Git.ecore b/plugins/org.eclipse.oomph.setup.git/model/Git.ecore
index 72e32dd..1a04a69 100644
--- a/plugins/org.eclipse.oomph.setup.git/model/Git.ecore
+++ b/plugins/org.eclipse.oomph.setup.git/model/Git.ecore
@@ -49,6 +49,6 @@
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="pushURI" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="checkoutBranch" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" defaultValueLiteral="${scope.project.stream.name}"/>
</eClassifiers>
</ecore:EPackage>
diff --git a/plugins/org.eclipse.oomph.setup.git/src/org/eclipse/oomph/setup/git/GitCloneTask.java b/plugins/org.eclipse.oomph.setup.git/src/org/eclipse/oomph/setup/git/GitCloneTask.java
index 5438e9d..136ecb0 100644
--- a/plugins/org.eclipse.oomph.setup.git/src/org/eclipse/oomph/setup/git/GitCloneTask.java
+++ b/plugins/org.eclipse.oomph.setup.git/src/org/eclipse/oomph/setup/git/GitCloneTask.java
@@ -146,6 +146,7 @@ public interface GitCloneTask extends SetupTask
/**
* Returns the value of the '<em><b>Checkout Branch</b></em>' attribute.
+ * The default value is <code>"${scope.project.stream.name}"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Checkout Branch</em>' attribute isn't clear,
@@ -155,7 +156,7 @@ public interface GitCloneTask extends SetupTask
* @return the value of the '<em>Checkout Branch</em>' attribute.
* @see #setCheckoutBranch(String)
* @see org.eclipse.oomph.setup.git.GitPackage#getGitCloneTask_CheckoutBranch()
- * @model required="true"
+ * @model default="${scope.project.stream.name}" required="true"
* @generated
*/
String getCheckoutBranch();
diff --git a/plugins/org.eclipse.oomph.setup.git/src/org/eclipse/oomph/setup/git/impl/GitCloneTaskImpl.java b/plugins/org.eclipse.oomph.setup.git/src/org/eclipse/oomph/setup/git/impl/GitCloneTaskImpl.java
index 09a3cfa..9a2b17a 100644
--- a/plugins/org.eclipse.oomph.setup.git/src/org/eclipse/oomph/setup/git/impl/GitCloneTaskImpl.java
+++ b/plugins/org.eclipse.oomph.setup.git/src/org/eclipse/oomph/setup/git/impl/GitCloneTaskImpl.java
@@ -170,7 +170,7 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
* @generated
* @ordered
*/
- protected static final String CHECKOUT_BRANCH_EDEFAULT = null;
+ protected static final String CHECKOUT_BRANCH_EDEFAULT = "${scope.project.stream.name}";
/**
* The cached value of the '{@link #getCheckoutBranch() <em>Checkout Branch</em>}' attribute.
diff --git a/plugins/org.eclipse.oomph.setup.git/src/org/eclipse/oomph/setup/git/impl/GitPackageImpl.java b/plugins/org.eclipse.oomph.setup.git/src/org/eclipse/oomph/setup/git/impl/GitPackageImpl.java
index 79be6db..164a969 100644
--- a/plugins/org.eclipse.oomph.setup.git/src/org/eclipse/oomph/setup/git/impl/GitPackageImpl.java
+++ b/plugins/org.eclipse.oomph.setup.git/src/org/eclipse/oomph/setup/git/impl/GitPackageImpl.java
@@ -252,8 +252,8 @@ public class GitPackageImpl extends EPackageImpl implements GitPackage
IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getGitCloneTask_PushURI(), ecorePackage.getEString(), "pushURI", null, 0, 1, GitCloneTask.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
!IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getGitCloneTask_CheckoutBranch(), ecorePackage.getEString(), "checkoutBranch", null, 1, 1, GitCloneTask.class, !IS_TRANSIENT, !IS_VOLATILE,
- IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getGitCloneTask_CheckoutBranch(), ecorePackage.getEString(), "checkoutBranch", "${scope.project.stream.name}", 1, 1, GitCloneTask.class,
+ !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Create resource
createResource("http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Git.ecore");
diff --git a/setups/interim/emf.setup b/setups/interim/emf.setup
index 0dda1f1..be6095c 100644
--- a/setups/interim/emf.setup
+++ b/setups/interim/emf.setup
@@ -12,7 +12,7 @@
xmlns:setup.workingsets="http://www.eclipse.org/oomph/setup/workingsets/1.0"
xmlns:workingsets="http://www.eclipse.org/oomph/workingsets/1.0"
xsi:schemaLocation="http://www.eclipse.org/oomph/setup/git/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Git.ecore http://www.eclipse.org/oomph/setup/jdt/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/JDT.ecore http://www.eclipse.org/oomph/predicates/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Predicates.ecore http://www.eclipse.org/oomph/setup/targlets/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/SetupTarglets.ecore http://www.eclipse.org/oomph/setup/workingsets/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/SetupWorkingSets.ecore http://www.eclipse.org/oomph/workingsets/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/WorkingSets.ecore"
- name="org.eclipse.emf"
+ name="emf"
label="EMF">
<setupTask
xsi:type="jdt:JRETask"
@@ -75,14 +75,9 @@
<description>The release train repository location that will be used to materialize a target platform. EMF and XSD are built and tested with Eclipse 3.5, i.e., Galileo.</description>
</setupTask>
<setupTask
- xsi:type="setup:VariableTask"
- name="branch.name"
- value="master"/>
- <setupTask
xsi:type="git:GitCloneTask"
id="emf.git.clone"
- remoteURI="emf/org.eclipse.emf"
- checkoutBranch="${branch.name}">
+ remoteURI="emf/org.eclipse.emf">
<annotation
source="http://www.eclipse.org/oomph/setup/InducedChoices">
<detail
@@ -113,8 +108,7 @@
<setupTask
xsi:type="git:GitCloneTask"
id="xsd.git.clone"
- remoteURI="xsd/org.eclipse.xsd"
- checkoutBranch="${branch.name}">
+ remoteURI="xsd/org.eclipse.xsd">
<annotation
source="http://www.eclipse.org/oomph/setup/InducedChoices">
<detail
@@ -386,16 +380,17 @@
<stream
name="master"/>
<stream
- name="2.9">
+ name="R2_9_maintenance"
+ label="2.9">
<setupTask
xsi:type="setup:VariableTask"
name="branch.name"
value="R2_9_maintenance"/>
</stream>
- <description>The setup environment for the EMF Core and XSD SDK</description>
+ <description>The development environment for the EMF Core and XSD SDK</description>
</project>
<logicalProjectContainer
xsi:type="setup:ProjectCatalog"
- href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse.projects']"/>
- <description>The setup environments for EMF</description>
+ href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']"/>
+ <description>The development environments for EMF</description>
</setup:Project>
diff --git a/setups/models/Git.ecore b/setups/models/Git.ecore
index a9231ef..0ad2018 100644
--- a/setups/models/Git.ecore
+++ b/setups/models/Git.ecore
@@ -49,6 +49,6 @@
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="pushURI" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="checkoutBranch" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" defaultValueLiteral="${scope.project.stream.name}"/>
</eClassifiers>
</ecore:EPackage>
diff --git a/setups/oomph.setup b/setups/oomph.setup
index 4fe8bf7..504426b 100644
--- a/setups/oomph.setup
+++ b/setups/oomph.setup
@@ -354,5 +354,5 @@
</stream>
<logicalProjectContainer
xsi:type="setup:ProjectCatalog"
- href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse.projects']"/>
+ href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']"/>
</setup:Project>
diff --git a/setups/org.eclipse.setup b/setups/org.eclipse.setup
index 97d0d6c..c903f0c 100644
--- a/setups/org.eclipse.setup
+++ b/setups/org.eclipse.setup
@@ -6,7 +6,7 @@
name="index"
label="index">
<productCatalog
- href="catalog:/self-hosted-product-catalog.setup#/"/>
+ href="catalog:/self-product-catalog.setup#/"/>
<productCatalog
href="product-catalog.setup#/"/>
<projectCatalog
diff --git a/setups/product-catalog.setup b/setups/product-catalog.setup
index 511530e..7482da6 100644
--- a/setups/product-catalog.setup
+++ b/setups/product-catalog.setup
@@ -6,7 +6,7 @@
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
xmlns:setup.p2="http://www.eclipse.org/oomph/setup/p2/1.0"
name="org.eclipse.products"
- label="Eclipse.org Products">
+ label="Eclipse.org">
<setupTask
xsi:type="setup:InstallationTask"
id="installation"/>
diff --git a/setups/project-catalog.setup b/setups/project-catalog.setup
index d9bb1f2..8c5aeea 100644
--- a/setups/project-catalog.setup
+++ b/setups/project-catalog.setup
@@ -4,8 +4,8 @@
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
- name="org.eclipse.projects"
- label="Eclipse.org Projects">
+ name="org.eclipse"
+ label="Eclipse.org">
<setupTask
xsi:type="setup:CompoundTask"
name="Global Variables">
@@ -84,7 +84,7 @@
name="eclipse.git.remoteURIs"
label="Oomph Git Repository">
<choice
- value="ssh://git.eclipse.org/gitroot/@{remoteURI}.git"
+ value="ssh://${git.user.id}@git.eclipse.org/gitroot/@{remoteURI}.git"
label="SSH (read-only, direct)"/>
<choice
value="http://git.eclipse.org/gitroot/@{remoteURI}.git"