Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig')
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/PreferenceFilter.java146
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/PreferenceProfile.java163
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/Project.java122
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/ProjectConfigFactory.java70
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/ProjectConfigPackage.java897
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/WorkspaceConfiguration.java117
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/PreferenceFilterImpl.java438
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/PreferenceProfileImpl.java498
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectConfigFactoryImpl.java200
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectConfigPackageImpl.java567
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectConfigPlugin.java93
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectConfigURIHandlerImpl.java129
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectImpl.java410
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/WorkspaceConfigurationImpl.java535
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/util/ProjectConfigAdapterFactory.java192
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/util/ProjectConfigSwitch.java188
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/util/ProjectConfigUtil.java290
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/util/ProjectConfigValidator.java263
18 files changed, 5318 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/PreferenceFilter.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/PreferenceFilter.java
new file mode 100644
index 0000000000..2faf5cad1a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/PreferenceFilter.java
@@ -0,0 +1,146 @@
+/**
+ */
+package org.eclipse.emf.cdo.releng.projectconfig;
+
+import java.util.regex.Pattern;
+import org.eclipse.emf.cdo.releng.preferences.PreferenceNode;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Preference Filter</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getPreferenceNode <em>Preference Node</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getPreferenceProfile <em>Preference Profile</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getInclusions <em>Inclusions</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getExclusions <em>Exclusions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getPreferenceFilter()
+ * @model
+ * @generated
+ */
+public interface PreferenceFilter extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Preference Node</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Preference Node</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Preference Node</em>' reference.
+ * @see #setPreferenceNode(PreferenceNode)
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getPreferenceFilter_PreferenceNode()
+ * @model required="true"
+ * @generated
+ */
+ PreferenceNode getPreferenceNode();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getPreferenceNode <em>Preference Node</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Preference Node</em>' reference.
+ * @see #getPreferenceNode()
+ * @generated
+ */
+ void setPreferenceNode(PreferenceNode value);
+
+ /**
+ * Returns the value of the '<em><b>Preference Profile</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getPreferenceFilters <em>Preference Filters</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Preference Profile</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Preference Profile</em>' container reference.
+ * @see #setPreferenceProfile(PreferenceProfile)
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getPreferenceFilter_PreferenceProfile()
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getPreferenceFilters
+ * @model opposite="preferenceFilters" required="true" transient="false"
+ * @generated
+ */
+ PreferenceProfile getPreferenceProfile();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getPreferenceProfile <em>Preference Profile</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Preference Profile</em>' container reference.
+ * @see #getPreferenceProfile()
+ * @generated
+ */
+ void setPreferenceProfile(PreferenceProfile value);
+
+ /**
+ * Returns the value of the '<em><b>Inclusions</b></em>' attribute.
+ * The default value is <code>".*"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Inclusions</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Inclusions</em>' attribute.
+ * @see #setInclusions(Pattern)
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getPreferenceFilter_Inclusions()
+ * @model default=".*" dataType="org.eclipse.emf.cdo.releng.projectconfig.Pattern" required="true"
+ * @generated
+ */
+ Pattern getInclusions();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getInclusions <em>Inclusions</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Inclusions</em>' attribute.
+ * @see #getInclusions()
+ * @generated
+ */
+ void setInclusions(Pattern value);
+
+ /**
+ * Returns the value of the '<em><b>Exclusions</b></em>' attribute.
+ * The default value is <code>""</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Exclusions</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Exclusions</em>' attribute.
+ * @see #setExclusions(Pattern)
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getPreferenceFilter_Exclusions()
+ * @model default="" dataType="org.eclipse.emf.cdo.releng.projectconfig.Pattern" required="true"
+ * @generated
+ */
+ Pattern getExclusions();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getExclusions <em>Exclusions</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Exclusions</em>' attribute.
+ * @see #getExclusions()
+ * @generated
+ */
+ void setExclusions(Pattern value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ boolean matches(String value);
+
+} // PreferenceFilter
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/PreferenceProfile.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/PreferenceProfile.java
new file mode 100644
index 0000000000..9a6a109954
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/PreferenceProfile.java
@@ -0,0 +1,163 @@
+/**
+ */
+package org.eclipse.emf.cdo.releng.projectconfig;
+
+import org.eclipse.emf.cdo.releng.predicates.Predicate;
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Preference Profile</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getPreferenceFilters <em>Preference Filters</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getReferentProjects <em>Referent Projects</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getProject <em>Project</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getPredicates <em>Predicates</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getPrerequisites <em>Prerequisites</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getPreferenceProfile()
+ * @model
+ * @generated
+ */
+public interface PreferenceProfile extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Preference Filters</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getPreferenceProfile <em>Preference Profile</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Preference Filters</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Preference Filters</em>' containment reference list.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getPreferenceProfile_PreferenceFilters()
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getPreferenceProfile
+ * @model opposite="preferenceProfile" containment="true"
+ * @generated
+ */
+ EList<PreferenceFilter> getPreferenceFilters();
+
+ /**
+ * Returns the value of the '<em><b>Referent Projects</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.releng.projectconfig.Project}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.releng.projectconfig.Project#getPreferenceProfileReferences <em>Preference Profile References</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Referent Projects</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Referent Projects</em>' reference list.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getPreferenceProfile_ReferentProjects()
+ * @see org.eclipse.emf.cdo.releng.projectconfig.Project#getPreferenceProfileReferences
+ * @model opposite="preferenceProfileReferences"
+ * @generated
+ */
+ EList<Project> getReferentProjects();
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getPreferenceProfile_Name()
+ * @model required="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Project</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.releng.projectconfig.Project#getPreferenceProfiles <em>Preference Profiles</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Project</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Project</em>' container reference.
+ * @see #setProject(Project)
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getPreferenceProfile_Project()
+ * @see org.eclipse.emf.cdo.releng.projectconfig.Project#getPreferenceProfiles
+ * @model opposite="preferenceProfiles" transient="false"
+ * @generated
+ */
+ Project getProject();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getProject <em>Project</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Project</em>' container reference.
+ * @see #getProject()
+ * @generated
+ */
+ void setProject(Project value);
+
+ /**
+ * Returns the value of the '<em><b>Predicates</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.releng.predicates.Predicate}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Predicates</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Predicates</em>' containment reference list.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getPreferenceProfile_Predicates()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Predicate> getPredicates();
+
+ /**
+ * Returns the value of the '<em><b>Prerequisites</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Requires</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Prerequisites</em>' reference list.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getPreferenceProfile_Prerequisites()
+ * @model
+ * @generated
+ */
+ EList<PreferenceProfile> getPrerequisites();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ boolean requires(PreferenceProfile preferenceProfile);
+
+} // PreferenceProfile
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/Project.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/Project.java
new file mode 100644
index 0000000000..beeb7c4c70
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/Project.java
@@ -0,0 +1,122 @@
+/**
+ */
+package org.eclipse.emf.cdo.releng.projectconfig;
+
+import org.eclipse.emf.cdo.releng.preferences.PreferenceNode;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Project</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.Project#getConfiguration <em>Configuration</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.Project#getPreferenceProfiles <em>Preference Profiles</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.Project#getPreferenceNode <em>Preference Node</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.Project#getPreferenceProfileReferences <em>Preference Profile References</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getProject()
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='AllPreferencesManaged'"
+ * @generated
+ */
+public interface Project extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Configuration</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#getProjects <em>Projects</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Configuration</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Configuration</em>' container reference.
+ * @see #setConfiguration(WorkspaceConfiguration)
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getProject_Configuration()
+ * @see org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#getProjects
+ * @model opposite="projects" required="true" transient="false"
+ * @generated
+ */
+ WorkspaceConfiguration getConfiguration();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.releng.projectconfig.Project#getConfiguration <em>Configuration</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Configuration</em>' container reference.
+ * @see #getConfiguration()
+ * @generated
+ */
+ void setConfiguration(WorkspaceConfiguration value);
+
+ /**
+ * Returns the value of the '<em><b>Preference Profiles</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getProject <em>Project</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Preference Profiles</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Preference Profiles</em>' containment reference list.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getProject_PreferenceProfiles()
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getProject
+ * @model opposite="project" containment="true"
+ * @generated
+ */
+ EList<PreferenceProfile> getPreferenceProfiles();
+
+ /**
+ * Returns the value of the '<em><b>Preference Node</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Preference Node</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Preference Node</em>' reference.
+ * @see #setPreferenceNode(PreferenceNode)
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getProject_PreferenceNode()
+ * @model required="true"
+ * @generated
+ */
+ PreferenceNode getPreferenceNode();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.releng.projectconfig.Project#getPreferenceNode <em>Preference Node</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Preference Node</em>' reference.
+ * @see #getPreferenceNode()
+ * @generated
+ */
+ void setPreferenceNode(PreferenceNode value);
+
+ /**
+ * Returns the value of the '<em><b>Preference Profile References</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getReferentProjects <em>Referent Projects</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Preference Profile References</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Preference Profile References</em>' reference list.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getProject_PreferenceProfileReferences()
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getReferentProjects
+ * @model opposite="referentProjects"
+ * @generated
+ */
+ EList<PreferenceProfile> getPreferenceProfileReferences();
+
+} // Project
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/ProjectConfigFactory.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/ProjectConfigFactory.java
new file mode 100644
index 0000000000..4cef0abab1
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/ProjectConfigFactory.java
@@ -0,0 +1,70 @@
+/**
+ */
+package org.eclipse.emf.cdo.releng.projectconfig;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage
+ * @generated
+ */
+public interface ProjectConfigFactory extends EFactory
+{
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ ProjectConfigFactory eINSTANCE = org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectConfigFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Workspace Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Workspace Configuration</em>'.
+ * @generated
+ */
+ WorkspaceConfiguration createWorkspaceConfiguration();
+
+ /**
+ * Returns a new object of class '<em>Project</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Project</em>'.
+ * @generated
+ */
+ Project createProject();
+
+ /**
+ * Returns a new object of class '<em>Preference Profile</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Preference Profile</em>'.
+ * @generated
+ */
+ PreferenceProfile createPreferenceProfile();
+
+ /**
+ * Returns a new object of class '<em>Preference Filter</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Preference Filter</em>'.
+ * @generated
+ */
+ PreferenceFilter createPreferenceFilter();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ ProjectConfigPackage getProjectConfigPackage();
+
+} //ProjectConfigFactory
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/ProjectConfigPackage.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/ProjectConfigPackage.java
new file mode 100644
index 0000000000..1b92bc04df
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/ProjectConfigPackage.java
@@ -0,0 +1,897 @@
+/**
+ */
+package org.eclipse.emf.cdo.releng.projectconfig;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface ProjectConfigPackage extends EPackage
+{
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "projectconfig";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/CDO/releng/projectconfig/1.0";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "projectconfig";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ ProjectConfigPackage eINSTANCE = org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectConfigPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.releng.projectconfig.impl.WorkspaceConfigurationImpl <em>Workspace Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.WorkspaceConfigurationImpl
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectConfigPackageImpl#getWorkspaceConfiguration()
+ * @generated
+ */
+ int WORKSPACE_CONFIGURATION = 0;
+
+ /**
+ * The feature id for the '<em><b>Projects</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WORKSPACE_CONFIGURATION__PROJECTS = 0;
+
+ /**
+ * The feature id for the '<em><b>Default Preference Node</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WORKSPACE_CONFIGURATION__DEFAULT_PREFERENCE_NODE = 1;
+
+ /**
+ * The feature id for the '<em><b>Instance Preference Node</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WORKSPACE_CONFIGURATION__INSTANCE_PREFERENCE_NODE = 2;
+
+ /**
+ * The number of structural features of the '<em>Workspace Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WORKSPACE_CONFIGURATION_FEATURE_COUNT = 3;
+
+ /**
+ * The operation id for the '<em>Apply Preference Profiles</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WORKSPACE_CONFIGURATION___APPLY_PREFERENCE_PROFILES = 0;
+
+ /**
+ * The operation id for the '<em>Update Preference Profile References</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WORKSPACE_CONFIGURATION___UPDATE_PREFERENCE_PROFILE_REFERENCES = 1;
+
+ /**
+ * The number of operations of the '<em>Workspace Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WORKSPACE_CONFIGURATION_OPERATION_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectImpl <em>Project</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectImpl
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectConfigPackageImpl#getProject()
+ * @generated
+ */
+ int PROJECT = 1;
+
+ /**
+ * The feature id for the '<em><b>Configuration</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROJECT__CONFIGURATION = 0;
+
+ /**
+ * The feature id for the '<em><b>Preference Profiles</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROJECT__PREFERENCE_PROFILES = 1;
+
+ /**
+ * The feature id for the '<em><b>Preference Node</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROJECT__PREFERENCE_NODE = 2;
+
+ /**
+ * The feature id for the '<em><b>Preference Profile References</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROJECT__PREFERENCE_PROFILE_REFERENCES = 3;
+
+ /**
+ * The number of structural features of the '<em>Project</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROJECT_FEATURE_COUNT = 4;
+
+ /**
+ * The number of operations of the '<em>Project</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROJECT_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceProfileImpl <em>Preference Profile</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceProfileImpl
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectConfigPackageImpl#getPreferenceProfile()
+ * @generated
+ */
+ int PREFERENCE_PROFILE = 2;
+
+ /**
+ * The feature id for the '<em><b>Preference Filters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREFERENCE_PROFILE__PREFERENCE_FILTERS = 0;
+
+ /**
+ * The feature id for the '<em><b>Referent Projects</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREFERENCE_PROFILE__REFERENT_PROJECTS = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREFERENCE_PROFILE__NAME = 2;
+
+ /**
+ * The feature id for the '<em><b>Project</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREFERENCE_PROFILE__PROJECT = 3;
+
+ /**
+ * The feature id for the '<em><b>Predicates</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREFERENCE_PROFILE__PREDICATES = 4;
+
+ /**
+ * The feature id for the '<em><b>Prerequisites</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREFERENCE_PROFILE__PREREQUISITES = 5;
+
+ /**
+ * The number of structural features of the '<em>Preference Profile</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREFERENCE_PROFILE_FEATURE_COUNT = 6;
+
+ /**
+ * The operation id for the '<em>Requires</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREFERENCE_PROFILE___REQUIRES__PREFERENCEPROFILE = 0;
+
+ /**
+ * The number of operations of the '<em>Preference Profile</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREFERENCE_PROFILE_OPERATION_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceFilterImpl <em>Preference Filter</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceFilterImpl
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectConfigPackageImpl#getPreferenceFilter()
+ * @generated
+ */
+ int PREFERENCE_FILTER = 3;
+
+ /**
+ * The feature id for the '<em><b>Preference Node</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREFERENCE_FILTER__PREFERENCE_NODE = 0;
+
+ /**
+ * The feature id for the '<em><b>Preference Profile</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREFERENCE_FILTER__PREFERENCE_PROFILE = 1;
+
+ /**
+ * The feature id for the '<em><b>Inclusions</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREFERENCE_FILTER__INCLUSIONS = 2;
+
+ /**
+ * The feature id for the '<em><b>Exclusions</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREFERENCE_FILTER__EXCLUSIONS = 3;
+
+ /**
+ * The number of structural features of the '<em>Preference Filter</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREFERENCE_FILTER_FEATURE_COUNT = 4;
+
+ /**
+ * The operation id for the '<em>Matches</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREFERENCE_FILTER___MATCHES__STRING = 0;
+
+ /**
+ * The number of operations of the '<em>Preference Filter</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREFERENCE_FILTER_OPERATION_COUNT = 1;
+
+
+ /**
+ * The meta object id for the '<em>Pattern</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.regex.Pattern
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectConfigPackageImpl#getPattern()
+ * @generated
+ */
+ int PATTERN = 4;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration <em>Workspace Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Workspace Configuration</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration
+ * @generated
+ */
+ EClass getWorkspaceConfiguration();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#getProjects <em>Projects</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Projects</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#getProjects()
+ * @see #getWorkspaceConfiguration()
+ * @generated
+ */
+ EReference getWorkspaceConfiguration_Projects();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#getDefaultPreferenceNode <em>Default Preference Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Default Preference Node</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#getDefaultPreferenceNode()
+ * @see #getWorkspaceConfiguration()
+ * @generated
+ */
+ EReference getWorkspaceConfiguration_DefaultPreferenceNode();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#getInstancePreferenceNode <em>Instance Preference Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Instance Preference Node</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#getInstancePreferenceNode()
+ * @see #getWorkspaceConfiguration()
+ * @generated
+ */
+ EReference getWorkspaceConfiguration_InstancePreferenceNode();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#applyPreferenceProfiles() <em>Apply Preference Profiles</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the '<em>Apply Preference Profiles</em>' operation.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#applyPreferenceProfiles()
+ * @generated
+ */
+ EOperation getWorkspaceConfiguration__ApplyPreferenceProfiles();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#updatePreferenceProfileReferences() <em>Update Preference Profile References</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the '<em>Update Preference Profile References</em>' operation.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#updatePreferenceProfileReferences()
+ * @generated
+ */
+ EOperation getWorkspaceConfiguration__UpdatePreferenceProfileReferences();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.releng.projectconfig.Project <em>Project</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Project</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.Project
+ * @generated
+ */
+ EClass getProject();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.releng.projectconfig.Project#getConfiguration <em>Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Configuration</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.Project#getConfiguration()
+ * @see #getProject()
+ * @generated
+ */
+ EReference getProject_Configuration();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.releng.projectconfig.Project#getPreferenceProfiles <em>Preference Profiles</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Preference Profiles</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.Project#getPreferenceProfiles()
+ * @see #getProject()
+ * @generated
+ */
+ EReference getProject_PreferenceProfiles();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.releng.projectconfig.Project#getPreferenceNode <em>Preference Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Preference Node</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.Project#getPreferenceNode()
+ * @see #getProject()
+ * @generated
+ */
+ EReference getProject_PreferenceNode();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.releng.projectconfig.Project#getPreferenceProfileReferences <em>Preference Profile References</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Preference Profile References</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.Project#getPreferenceProfileReferences()
+ * @see #getProject()
+ * @generated
+ */
+ EReference getProject_PreferenceProfileReferences();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile <em>Preference Profile</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Preference Profile</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile
+ * @generated
+ */
+ EClass getPreferenceProfile();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getPreferenceFilters <em>Preference Filters</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Preference Filters</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getPreferenceFilters()
+ * @see #getPreferenceProfile()
+ * @generated
+ */
+ EReference getPreferenceProfile_PreferenceFilters();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getReferentProjects <em>Referent Projects</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Referent Projects</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getReferentProjects()
+ * @see #getPreferenceProfile()
+ * @generated
+ */
+ EReference getPreferenceProfile_ReferentProjects();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getName()
+ * @see #getPreferenceProfile()
+ * @generated
+ */
+ EAttribute getPreferenceProfile_Name();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getProject <em>Project</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Project</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getProject()
+ * @see #getPreferenceProfile()
+ * @generated
+ */
+ EReference getPreferenceProfile_Project();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getPredicates <em>Predicates</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Predicates</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getPredicates()
+ * @see #getPreferenceProfile()
+ * @generated
+ */
+ EReference getPreferenceProfile_Predicates();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getPrerequisites <em>Prerequisites</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Prerequisites</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#getPrerequisites()
+ * @see #getPreferenceProfile()
+ * @generated
+ */
+ EReference getPreferenceProfile_Prerequisites();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#requires(org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile) <em>Requires</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the '<em>Requires</em>' operation.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile#requires(org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile)
+ * @generated
+ */
+ EOperation getPreferenceProfile__Requires__PreferenceProfile();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter <em>Preference Filter</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Preference Filter</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter
+ * @generated
+ */
+ EClass getPreferenceFilter();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getPreferenceNode <em>Preference Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Preference Node</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getPreferenceNode()
+ * @see #getPreferenceFilter()
+ * @generated
+ */
+ EReference getPreferenceFilter_PreferenceNode();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getPreferenceProfile <em>Preference Profile</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Preference Profile</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getPreferenceProfile()
+ * @see #getPreferenceFilter()
+ * @generated
+ */
+ EReference getPreferenceFilter_PreferenceProfile();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getInclusions <em>Inclusions</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Inclusions</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getInclusions()
+ * @see #getPreferenceFilter()
+ * @generated
+ */
+ EAttribute getPreferenceFilter_Inclusions();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getExclusions <em>Exclusions</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Exclusions</em>'.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#getExclusions()
+ * @see #getPreferenceFilter()
+ * @generated
+ */
+ EAttribute getPreferenceFilter_Exclusions();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#matches(java.lang.String) <em>Matches</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the '<em>Matches</em>' operation.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter#matches(java.lang.String)
+ * @generated
+ */
+ EOperation getPreferenceFilter__Matches__String();
+
+ /**
+ * Returns the meta object for data type '{@link java.util.regex.Pattern <em>Pattern</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>Pattern</em>'.
+ * @see java.util.regex.Pattern
+ * @model instanceClass="java.util.regex.Pattern"
+ * @generated
+ */
+ EDataType getPattern();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ ProjectConfigFactory getProjectConfigFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals
+ {
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.releng.projectconfig.impl.WorkspaceConfigurationImpl <em>Workspace Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.WorkspaceConfigurationImpl
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectConfigPackageImpl#getWorkspaceConfiguration()
+ * @generated
+ */
+ EClass WORKSPACE_CONFIGURATION = eINSTANCE.getWorkspaceConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Projects</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference WORKSPACE_CONFIGURATION__PROJECTS = eINSTANCE.getWorkspaceConfiguration_Projects();
+
+ /**
+ * The meta object literal for the '<em><b>Default Preference Node</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference WORKSPACE_CONFIGURATION__DEFAULT_PREFERENCE_NODE = eINSTANCE.getWorkspaceConfiguration_DefaultPreferenceNode();
+
+ /**
+ * The meta object literal for the '<em><b>Instance Preference Node</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference WORKSPACE_CONFIGURATION__INSTANCE_PREFERENCE_NODE = eINSTANCE.getWorkspaceConfiguration_InstancePreferenceNode();
+
+ /**
+ * The meta object literal for the '<em><b>Apply Preference Profiles</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EOperation WORKSPACE_CONFIGURATION___APPLY_PREFERENCE_PROFILES = eINSTANCE.getWorkspaceConfiguration__ApplyPreferenceProfiles();
+
+ /**
+ * The meta object literal for the '<em><b>Update Preference Profile References</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EOperation WORKSPACE_CONFIGURATION___UPDATE_PREFERENCE_PROFILE_REFERENCES = eINSTANCE.getWorkspaceConfiguration__UpdatePreferenceProfileReferences();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectImpl <em>Project</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectImpl
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectConfigPackageImpl#getProject()
+ * @generated
+ */
+ EClass PROJECT = eINSTANCE.getProject();
+
+ /**
+ * The meta object literal for the '<em><b>Configuration</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PROJECT__CONFIGURATION = eINSTANCE.getProject_Configuration();
+
+ /**
+ * The meta object literal for the '<em><b>Preference Profiles</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PROJECT__PREFERENCE_PROFILES = eINSTANCE.getProject_PreferenceProfiles();
+
+ /**
+ * The meta object literal for the '<em><b>Preference Node</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PROJECT__PREFERENCE_NODE = eINSTANCE.getProject_PreferenceNode();
+
+ /**
+ * The meta object literal for the '<em><b>Preference Profile References</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PROJECT__PREFERENCE_PROFILE_REFERENCES = eINSTANCE.getProject_PreferenceProfileReferences();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceProfileImpl <em>Preference Profile</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceProfileImpl
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectConfigPackageImpl#getPreferenceProfile()
+ * @generated
+ */
+ EClass PREFERENCE_PROFILE = eINSTANCE.getPreferenceProfile();
+
+ /**
+ * The meta object literal for the '<em><b>Preference Filters</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PREFERENCE_PROFILE__PREFERENCE_FILTERS = eINSTANCE.getPreferenceProfile_PreferenceFilters();
+
+ /**
+ * The meta object literal for the '<em><b>Referent Projects</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PREFERENCE_PROFILE__REFERENT_PROJECTS = eINSTANCE.getPreferenceProfile_ReferentProjects();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PREFERENCE_PROFILE__NAME = eINSTANCE.getPreferenceProfile_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Project</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PREFERENCE_PROFILE__PROJECT = eINSTANCE.getPreferenceProfile_Project();
+
+ /**
+ * The meta object literal for the '<em><b>Predicates</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PREFERENCE_PROFILE__PREDICATES = eINSTANCE.getPreferenceProfile_Predicates();
+
+ /**
+ * The meta object literal for the '<em><b>Prerequisites</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PREFERENCE_PROFILE__PREREQUISITES = eINSTANCE.getPreferenceProfile_Prerequisites();
+
+ /**
+ * The meta object literal for the '<em><b>Requires</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EOperation PREFERENCE_PROFILE___REQUIRES__PREFERENCEPROFILE = eINSTANCE.getPreferenceProfile__Requires__PreferenceProfile();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceFilterImpl <em>Preference Filter</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceFilterImpl
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectConfigPackageImpl#getPreferenceFilter()
+ * @generated
+ */
+ EClass PREFERENCE_FILTER = eINSTANCE.getPreferenceFilter();
+
+ /**
+ * The meta object literal for the '<em><b>Preference Node</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PREFERENCE_FILTER__PREFERENCE_NODE = eINSTANCE.getPreferenceFilter_PreferenceNode();
+
+ /**
+ * The meta object literal for the '<em><b>Preference Profile</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PREFERENCE_FILTER__PREFERENCE_PROFILE = eINSTANCE.getPreferenceFilter_PreferenceProfile();
+
+ /**
+ * The meta object literal for the '<em><b>Inclusions</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PREFERENCE_FILTER__INCLUSIONS = eINSTANCE.getPreferenceFilter_Inclusions();
+
+ /**
+ * The meta object literal for the '<em><b>Exclusions</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PREFERENCE_FILTER__EXCLUSIONS = eINSTANCE.getPreferenceFilter_Exclusions();
+
+ /**
+ * The meta object literal for the '<em><b>Matches</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EOperation PREFERENCE_FILTER___MATCHES__STRING = eINSTANCE.getPreferenceFilter__Matches__String();
+
+ /**
+ * The meta object literal for the '<em>Pattern</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.regex.Pattern
+ * @see org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectConfigPackageImpl#getPattern()
+ * @generated
+ */
+ EDataType PATTERN = eINSTANCE.getPattern();
+
+ }
+
+} //ProjectConfigPackage
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/WorkspaceConfiguration.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/WorkspaceConfiguration.java
new file mode 100644
index 0000000000..f473506672
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/WorkspaceConfiguration.java
@@ -0,0 +1,117 @@
+/**
+ */
+package org.eclipse.emf.cdo.releng.projectconfig;
+
+import org.eclipse.emf.cdo.releng.preferences.PreferenceNode;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Workspace Configuration</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#getProjects <em>Projects</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#getDefaultPreferenceNode <em>Default Preference Node</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#getInstancePreferenceNode <em>Instance Preference Node</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getWorkspaceConfiguration()
+ * @model
+ * @generated
+ */
+public interface WorkspaceConfiguration extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Projects</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.releng.projectconfig.Project}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.releng.projectconfig.Project#getConfiguration <em>Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Projects</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Projects</em>' containment reference list.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getWorkspaceConfiguration_Projects()
+ * @see org.eclipse.emf.cdo.releng.projectconfig.Project#getConfiguration
+ * @model opposite="configuration" containment="true"
+ * @generated
+ */
+ EList<Project> getProjects();
+
+ /**
+ * Returns the value of the '<em><b>Default Preference Node</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Default Preference Node</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Default Preference Node</em>' reference.
+ * @see #setDefaultPreferenceNode(PreferenceNode)
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getWorkspaceConfiguration_DefaultPreferenceNode()
+ * @model required="true"
+ * @generated
+ */
+ PreferenceNode getDefaultPreferenceNode();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#getDefaultPreferenceNode <em>Default Preference Node</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Default Preference Node</em>' reference.
+ * @see #getDefaultPreferenceNode()
+ * @generated
+ */
+ void setDefaultPreferenceNode(PreferenceNode value);
+
+ /**
+ * Returns the value of the '<em><b>Instance Preference Node</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Instance Preference Node</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Instance Preference Node</em>' reference.
+ * @see #setInstancePreferenceNode(PreferenceNode)
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#getWorkspaceConfiguration_InstancePreferenceNode()
+ * @model required="true"
+ * @generated
+ */
+ PreferenceNode getInstancePreferenceNode();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration#getInstancePreferenceNode <em>Instance Preference Node</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Instance Preference Node</em>' reference.
+ * @see #getInstancePreferenceNode()
+ * @generated
+ */
+ void setInstancePreferenceNode(PreferenceNode value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ void applyPreferenceProfiles();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ void updatePreferenceProfileReferences();
+
+} // WorkspaceConfiguration
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/PreferenceFilterImpl.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/PreferenceFilterImpl.java
new file mode 100644
index 0000000000..f147be70e8
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/PreferenceFilterImpl.java
@@ -0,0 +1,438 @@
+/**
+ */
+package org.eclipse.emf.cdo.releng.projectconfig.impl;
+
+import org.eclipse.emf.cdo.releng.preferences.PreferenceNode;
+import org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter;
+import org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile;
+import org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigFactory;
+import org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.regex.Pattern;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Preference Filter</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceFilterImpl#getPreferenceNode <em>Preference Node</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceFilterImpl#getPreferenceProfile <em>Preference Profile</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceFilterImpl#getInclusions <em>Inclusions</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceFilterImpl#getExclusions <em>Exclusions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PreferenceFilterImpl extends MinimalEObjectImpl.Container implements PreferenceFilter
+{
+ /**
+ * The cached value of the '{@link #getPreferenceNode() <em>Preference Node</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPreferenceNode()
+ * @generated
+ * @ordered
+ */
+ protected PreferenceNode preferenceNode;
+
+ /**
+ * The default value of the '{@link #getInclusions() <em>Inclusions</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInclusions()
+ * @generated
+ * @ordered
+ */
+ protected static final Pattern INCLUSIONS_EDEFAULT = (Pattern)ProjectConfigFactory.eINSTANCE.createFromString(ProjectConfigPackage.eINSTANCE.getPattern(), ".*");
+
+ /**
+ * The cached value of the '{@link #getInclusions() <em>Inclusions</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInclusions()
+ * @generated
+ * @ordered
+ */
+ protected Pattern inclusions = INCLUSIONS_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getExclusions() <em>Exclusions</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExclusions()
+ * @generated
+ * @ordered
+ */
+ protected static final Pattern EXCLUSIONS_EDEFAULT = (Pattern)ProjectConfigFactory.eINSTANCE.createFromString(ProjectConfigPackage.eINSTANCE.getPattern(), "");
+
+ /**
+ * The cached value of the '{@link #getExclusions() <em>Exclusions</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExclusions()
+ * @generated
+ * @ordered
+ */
+ protected Pattern exclusions = EXCLUSIONS_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PreferenceFilterImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ProjectConfigPackage.Literals.PREFERENCE_FILTER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PreferenceNode getPreferenceNode()
+ {
+ if (preferenceNode != null && preferenceNode.eIsProxy())
+ {
+ InternalEObject oldPreferenceNode = (InternalEObject)preferenceNode;
+ preferenceNode = (PreferenceNode)eResolveProxy(oldPreferenceNode);
+ if (preferenceNode != oldPreferenceNode)
+ {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_NODE, oldPreferenceNode, preferenceNode));
+ }
+ }
+ return preferenceNode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PreferenceNode basicGetPreferenceNode()
+ {
+ return preferenceNode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPreferenceNode(PreferenceNode newPreferenceNode)
+ {
+ PreferenceNode oldPreferenceNode = preferenceNode;
+ preferenceNode = newPreferenceNode;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_NODE, oldPreferenceNode, preferenceNode));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PreferenceProfile getPreferenceProfile()
+ {
+ if (eContainerFeatureID() != ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_PROFILE) return null;
+ return (PreferenceProfile)eInternalContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetPreferenceProfile(PreferenceProfile newPreferenceProfile, NotificationChain msgs)
+ {
+ msgs = eBasicSetContainer((InternalEObject)newPreferenceProfile, ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_PROFILE, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPreferenceProfile(PreferenceProfile newPreferenceProfile)
+ {
+ if (newPreferenceProfile != eInternalContainer() || (eContainerFeatureID() != ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_PROFILE && newPreferenceProfile != null))
+ {
+ if (EcoreUtil.isAncestor(this, newPreferenceProfile))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newPreferenceProfile != null)
+ msgs = ((InternalEObject)newPreferenceProfile).eInverseAdd(this, ProjectConfigPackage.PREFERENCE_PROFILE__PREFERENCE_FILTERS, PreferenceProfile.class, msgs);
+ msgs = basicSetPreferenceProfile(newPreferenceProfile, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_PROFILE, newPreferenceProfile, newPreferenceProfile));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Pattern getInclusions()
+ {
+ return inclusions;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInclusions(Pattern newInclusions)
+ {
+ Pattern oldInclusions = inclusions;
+ inclusions = newInclusions;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProjectConfigPackage.PREFERENCE_FILTER__INCLUSIONS, oldInclusions, inclusions));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Pattern getExclusions()
+ {
+ return exclusions;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExclusions(Pattern newExclusions)
+ {
+ Pattern oldExclusions = exclusions;
+ exclusions = newExclusions;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProjectConfigPackage.PREFERENCE_FILTER__EXCLUSIONS, oldExclusions, exclusions));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public boolean matches(String value)
+ {
+ return getInclusions().matcher(value).matches() && !getExclusions().matcher(value).matches();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_PROFILE:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetPreferenceProfile((PreferenceProfile)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_PROFILE:
+ return basicSetPreferenceProfile(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+ {
+ switch (eContainerFeatureID())
+ {
+ case ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_PROFILE:
+ return eInternalContainer().eInverseRemove(this, ProjectConfigPackage.PREFERENCE_PROFILE__PREFERENCE_FILTERS, PreferenceProfile.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_NODE:
+ if (resolve) return getPreferenceNode();
+ return basicGetPreferenceNode();
+ case ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_PROFILE:
+ return getPreferenceProfile();
+ case ProjectConfigPackage.PREFERENCE_FILTER__INCLUSIONS:
+ return getInclusions();
+ case ProjectConfigPackage.PREFERENCE_FILTER__EXCLUSIONS:
+ return getExclusions();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_NODE:
+ setPreferenceNode((PreferenceNode)newValue);
+ return;
+ case ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_PROFILE:
+ setPreferenceProfile((PreferenceProfile)newValue);
+ return;
+ case ProjectConfigPackage.PREFERENCE_FILTER__INCLUSIONS:
+ setInclusions((Pattern)newValue);
+ return;
+ case ProjectConfigPackage.PREFERENCE_FILTER__EXCLUSIONS:
+ setExclusions((Pattern)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_NODE:
+ setPreferenceNode((PreferenceNode)null);
+ return;
+ case ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_PROFILE:
+ setPreferenceProfile((PreferenceProfile)null);
+ return;
+ case ProjectConfigPackage.PREFERENCE_FILTER__INCLUSIONS:
+ setInclusions(INCLUSIONS_EDEFAULT);
+ return;
+ case ProjectConfigPackage.PREFERENCE_FILTER__EXCLUSIONS:
+ setExclusions(EXCLUSIONS_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_NODE:
+ return preferenceNode != null;
+ case ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_PROFILE:
+ return getPreferenceProfile() != null;
+ case ProjectConfigPackage.PREFERENCE_FILTER__INCLUSIONS:
+ return INCLUSIONS_EDEFAULT == null ? inclusions != null : !INCLUSIONS_EDEFAULT.equals(inclusions);
+ case ProjectConfigPackage.PREFERENCE_FILTER__EXCLUSIONS:
+ return EXCLUSIONS_EDEFAULT == null ? exclusions != null : !EXCLUSIONS_EDEFAULT.equals(exclusions);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException
+ {
+ switch (operationID)
+ {
+ case ProjectConfigPackage.PREFERENCE_FILTER___MATCHES__STRING:
+ return matches((String)arguments.get(0));
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (inclusions: ");
+ result.append(inclusions);
+ result.append(", exclusions: ");
+ result.append(exclusions);
+ result.append(')');
+ return result.toString();
+ }
+
+} // PreferenceFilterImpl
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/PreferenceProfileImpl.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/PreferenceProfileImpl.java
new file mode 100644
index 0000000000..ea07f383be
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/PreferenceProfileImpl.java
@@ -0,0 +1,498 @@
+/**
+ */
+package org.eclipse.emf.cdo.releng.projectconfig.impl;
+
+import org.eclipse.emf.cdo.releng.predicates.Predicate;
+import org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter;
+import org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile;
+import org.eclipse.emf.cdo.releng.projectconfig.Project;
+import org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Preference Profile</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceProfileImpl#getPreferenceFilters <em>Preference Filters</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceProfileImpl#getReferentProjects <em>Referent Projects</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceProfileImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceProfileImpl#getProject <em>Project</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceProfileImpl#getPredicates <em>Predicates</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.PreferenceProfileImpl#getPrerequisites <em>Prerequisites</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PreferenceProfileImpl extends MinimalEObjectImpl.Container implements PreferenceProfile
+{
+ /**
+ * The cached value of the '{@link #getPreferenceFilters() <em>Preference Filters</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPreferenceFilters()
+ * @generated
+ * @ordered
+ */
+ protected EList<PreferenceFilter> preferenceFilters;
+
+ /**
+ * The cached value of the '{@link #getReferentProjects() <em>Referent Projects</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getReferentProjects()
+ * @generated
+ * @ordered
+ */
+ protected EList<Project> referentProjects;
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getPredicates() <em>Predicates</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPredicates()
+ * @generated
+ * @ordered
+ */
+ protected EList<Predicate> predicates;
+
+ /**
+ * The cached value of the '{@link #getPrerequisites() <em>Prerequisites</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPrerequisites()
+ * @generated
+ * @ordered
+ */
+ protected EList<PreferenceProfile> prerequisites;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PreferenceProfileImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ProjectConfigPackage.Literals.PREFERENCE_PROFILE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PreferenceFilter> getPreferenceFilters()
+ {
+ if (preferenceFilters == null)
+ {
+ preferenceFilters = new EObjectContainmentWithInverseEList<PreferenceFilter>(PreferenceFilter.class, this, ProjectConfigPackage.PREFERENCE_PROFILE__PREFERENCE_FILTERS, ProjectConfigPackage.PREFERENCE_FILTER__PREFERENCE_PROFILE);
+ }
+ return preferenceFilters;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Project> getReferentProjects()
+ {
+ if (referentProjects == null)
+ {
+ referentProjects = new EObjectWithInverseResolvingEList.ManyInverse<Project>(Project.class, this, ProjectConfigPackage.PREFERENCE_PROFILE__REFERENT_PROJECTS, ProjectConfigPackage.PROJECT__PREFERENCE_PROFILE_REFERENCES);
+ }
+ return referentProjects;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProjectConfigPackage.PREFERENCE_PROFILE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Project getProject()
+ {
+ if (eContainerFeatureID() != ProjectConfigPackage.PREFERENCE_PROFILE__PROJECT) return null;
+ return (Project)eInternalContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetProject(Project newProject, NotificationChain msgs)
+ {
+ msgs = eBasicSetContainer((InternalEObject)newProject, ProjectConfigPackage.PREFERENCE_PROFILE__PROJECT, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setProject(Project newProject)
+ {
+ if (newProject != eInternalContainer() || (eContainerFeatureID() != ProjectConfigPackage.PREFERENCE_PROFILE__PROJECT && newProject != null))
+ {
+ if (EcoreUtil.isAncestor(this, newProject))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newProject != null)
+ msgs = ((InternalEObject)newProject).eInverseAdd(this, ProjectConfigPackage.PROJECT__PREFERENCE_PROFILES, Project.class, msgs);
+ msgs = basicSetProject(newProject, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProjectConfigPackage.PREFERENCE_PROFILE__PROJECT, newProject, newProject));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Predicate> getPredicates()
+ {
+ if (predicates == null)
+ {
+ predicates = new EObjectContainmentEList<Predicate>(Predicate.class, this, ProjectConfigPackage.PREFERENCE_PROFILE__PREDICATES);
+ }
+ return predicates;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PreferenceProfile> getPrerequisites()
+ {
+ if (prerequisites == null)
+ {
+ prerequisites = new EObjectResolvingEList<PreferenceProfile>(PreferenceProfile.class, this, ProjectConfigPackage.PREFERENCE_PROFILE__PREREQUISITES);
+ }
+ return prerequisites;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public boolean requires(PreferenceProfile preferenceProfile)
+ {
+ return requires(new HashSet<PreferenceProfile>(), getPrerequisites(), preferenceProfile);
+ }
+
+ private boolean requires(Set<PreferenceProfile> visited, List<PreferenceProfile> preferenceProfiles,
+ PreferenceProfile preferenceProfile)
+ {
+ for (PreferenceProfile requiredPreferenceProfile : preferenceProfiles)
+ {
+ if (requiredPreferenceProfile == preferenceProfile)
+ {
+ return true;
+ }
+ if (visited.add(requiredPreferenceProfile))
+ {
+ requires(visited, requiredPreferenceProfile.getPrerequisites(), requiredPreferenceProfile);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PREFERENCE_FILTERS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getPreferenceFilters()).basicAdd(otherEnd, msgs);
+ case ProjectConfigPackage.PREFERENCE_PROFILE__REFERENT_PROJECTS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getReferentProjects()).basicAdd(otherEnd, msgs);
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PROJECT:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetProject((Project)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PREFERENCE_FILTERS:
+ return ((InternalEList<?>)getPreferenceFilters()).basicRemove(otherEnd, msgs);
+ case ProjectConfigPackage.PREFERENCE_PROFILE__REFERENT_PROJECTS:
+ return ((InternalEList<?>)getReferentProjects()).basicRemove(otherEnd, msgs);
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PROJECT:
+ return basicSetProject(null, msgs);
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PREDICATES:
+ return ((InternalEList<?>)getPredicates()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+ {
+ switch (eContainerFeatureID())
+ {
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PROJECT:
+ return eInternalContainer().eInverseRemove(this, ProjectConfigPackage.PROJECT__PREFERENCE_PROFILES, Project.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PREFERENCE_FILTERS:
+ return getPreferenceFilters();
+ case ProjectConfigPackage.PREFERENCE_PROFILE__REFERENT_PROJECTS:
+ return getReferentProjects();
+ case ProjectConfigPackage.PREFERENCE_PROFILE__NAME:
+ return getName();
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PROJECT:
+ return getProject();
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PREDICATES:
+ return getPredicates();
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PREREQUISITES:
+ return getPrerequisites();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PREFERENCE_FILTERS:
+ getPreferenceFilters().clear();
+ getPreferenceFilters().addAll((Collection<? extends PreferenceFilter>)newValue);
+ return;
+ case ProjectConfigPackage.PREFERENCE_PROFILE__REFERENT_PROJECTS:
+ getReferentProjects().clear();
+ getReferentProjects().addAll((Collection<? extends Project>)newValue);
+ return;
+ case ProjectConfigPackage.PREFERENCE_PROFILE__NAME:
+ setName((String)newValue);
+ return;
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PROJECT:
+ setProject((Project)newValue);
+ return;
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PREDICATES:
+ getPredicates().clear();
+ getPredicates().addAll((Collection<? extends Predicate>)newValue);
+ return;
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PREREQUISITES:
+ getPrerequisites().clear();
+ getPrerequisites().addAll((Collection<? extends PreferenceProfile>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PREFERENCE_FILTERS:
+ getPreferenceFilters().clear();
+ return;
+ case ProjectConfigPackage.PREFERENCE_PROFILE__REFERENT_PROJECTS:
+ getReferentProjects().clear();
+ return;
+ case ProjectConfigPackage.PREFERENCE_PROFILE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PROJECT:
+ setProject((Project)null);
+ return;
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PREDICATES:
+ getPredicates().clear();
+ return;
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PREREQUISITES:
+ getPrerequisites().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PREFERENCE_FILTERS:
+ return preferenceFilters != null && !preferenceFilters.isEmpty();
+ case ProjectConfigPackage.PREFERENCE_PROFILE__REFERENT_PROJECTS:
+ return referentProjects != null && !referentProjects.isEmpty();
+ case ProjectConfigPackage.PREFERENCE_PROFILE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PROJECT:
+ return getProject() != null;
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PREDICATES:
+ return predicates != null && !predicates.isEmpty();
+ case ProjectConfigPackage.PREFERENCE_PROFILE__PREREQUISITES:
+ return prerequisites != null && !prerequisites.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException
+ {
+ switch (operationID)
+ {
+ case ProjectConfigPackage.PREFERENCE_PROFILE___REQUIRES__PREFERENCEPROFILE:
+ return requires((PreferenceProfile)arguments.get(0));
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} // PreferenceProfileImpl
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectConfigFactoryImpl.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectConfigFactoryImpl.java
new file mode 100644
index 0000000000..c5d526c2bb
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectConfigFactoryImpl.java
@@ -0,0 +1,200 @@
+/**
+ */
+package org.eclipse.emf.cdo.releng.projectconfig.impl;
+
+import org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter;
+import org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile;
+import org.eclipse.emf.cdo.releng.projectconfig.Project;
+import org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigFactory;
+import org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage;
+import org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import java.util.regex.Pattern;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ProjectConfigFactoryImpl extends EFactoryImpl implements ProjectConfigFactory
+{
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ProjectConfigFactory init()
+ {
+ try
+ {
+ ProjectConfigFactory theProjectConfigFactory = (ProjectConfigFactory)EPackage.Registry.INSTANCE.getEFactory(ProjectConfigPackage.eNS_URI);
+ if (theProjectConfigFactory != null)
+ {
+ return theProjectConfigFactory;
+ }
+ }
+ catch (Exception exception)
+ {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new ProjectConfigFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProjectConfigFactoryImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass)
+ {
+ switch (eClass.getClassifierID())
+ {
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION: return createWorkspaceConfiguration();
+ case ProjectConfigPackage.PROJECT: return createProject();
+ case ProjectConfigPackage.PREFERENCE_PROFILE: return createPreferenceProfile();
+ case ProjectConfigPackage.PREFERENCE_FILTER: return createPreferenceFilter();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue)
+ {
+ switch (eDataType.getClassifierID())
+ {
+ case ProjectConfigPackage.PATTERN:
+ return createPatternFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue)
+ {
+ switch (eDataType.getClassifierID())
+ {
+ case ProjectConfigPackage.PATTERN:
+ return convertPatternToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public WorkspaceConfiguration createWorkspaceConfiguration()
+ {
+ WorkspaceConfigurationImpl workspaceConfiguration = new WorkspaceConfigurationImpl();
+ return workspaceConfiguration;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Project createProject()
+ {
+ ProjectImpl project = new ProjectImpl();
+ return project;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PreferenceProfile createPreferenceProfile()
+ {
+ PreferenceProfileImpl preferenceProfile = new PreferenceProfileImpl();
+ return preferenceProfile;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PreferenceFilter createPreferenceFilter()
+ {
+ PreferenceFilterImpl preferenceFilter = new PreferenceFilterImpl();
+ return preferenceFilter;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public Pattern createPatternFromString(EDataType eDataType, String initialValue)
+ {
+ return initialValue == null ? null : Pattern.compile(initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String convertPatternToString(EDataType eDataType, Object instanceValue)
+ {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProjectConfigPackage getProjectConfigPackage()
+ {
+ return (ProjectConfigPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static ProjectConfigPackage getPackage()
+ {
+ return ProjectConfigPackage.eINSTANCE;
+ }
+
+} // ProjectConfigFactoryImpl
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectConfigPackageImpl.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectConfigPackageImpl.java
new file mode 100644
index 0000000000..d2139a7f74
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectConfigPackageImpl.java
@@ -0,0 +1,567 @@
+/**
+ */
+package org.eclipse.emf.cdo.releng.projectconfig.impl;
+
+import java.util.regex.Pattern;
+import org.eclipse.emf.cdo.releng.predicates.PredicatesPackage;
+import org.eclipse.emf.cdo.releng.preferences.PreferencesPackage;
+import org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter;
+import org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile;
+import org.eclipse.emf.cdo.releng.projectconfig.Project;
+import org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigFactory;
+import org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage;
+import org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration;
+import org.eclipse.emf.cdo.releng.projectconfig.util.ProjectConfigValidator;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EValidator;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ProjectConfigPackageImpl extends EPackageImpl implements ProjectConfigPackage
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass workspaceConfigurationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass projectEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass preferenceProfileEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass preferenceFilterEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType patternEDataType = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private ProjectConfigPackageImpl()
+ {
+ super(eNS_URI, ProjectConfigFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link ProjectConfigPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static ProjectConfigPackage init()
+ {
+ if (isInited) return (ProjectConfigPackage)EPackage.Registry.INSTANCE.getEPackage(ProjectConfigPackage.eNS_URI);
+
+ // Obtain or create and register package
+ ProjectConfigPackageImpl theProjectConfigPackage = (ProjectConfigPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ProjectConfigPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ProjectConfigPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ PredicatesPackage.eINSTANCE.eClass();
+ PreferencesPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theProjectConfigPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theProjectConfigPackage.initializePackageContents();
+
+ // Register package validator
+ EValidator.Registry.INSTANCE.put
+ (theProjectConfigPackage,
+ new EValidator.Descriptor()
+ {
+ public EValidator getEValidator()
+ {
+ return ProjectConfigValidator.INSTANCE;
+ }
+ });
+
+ // Mark meta-data to indicate it can't be changed
+ theProjectConfigPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(ProjectConfigPackage.eNS_URI, theProjectConfigPackage);
+ return theProjectConfigPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getWorkspaceConfiguration()
+ {
+ return workspaceConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getWorkspaceConfiguration_Projects()
+ {
+ return (EReference)workspaceConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getWorkspaceConfiguration_DefaultPreferenceNode()
+ {
+ return (EReference)workspaceConfigurationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getWorkspaceConfiguration_InstancePreferenceNode()
+ {
+ return (EReference)workspaceConfigurationEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EOperation getWorkspaceConfiguration__ApplyPreferenceProfiles()
+ {
+ return workspaceConfigurationEClass.getEOperations().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EOperation getWorkspaceConfiguration__UpdatePreferenceProfileReferences()
+ {
+ return workspaceConfigurationEClass.getEOperations().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getProject()
+ {
+ return projectEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getProject_Configuration()
+ {
+ return (EReference)projectEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getProject_PreferenceProfiles()
+ {
+ return (EReference)projectEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getProject_PreferenceNode()
+ {
+ return (EReference)projectEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getProject_PreferenceProfileReferences()
+ {
+ return (EReference)projectEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPreferenceProfile()
+ {
+ return preferenceProfileEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPreferenceProfile_PreferenceFilters()
+ {
+ return (EReference)preferenceProfileEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPreferenceProfile_ReferentProjects()
+ {
+ return (EReference)preferenceProfileEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPreferenceProfile_Name()
+ {
+ return (EAttribute)preferenceProfileEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPreferenceProfile_Project()
+ {
+ return (EReference)preferenceProfileEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPreferenceProfile_Predicates()
+ {
+ return (EReference)preferenceProfileEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPreferenceProfile_Prerequisites()
+ {
+ return (EReference)preferenceProfileEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EOperation getPreferenceProfile__Requires__PreferenceProfile()
+ {
+ return preferenceProfileEClass.getEOperations().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPreferenceFilter()
+ {
+ return preferenceFilterEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPreferenceFilter_PreferenceNode()
+ {
+ return (EReference)preferenceFilterEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPreferenceFilter_PreferenceProfile()
+ {
+ return (EReference)preferenceFilterEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPreferenceFilter_Inclusions()
+ {
+ return (EAttribute)preferenceFilterEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPreferenceFilter_Exclusions()
+ {
+ return (EAttribute)preferenceFilterEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EOperation getPreferenceFilter__Matches__String()
+ {
+ return preferenceFilterEClass.getEOperations().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getPattern()
+ {
+ return patternEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProjectConfigFactory getProjectConfigFactory()
+ {
+ return (ProjectConfigFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents()
+ {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ workspaceConfigurationEClass = createEClass(WORKSPACE_CONFIGURATION);
+ createEReference(workspaceConfigurationEClass, WORKSPACE_CONFIGURATION__PROJECTS);
+ createEReference(workspaceConfigurationEClass, WORKSPACE_CONFIGURATION__DEFAULT_PREFERENCE_NODE);
+ createEReference(workspaceConfigurationEClass, WORKSPACE_CONFIGURATION__INSTANCE_PREFERENCE_NODE);
+ createEOperation(workspaceConfigurationEClass, WORKSPACE_CONFIGURATION___APPLY_PREFERENCE_PROFILES);
+ createEOperation(workspaceConfigurationEClass, WORKSPACE_CONFIGURATION___UPDATE_PREFERENCE_PROFILE_REFERENCES);
+
+ projectEClass = createEClass(PROJECT);
+ createEReference(projectEClass, PROJECT__CONFIGURATION);
+ createEReference(projectEClass, PROJECT__PREFERENCE_PROFILES);
+ createEReference(projectEClass, PROJECT__PREFERENCE_NODE);
+ createEReference(projectEClass, PROJECT__PREFERENCE_PROFILE_REFERENCES);
+
+ preferenceProfileEClass = createEClass(PREFERENCE_PROFILE);
+ createEReference(preferenceProfileEClass, PREFERENCE_PROFILE__PREFERENCE_FILTERS);
+ createEReference(preferenceProfileEClass, PREFERENCE_PROFILE__REFERENT_PROJECTS);
+ createEAttribute(preferenceProfileEClass, PREFERENCE_PROFILE__NAME);
+ createEReference(preferenceProfileEClass, PREFERENCE_PROFILE__PROJECT);
+ createEReference(preferenceProfileEClass, PREFERENCE_PROFILE__PREDICATES);
+ createEReference(preferenceProfileEClass, PREFERENCE_PROFILE__PREREQUISITES);
+ createEOperation(preferenceProfileEClass, PREFERENCE_PROFILE___REQUIRES__PREFERENCEPROFILE);
+
+ preferenceFilterEClass = createEClass(PREFERENCE_FILTER);
+ createEReference(preferenceFilterEClass, PREFERENCE_FILTER__PREFERENCE_NODE);
+ createEReference(preferenceFilterEClass, PREFERENCE_FILTER__PREFERENCE_PROFILE);
+ createEAttribute(preferenceFilterEClass, PREFERENCE_FILTER__INCLUSIONS);
+ createEAttribute(preferenceFilterEClass, PREFERENCE_FILTER__EXCLUSIONS);
+ createEOperation(preferenceFilterEClass, PREFERENCE_FILTER___MATCHES__STRING);
+
+ // Create data types
+ patternEDataType = createEDataType(PATTERN);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents()
+ {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ PreferencesPackage thePreferencesPackage = (PreferencesPackage)EPackage.Registry.INSTANCE.getEPackage(PreferencesPackage.eNS_URI);
+ PredicatesPackage thePredicatesPackage = (PredicatesPackage)EPackage.Registry.INSTANCE.getEPackage(PredicatesPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(workspaceConfigurationEClass, WorkspaceConfiguration.class, "WorkspaceConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getWorkspaceConfiguration_Projects(), this.getProject(), this.getProject_Configuration(), "projects", null, 0, -1, WorkspaceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getWorkspaceConfiguration_DefaultPreferenceNode(), thePreferencesPackage.getPreferenceNode(), null, "defaultPreferenceNode", null, 1, 1, WorkspaceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getWorkspaceConfiguration_InstancePreferenceNode(), thePreferencesPackage.getPreferenceNode(), null, "instancePreferenceNode", null, 1, 1, WorkspaceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEOperation(getWorkspaceConfiguration__ApplyPreferenceProfiles(), null, "applyPreferenceProfiles", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ initEOperation(getWorkspaceConfiguration__UpdatePreferenceProfileReferences(), null, "updatePreferenceProfileReferences", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ initEClass(projectEClass, Project.class, "Project", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getProject_Configuration(), this.getWorkspaceConfiguration(), this.getWorkspaceConfiguration_Projects(), "configuration", null, 1, 1, Project.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getProject_PreferenceProfiles(), this.getPreferenceProfile(), this.getPreferenceProfile_Project(), "preferenceProfiles", null, 0, -1, Project.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getProject_PreferenceNode(), thePreferencesPackage.getPreferenceNode(), null, "preferenceNode", null, 1, 1, Project.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getProject_PreferenceProfileReferences(), this.getPreferenceProfile(), this.getPreferenceProfile_ReferentProjects(), "preferenceProfileReferences", null, 0, -1, Project.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(preferenceProfileEClass, PreferenceProfile.class, "PreferenceProfile", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getPreferenceProfile_PreferenceFilters(), this.getPreferenceFilter(), this.getPreferenceFilter_PreferenceProfile(), "preferenceFilters", null, 0, -1, PreferenceProfile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPreferenceProfile_ReferentProjects(), this.getProject(), this.getProject_PreferenceProfileReferences(), "referentProjects", null, 0, -1, PreferenceProfile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPreferenceProfile_Name(), ecorePackage.getEString(), "name", null, 1, 1, PreferenceProfile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPreferenceProfile_Project(), this.getProject(), this.getProject_PreferenceProfiles(), "project", null, 0, 1, PreferenceProfile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPreferenceProfile_Predicates(), thePredicatesPackage.getPredicate(), null, "predicates", null, 0, -1, PreferenceProfile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPreferenceProfile_Prerequisites(), this.getPreferenceProfile(), null, "prerequisites", null, 0, -1, PreferenceProfile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ EOperation op = initEOperation(getPreferenceProfile__Requires__PreferenceProfile(), ecorePackage.getEBoolean(), "requires", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, this.getPreferenceProfile(), "preferenceProfile", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ initEClass(preferenceFilterEClass, PreferenceFilter.class, "PreferenceFilter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getPreferenceFilter_PreferenceNode(), thePreferencesPackage.getPreferenceNode(), null, "preferenceNode", null, 1, 1, PreferenceFilter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPreferenceFilter_PreferenceProfile(), this.getPreferenceProfile(), this.getPreferenceProfile_PreferenceFilters(), "preferenceProfile", null, 1, 1, PreferenceFilter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPreferenceFilter_Inclusions(), this.getPattern(), "inclusions", ".*", 1, 1, PreferenceFilter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPreferenceFilter_Exclusions(), this.getPattern(), "exclusions", "", 1, 1, PreferenceFilter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ op = initEOperation(getPreferenceFilter__Matches__String(), ecorePackage.getEBoolean(), "matches", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, ecorePackage.getEString(), "value", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ // Initialize data types
+ initEDataType(patternEDataType, Pattern.class, "Pattern", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http://www.eclipse.org/emf/2002/Ecore
+ createEcoreAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createEcoreAnnotations()
+ {
+ String source = "http://www.eclipse.org/emf/2002/Ecore";
+ addAnnotation
+ (projectEClass,
+ source,
+ new String[]
+ {
+ "constraints", "AllPreferencesManaged"
+ });
+ }
+
+} //ProjectConfigPackageImpl
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectConfigPlugin.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectConfigPlugin.java
new file mode 100644
index 0000000000..2c9f0706cf
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectConfigPlugin.java
@@ -0,0 +1,93 @@
+/**
+ */
+package org.eclipse.emf.cdo.releng.projectconfig.impl;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Project Config model plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class ProjectConfigPlugin extends EMFPlugin
+{
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final ProjectConfigPlugin INSTANCE = new ProjectConfigPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProjectConfigPlugin()
+ {
+ super(new ResourceLocator [] {});
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator()
+ {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin()
+ {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin
+ {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation()
+ {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectConfigURIHandlerImpl.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectConfigURIHandlerImpl.java
new file mode 100644
index 0000000000..e942706a49
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectConfigURIHandlerImpl.java
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) 2013 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.releng.projectconfig.impl;
+
+import org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration;
+import org.eclipse.emf.cdo.releng.projectconfig.util.ProjectConfigUtil;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.ecore.resource.impl.URIHandlerImpl;
+
+import org.osgi.service.prefs.BackingStoreException;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Collections;
+import java.util.Map;
+
+/**
+ * @author Eike Stepper
+ */
+public class ProjectConfigURIHandlerImpl extends URIHandlerImpl
+{
+ @Override
+ public boolean canHandle(URI uri)
+ {
+ return ProjectConfigUtil.PROJECT_CONFIG_SCHEME.equals(uri.scheme());
+ }
+
+ @Override
+ public InputStream createInputStream(URI uri, final Map<?, ?> options) throws IOException
+ {
+ if (uri.segmentCount() == 1)
+ {
+ class ProjectConfigInput extends InputStream implements URIConverter.Loadable
+ {
+ private InputStream in;
+
+ public void loadResource(Resource resource) throws IOException
+ {
+ resource.getContents().addAll(ProjectConfigUtil.getWorkspaceConfiguration().eResource().getContents());
+ }
+
+ @Override
+ public int read() throws IOException
+ {
+ if (in == null)
+ {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ ProjectConfigUtil.getWorkspaceConfiguration().eResource().save(out, null);
+ in = new ByteArrayInputStream(out.toByteArray());
+ }
+ return in.read();
+ }
+ }
+
+ return new ProjectConfigInput();
+ }
+ throw new IOException("No preference value available for ");
+ }
+
+ @Override
+ public OutputStream createOutputStream(URI uri, Map<?, ?> options) throws IOException
+ {
+ if (uri.segmentCount() == 1)
+ {
+ class ProjectConfigOutput extends OutputStream implements URIConverter.Saveable
+ {
+ public void saveResource(Resource resource) throws IOException
+ {
+ try
+ {
+ ProjectConfigUtil.saveWorkspaceConfiguration((WorkspaceConfiguration)resource.getContents().get(0));
+ }
+ catch (BackingStoreException ex)
+ {
+ throw new IOException(ex);
+ }
+ }
+
+ @Override
+ public void write(int b) throws IOException
+ {
+ throw new IOException("Write not supported");
+ }
+ }
+
+ return new ProjectConfigOutput();
+ }
+ throw new IOException("Output not supported");
+ }
+
+ @Override
+ public void delete(URI uri, Map<?, ?> options) throws IOException
+ {
+ throw new IOException("Delete not supported");
+ }
+
+ @Override
+ public boolean exists(URI uri, Map<?, ?> options)
+ {
+ // TODO
+ return false;
+ }
+
+ @Override
+ public Map<String, ?> getAttributes(URI uri, Map<?, ?> options)
+ {
+ return Collections.emptyMap();
+ }
+
+ @Override
+ public void setAttributes(URI uri, Map<String, ?> attributes, Map<?, ?> options) throws IOException
+ {
+ // Do nothing.
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectImpl.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectImpl.java
new file mode 100644
index 0000000000..4ad8ad4f18
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/ProjectImpl.java
@@ -0,0 +1,410 @@
+/**
+ */
+package org.eclipse.emf.cdo.releng.projectconfig.impl;
+
+import org.eclipse.emf.cdo.releng.preferences.PreferenceNode;
+import org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile;
+import org.eclipse.emf.cdo.releng.projectconfig.Project;
+import org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage;
+import org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import java.util.Collection;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Project</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectImpl#getConfiguration <em>Configuration</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectImpl#getPreferenceProfiles <em>Preference Profiles</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectImpl#getPreferenceNode <em>Preference Node</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectImpl#getPreferenceProfileReferences <em>Preference Profile References</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ProjectImpl extends MinimalEObjectImpl.Container implements Project
+{
+ /**
+ * The cached value of the '{@link #getPreferenceProfiles() <em>Preference Profiles</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPreferenceProfiles()
+ * @generated
+ * @ordered
+ */
+ protected EList<PreferenceProfile> preferenceProfiles;
+
+ /**
+ * The cached value of the '{@link #getPreferenceNode() <em>Preference Node</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPreferenceNode()
+ * @generated
+ * @ordered
+ */
+ protected PreferenceNode preferenceNode;
+
+ /**
+ * The cached value of the '{@link #getPreferenceProfileReferences() <em>Preference Profile References</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPreferenceProfileReferences()
+ * @generated
+ * @ordered
+ */
+ protected EList<PreferenceProfile> preferenceProfileReferences;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ProjectImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ProjectConfigPackage.Literals.PROJECT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public WorkspaceConfiguration getConfiguration()
+ {
+ if (eContainerFeatureID() != ProjectConfigPackage.PROJECT__CONFIGURATION) return null;
+ return (WorkspaceConfiguration)eInternalContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetConfiguration(WorkspaceConfiguration newConfiguration, NotificationChain msgs)
+ {
+ msgs = eBasicSetContainer((InternalEObject)newConfiguration, ProjectConfigPackage.PROJECT__CONFIGURATION, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setConfiguration(WorkspaceConfiguration newConfiguration)
+ {
+ if (newConfiguration != eInternalContainer() || (eContainerFeatureID() != ProjectConfigPackage.PROJECT__CONFIGURATION && newConfiguration != null))
+ {
+ if (EcoreUtil.isAncestor(this, newConfiguration))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newConfiguration != null)
+ msgs = ((InternalEObject)newConfiguration).eInverseAdd(this, ProjectConfigPackage.WORKSPACE_CONFIGURATION__PROJECTS, WorkspaceConfiguration.class, msgs);
+ msgs = basicSetConfiguration(newConfiguration, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProjectConfigPackage.PROJECT__CONFIGURATION, newConfiguration, newConfiguration));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PreferenceProfile> getPreferenceProfiles()
+ {
+ if (preferenceProfiles == null)
+ {
+ preferenceProfiles = new EObjectContainmentWithInverseEList<PreferenceProfile>(PreferenceProfile.class, this, ProjectConfigPackage.PROJECT__PREFERENCE_PROFILES, ProjectConfigPackage.PREFERENCE_PROFILE__PROJECT);
+ }
+ return preferenceProfiles;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PreferenceNode getPreferenceNode()
+ {
+ if (preferenceNode != null && preferenceNode.eIsProxy())
+ {
+ InternalEObject oldPreferenceNode = (InternalEObject)preferenceNode;
+ preferenceNode = (PreferenceNode)eResolveProxy(oldPreferenceNode);
+ if (preferenceNode != oldPreferenceNode)
+ {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProjectConfigPackage.PROJECT__PREFERENCE_NODE, oldPreferenceNode, preferenceNode));
+ }
+ }
+ return preferenceNode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PreferenceNode basicGetPreferenceNode()
+ {
+ return preferenceNode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPreferenceNode(PreferenceNode newPreferenceNode)
+ {
+ PreferenceNode oldPreferenceNode = preferenceNode;
+ preferenceNode = newPreferenceNode;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProjectConfigPackage.PROJECT__PREFERENCE_NODE, oldPreferenceNode, preferenceNode));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PreferenceProfile> getPreferenceProfileReferences()
+ {
+ if (preferenceProfileReferences == null)
+ {
+ preferenceProfileReferences = new EObjectWithInverseResolvingEList.ManyInverse<PreferenceProfile>(PreferenceProfile.class, this, ProjectConfigPackage.PROJECT__PREFERENCE_PROFILE_REFERENCES, ProjectConfigPackage.PREFERENCE_PROFILE__REFERENT_PROJECTS);
+ }
+ return preferenceProfileReferences;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PROJECT__CONFIGURATION:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetConfiguration((WorkspaceConfiguration)otherEnd, msgs);
+ case ProjectConfigPackage.PROJECT__PREFERENCE_PROFILES:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getPreferenceProfiles()).basicAdd(otherEnd, msgs);
+ case ProjectConfigPackage.PROJECT__PREFERENCE_PROFILE_REFERENCES:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getPreferenceProfileReferences()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PROJECT__CONFIGURATION:
+ return basicSetConfiguration(null, msgs);
+ case ProjectConfigPackage.PROJECT__PREFERENCE_PROFILES:
+ return ((InternalEList<?>)getPreferenceProfiles()).basicRemove(otherEnd, msgs);
+ case ProjectConfigPackage.PROJECT__PREFERENCE_PROFILE_REFERENCES:
+ return ((InternalEList<?>)getPreferenceProfileReferences()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+ {
+ switch (eContainerFeatureID())
+ {
+ case ProjectConfigPackage.PROJECT__CONFIGURATION:
+ return eInternalContainer().eInverseRemove(this, ProjectConfigPackage.WORKSPACE_CONFIGURATION__PROJECTS, WorkspaceConfiguration.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PROJECT__CONFIGURATION:
+ return getConfiguration();
+ case ProjectConfigPackage.PROJECT__PREFERENCE_PROFILES:
+ return getPreferenceProfiles();
+ case ProjectConfigPackage.PROJECT__PREFERENCE_NODE:
+ if (resolve) return getPreferenceNode();
+ return basicGetPreferenceNode();
+ case ProjectConfigPackage.PROJECT__PREFERENCE_PROFILE_REFERENCES:
+ return getPreferenceProfileReferences();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PROJECT__CONFIGURATION:
+ setConfiguration((WorkspaceConfiguration)newValue);
+ return;
+ case ProjectConfigPackage.PROJECT__PREFERENCE_PROFILES:
+ getPreferenceProfiles().clear();
+ getPreferenceProfiles().addAll((Collection<? extends PreferenceProfile>)newValue);
+ return;
+ case ProjectConfigPackage.PROJECT__PREFERENCE_NODE:
+ setPreferenceNode((PreferenceNode)newValue);
+ return;
+ case ProjectConfigPackage.PROJECT__PREFERENCE_PROFILE_REFERENCES:
+ getPreferenceProfileReferences().clear();
+ getPreferenceProfileReferences().addAll((Collection<? extends PreferenceProfile>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PROJECT__CONFIGURATION:
+ setConfiguration((WorkspaceConfiguration)null);
+ return;
+ case ProjectConfigPackage.PROJECT__PREFERENCE_PROFILES:
+ getPreferenceProfiles().clear();
+ return;
+ case ProjectConfigPackage.PROJECT__PREFERENCE_NODE:
+ setPreferenceNode((PreferenceNode)null);
+ return;
+ case ProjectConfigPackage.PROJECT__PREFERENCE_PROFILE_REFERENCES:
+ getPreferenceProfileReferences().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.PROJECT__CONFIGURATION:
+ return getConfiguration() != null;
+ case ProjectConfigPackage.PROJECT__PREFERENCE_PROFILES:
+ return preferenceProfiles != null && !preferenceProfiles.isEmpty();
+ case ProjectConfigPackage.PROJECT__PREFERENCE_NODE:
+ return preferenceNode != null;
+ case ProjectConfigPackage.PROJECT__PREFERENCE_PROFILE_REFERENCES:
+ return preferenceProfileReferences != null && !preferenceProfileReferences.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ @Override
+ public String eURIFragmentSegment(EStructuralFeature eStructuralFeature, EObject eObject)
+ {
+ if (eStructuralFeature == ProjectConfigPackage.Literals.PROJECT__PREFERENCE_PROFILES)
+ {
+ PreferenceProfile child = (PreferenceProfile)eObject;
+ String name = child.getName();
+ if (name != null)
+ {
+ String encodedName = URI.encodeSegment(name, false);
+ if (encodedName.startsWith("@"))
+ {
+ encodedName = "%40" + encodedName.substring(1);
+ }
+ return encodedName;
+ }
+ }
+
+ return super.eURIFragmentSegment(eStructuralFeature, eObject);
+ }
+
+ @Override
+ public EObject eObjectForURIFragmentSegment(String uriFragmentSegment)
+ {
+ if (!uriFragmentSegment.startsWith("@"))
+ {
+ String preferenceProfileName = URI.decode(uriFragmentSegment);
+ for (PreferenceProfile preferenceProfile : getPreferenceProfiles())
+ {
+ if (preferenceProfileName.equals(preferenceProfile.getName()))
+ {
+ return preferenceProfile;
+ }
+ }
+ return null;
+ }
+ return super.eObjectForURIFragmentSegment(uriFragmentSegment);
+ }
+} // ProjectImpl
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/WorkspaceConfigurationImpl.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/WorkspaceConfigurationImpl.java
new file mode 100644
index 0000000000..3004290775
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/impl/WorkspaceConfigurationImpl.java
@@ -0,0 +1,535 @@
+/**
+ */
+package org.eclipse.emf.cdo.releng.projectconfig.impl;
+
+import org.eclipse.emf.cdo.releng.predicates.Predicate;
+import org.eclipse.emf.cdo.releng.preferences.PreferenceNode;
+import org.eclipse.emf.cdo.releng.preferences.util.PreferencesUtil;
+import org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter;
+import org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile;
+import org.eclipse.emf.cdo.releng.projectconfig.Project;
+import org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage;
+import org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.ECollections;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Workspace Configuration</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.WorkspaceConfigurationImpl#getProjects <em>Projects</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.WorkspaceConfigurationImpl#getDefaultPreferenceNode <em>Default Preference Node</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.releng.projectconfig.impl.WorkspaceConfigurationImpl#getInstancePreferenceNode <em>Instance Preference Node</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class WorkspaceConfigurationImpl extends MinimalEObjectImpl.Container implements WorkspaceConfiguration
+{
+ private static final IWorkspaceRoot WORKSPACE_ROOT = ResourcesPlugin.getWorkspace().getRoot();
+
+ /**
+ * The cached value of the '{@link #getProjects() <em>Projects</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProjects()
+ * @generated
+ * @ordered
+ */
+ protected EList<Project> projects;
+
+ /**
+ * The cached value of the '{@link #getDefaultPreferenceNode() <em>Default Preference Node</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDefaultPreferenceNode()
+ * @generated
+ * @ordered
+ */
+ protected PreferenceNode defaultPreferenceNode;
+
+ /**
+ * The cached value of the '{@link #getInstancePreferenceNode() <em>Instance Preference Node</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInstancePreferenceNode()
+ * @generated
+ * @ordered
+ */
+ protected PreferenceNode instancePreferenceNode;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected WorkspaceConfigurationImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ProjectConfigPackage.Literals.WORKSPACE_CONFIGURATION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Project> getProjects()
+ {
+ if (projects == null)
+ {
+ projects = new EObjectContainmentWithInverseEList<Project>(Project.class, this, ProjectConfigPackage.WORKSPACE_CONFIGURATION__PROJECTS, ProjectConfigPackage.PROJECT__CONFIGURATION);
+ }
+ return projects;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PreferenceNode getDefaultPreferenceNode()
+ {
+ if (defaultPreferenceNode != null && defaultPreferenceNode.eIsProxy())
+ {
+ InternalEObject oldDefaultPreferenceNode = (InternalEObject)defaultPreferenceNode;
+ defaultPreferenceNode = (PreferenceNode)eResolveProxy(oldDefaultPreferenceNode);
+ if (defaultPreferenceNode != oldDefaultPreferenceNode)
+ {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProjectConfigPackage.WORKSPACE_CONFIGURATION__DEFAULT_PREFERENCE_NODE, oldDefaultPreferenceNode, defaultPreferenceNode));
+ }
+ }
+ return defaultPreferenceNode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PreferenceNode basicGetDefaultPreferenceNode()
+ {
+ return defaultPreferenceNode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDefaultPreferenceNode(PreferenceNode newDefaultPreferenceNode)
+ {
+ PreferenceNode oldDefaultPreferenceNode = defaultPreferenceNode;
+ defaultPreferenceNode = newDefaultPreferenceNode;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProjectConfigPackage.WORKSPACE_CONFIGURATION__DEFAULT_PREFERENCE_NODE, oldDefaultPreferenceNode, defaultPreferenceNode));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PreferenceNode getInstancePreferenceNode()
+ {
+ if (instancePreferenceNode != null && instancePreferenceNode.eIsProxy())
+ {
+ InternalEObject oldInstancePreferenceNode = (InternalEObject)instancePreferenceNode;
+ instancePreferenceNode = (PreferenceNode)eResolveProxy(oldInstancePreferenceNode);
+ if (instancePreferenceNode != oldInstancePreferenceNode)
+ {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProjectConfigPackage.WORKSPACE_CONFIGURATION__INSTANCE_PREFERENCE_NODE, oldInstancePreferenceNode, instancePreferenceNode));
+ }
+ }
+ return instancePreferenceNode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PreferenceNode basicGetInstancePreferenceNode()
+ {
+ return instancePreferenceNode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInstancePreferenceNode(PreferenceNode newInstancePreferenceNode)
+ {
+ PreferenceNode oldInstancePreferenceNode = instancePreferenceNode;
+ instancePreferenceNode = newInstancePreferenceNode;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProjectConfigPackage.WORKSPACE_CONFIGURATION__INSTANCE_PREFERENCE_NODE, oldInstancePreferenceNode, instancePreferenceNode));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public void applyPreferenceProfiles()
+ {
+ for (Project project : getProjects())
+ {
+ try
+ {
+ Preferences projectPreferences = PreferencesUtil.getPreferences(project.getPreferenceNode(), true);
+
+ Set<Preferences> clearedPreferences = new HashSet<Preferences>();
+ for (PreferenceProfile preferenceProfile : project.getPreferenceProfileReferences())
+ {
+ if (preferenceProfile.getProject() != project)
+ {
+ for (PreferenceFilter preferenceFilter : preferenceProfile.getPreferenceFilters())
+ {
+ PreferenceNode preferenceNode = preferenceFilter.getPreferenceNode();
+ try
+ {
+ Preferences sourcePreferences = PreferencesUtil.getPreferences(preferenceNode, true);
+ if (projectPreferences == null)
+ {
+ projectPreferences = PreferencesUtil.getPreferences(project.getPreferenceNode(), true);
+ }
+ Preferences targetPreferences = projectPreferences.node(sourcePreferences.name());
+ if (clearedPreferences.add(targetPreferences))
+ {
+ targetPreferences.clear();
+ }
+ for (String key : sourcePreferences.keys())
+ {
+ if (preferenceFilter.matches(key))
+ {
+ targetPreferences.put(key, sourcePreferences.get(key, null));
+ }
+ }
+ }
+ catch (BackingStoreException ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+ }
+ }
+
+ if (!clearedPreferences.isEmpty())
+ {
+ for (Preferences preferences : clearedPreferences)
+ {
+ if (preferences.keys().length == 0)
+ {
+ preferences.removeNode();
+ }
+ }
+
+ projectPreferences.flush();
+ }
+ }
+ catch (BackingStoreException ex1)
+ {
+ ex1.printStackTrace();
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public void updatePreferenceProfileReferences()
+ {
+ boolean sort = false;
+ for (Project project : getProjects())
+ {
+ for (PreferenceProfile preferenceProfile : project.getPreferenceProfiles())
+ {
+ if (!preferenceProfile.getPrerequisites().isEmpty())
+ {
+ sort = true;
+ }
+
+ EList<Predicate> predicates = preferenceProfile.getPredicates();
+ if (!predicates.isEmpty())
+ {
+ List<Project> referents = new ArrayList<Project>();
+ for (Predicate predicate : predicates)
+ {
+ for (Project referencedProject : getProjects())
+ {
+ IProject iProject = WORKSPACE_ROOT.getProject(referencedProject.getPreferenceNode().getName());
+ if (iProject.isAccessible())
+ {
+ if (predicate.matches(iProject))
+ {
+ referents.add(referencedProject);
+ }
+ }
+ }
+ }
+ ECollections.setEList(preferenceProfile.getReferentProjects(), referents);
+ }
+ }
+ }
+
+ if (sort)
+ {
+ for (Project project : getProjects())
+ {
+ ECollections.sort(project.getPreferenceProfileReferences(), new Comparator<PreferenceProfile>()
+ {
+ public int compare(PreferenceProfile p1, PreferenceProfile p2)
+ {
+ if (p2.requires(p1))
+ {
+ if (!p1.requires(p2))
+ {
+ return -1;
+ }
+ }
+ else if (p1.requires(p2))
+ {
+ return 1;
+ }
+ return p1.getName().compareTo(p2.getName());
+ }
+ });
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION__PROJECTS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getProjects()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION__PROJECTS:
+ return ((InternalEList<?>)getProjects()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION__PROJECTS:
+ return getProjects();
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION__DEFAULT_PREFERENCE_NODE:
+ if (resolve) return getDefaultPreferenceNode();
+ return basicGetDefaultPreferenceNode();
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION__INSTANCE_PREFERENCE_NODE:
+ if (resolve) return getInstancePreferenceNode();
+ return basicGetInstancePreferenceNode();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION__PROJECTS:
+ getProjects().clear();
+ getProjects().addAll((Collection<? extends Project>)newValue);
+ return;
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION__DEFAULT_PREFERENCE_NODE:
+ setDefaultPreferenceNode((PreferenceNode)newValue);
+ return;
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION__INSTANCE_PREFERENCE_NODE:
+ setInstancePreferenceNode((PreferenceNode)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION__PROJECTS:
+ getProjects().clear();
+ return;
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION__DEFAULT_PREFERENCE_NODE:
+ setDefaultPreferenceNode((PreferenceNode)null);
+ return;
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION__INSTANCE_PREFERENCE_NODE:
+ setInstancePreferenceNode((PreferenceNode)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION__PROJECTS:
+ return projects != null && !projects.isEmpty();
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION__DEFAULT_PREFERENCE_NODE:
+ return defaultPreferenceNode != null;
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION__INSTANCE_PREFERENCE_NODE:
+ return instancePreferenceNode != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException
+ {
+ switch (operationID)
+ {
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION___APPLY_PREFERENCE_PROFILES:
+ applyPreferenceProfiles();
+ return null;
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION___UPDATE_PREFERENCE_PROFILE_REFERENCES:
+ updatePreferenceProfileReferences();
+ return null;
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+ @Override
+ public String eURIFragmentSegment(EStructuralFeature eStructuralFeature, EObject eObject)
+ {
+ if (eStructuralFeature == ProjectConfigPackage.Literals.WORKSPACE_CONFIGURATION__PROJECTS)
+ {
+ Project child = (Project)eObject;
+ PreferenceNode preferenceNode = child.getPreferenceNode();
+ if (preferenceNode != null)
+ {
+ String name = preferenceNode.getName();
+ if (name != null)
+ {
+ String encodedName = URI.encodeSegment(name, false);
+ if (encodedName.startsWith("@"))
+ {
+ encodedName = "%40" + encodedName.substring(1);
+ }
+ return name;
+ }
+ }
+ }
+
+ return super.eURIFragmentSegment(eStructuralFeature, eObject);
+ }
+
+ @Override
+ public EObject eObjectForURIFragmentSegment(String uriFragmentSegment)
+ {
+ if (!uriFragmentSegment.startsWith("@"))
+ {
+ String preferenceNodeName = URI.decode(uriFragmentSegment);
+ for (Project project : getProjects())
+ {
+ PreferenceNode preferenceNode = project.getPreferenceNode();
+ if (preferenceNode != null && preferenceNodeName.equals(preferenceNode.getName()))
+ {
+ return project;
+ }
+ }
+ return null;
+ }
+ return super.eObjectForURIFragmentSegment(uriFragmentSegment);
+ }
+
+} // WorkspaceConfigurationImpl
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/util/ProjectConfigAdapterFactory.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/util/ProjectConfigAdapterFactory.java
new file mode 100644
index 0000000000..53864c39b3
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/util/ProjectConfigAdapterFactory.java
@@ -0,0 +1,192 @@
+/**
+ */
+package org.eclipse.emf.cdo.releng.projectconfig.util;
+
+import org.eclipse.emf.cdo.releng.projectconfig.*;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage
+ * @generated
+ */
+public class ProjectConfigAdapterFactory extends AdapterFactoryImpl
+{
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static ProjectConfigPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProjectConfigAdapterFactory()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = ProjectConfigPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object)
+ {
+ if (object == modelPackage)
+ {
+ return true;
+ }
+ if (object instanceof EObject)
+ {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ProjectConfigSwitch<Adapter> modelSwitch =
+ new ProjectConfigSwitch<Adapter>()
+ {
+ @Override
+ public Adapter caseWorkspaceConfiguration(WorkspaceConfiguration object)
+ {
+ return createWorkspaceConfigurationAdapter();
+ }
+ @Override
+ public Adapter caseProject(Project object)
+ {
+ return createProjectAdapter();
+ }
+ @Override
+ public Adapter casePreferenceProfile(PreferenceProfile object)
+ {
+ return createPreferenceProfileAdapter();
+ }
+ @Override
+ public Adapter casePreferenceFilter(PreferenceFilter object)
+ {
+ return createPreferenceFilterAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object)
+ {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target)
+ {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration <em>Workspace Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration
+ * @generated
+ */
+ public Adapter createWorkspaceConfigurationAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.releng.projectconfig.Project <em>Project</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.Project
+ * @generated
+ */
+ public Adapter createProjectAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile <em>Preference Profile</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile
+ * @generated
+ */
+ public Adapter createPreferenceProfileAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter <em>Preference Filter</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter
+ * @generated
+ */
+ public Adapter createPreferenceFilterAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter()
+ {
+ return null;
+ }
+
+} //ProjectConfigAdapterFactory
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/util/ProjectConfigSwitch.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/util/ProjectConfigSwitch.java
new file mode 100644
index 0000000000..682c554cd5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/util/ProjectConfigSwitch.java
@@ -0,0 +1,188 @@
+/**
+ */
+package org.eclipse.emf.cdo.releng.projectconfig.util;
+
+import org.eclipse.emf.cdo.releng.projectconfig.*;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage
+ * @generated
+ */
+public class ProjectConfigSwitch<T> extends Switch<T>
+{
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static ProjectConfigPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProjectConfigSwitch()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = ProjectConfigPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage)
+ {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject)
+ {
+ switch (classifierID)
+ {
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION:
+ {
+ WorkspaceConfiguration workspaceConfiguration = (WorkspaceConfiguration)theEObject;
+ T result = caseWorkspaceConfiguration(workspaceConfiguration);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ProjectConfigPackage.PROJECT:
+ {
+ Project project = (Project)theEObject;
+ T result = caseProject(project);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ProjectConfigPackage.PREFERENCE_PROFILE:
+ {
+ PreferenceProfile preferenceProfile = (PreferenceProfile)theEObject;
+ T result = casePreferenceProfile(preferenceProfile);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ProjectConfigPackage.PREFERENCE_FILTER:
+ {
+ PreferenceFilter preferenceFilter = (PreferenceFilter)theEObject;
+ T result = casePreferenceFilter(preferenceFilter);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Workspace Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Workspace Configuration</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseWorkspaceConfiguration(WorkspaceConfiguration object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Project</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Project</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseProject(Project object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Preference Profile</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Preference Profile</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePreferenceProfile(PreferenceProfile object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Preference Filter</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Preference Filter</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePreferenceFilter(PreferenceFilter object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object)
+ {
+ return null;
+ }
+
+} //ProjectConfigSwitch
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/util/ProjectConfigUtil.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/util/ProjectConfigUtil.java
new file mode 100644
index 0000000000..978d14670e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/util/ProjectConfigUtil.java
@@ -0,0 +1,290 @@
+/*
+ * Copyright (c) 2004-2013 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.releng.projectconfig.util;
+
+import org.eclipse.emf.cdo.releng.preferences.PreferenceNode;
+import org.eclipse.emf.cdo.releng.preferences.PreferencesFactory;
+import org.eclipse.emf.cdo.releng.preferences.Property;
+import org.eclipse.emf.cdo.releng.preferences.util.PreferencesUtil;
+import org.eclipse.emf.cdo.releng.projectconfig.PreferenceFilter;
+import org.eclipse.emf.cdo.releng.projectconfig.PreferenceProfile;
+import org.eclipse.emf.cdo.releng.projectconfig.Project;
+import org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigFactory;
+import org.eclipse.emf.cdo.releng.projectconfig.WorkspaceConfiguration;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Eike Stepper
+ */
+public final class ProjectConfigUtil
+{
+ private static final IWorkspaceRoot WORKSPACE_ROOT = ResourcesPlugin.getWorkspace().getRoot();
+
+ public static final String PROJECT_CONF_NODE_NAME = "org.eclipse.emf.cdo.releng.projectconfig";
+
+ public static final String PROJECT_CONF_PROJECT_KEY = "project";
+
+ public static final String PROJECT_CONF_PROFILES_KEY = "profiles";
+
+ public static final String PROJECT_CONF_REFERENCES_KEY = "references";
+
+ public static final String PROJECT_CONFIG_SCHEME = "configuration";
+
+ public static final URI PROJECT_CONFIG_URI = URI.createURI(PROJECT_CONFIG_SCHEME + ":/");
+
+ public static final WorkspaceConfiguration getWorkspaceConfiguration()
+ {
+ ResourceSet resourceSet = new ResourceSetImpl();
+ Resource resource = resourceSet.createResource(URI.createURI("*.projectconfig"));
+ resource.setURI(PROJECT_CONFIG_URI);
+
+ PreferenceNode rootPreferenceNode = PreferencesUtil.getRootPreferenceNode();
+
+ WorkspaceConfiguration workspaceConfiguration = ProjectConfigFactory.eINSTANCE.createWorkspaceConfiguration();
+ workspaceConfiguration.setInstancePreferenceNode(rootPreferenceNode.getNode("instance"));
+ workspaceConfiguration.setDefaultPreferenceNode(rootPreferenceNode.getNode("default"));
+
+ PreferenceNode projectsPreferenceNode = rootPreferenceNode.getNode("project");
+ EList<Project> projects = workspaceConfiguration.getProjects();
+
+ for (IProject iProject : WORKSPACE_ROOT.getProjects())
+ {
+ String name = iProject.getName();
+ PreferenceNode projectPreferenceNode = projectsPreferenceNode.getNode(name);
+ if (projectPreferenceNode != null)
+ {
+ Project project = ProjectConfigFactory.eINSTANCE.createProject();
+
+ PreferenceNode projectConfNode = projectPreferenceNode.getNode(PROJECT_CONF_NODE_NAME);
+ if (projectConfNode != null)
+ {
+ Property projectProperty = projectConfNode.getProperty(PROJECT_CONF_PROJECT_KEY);
+ if (projectProperty != null)
+ {
+ String value = projectProperty.getValue();
+ if (value != null)
+ {
+ XMLResourceImpl projectResource = new XMLResourceImpl(PROJECT_CONFIG_URI);
+ InputStream in = new URIConverter.ReadableInputStream(value);
+ try
+ {
+ projectResource.load(in, null);
+ }
+ catch (IOException ex)
+ {
+ // Ignore.
+ }
+ EList<EObject> contents = projectResource.getContents();
+ if (!contents.isEmpty())
+ {
+ project = (Project)contents.get(0);
+ }
+ }
+ }
+ }
+
+ if (project == null)
+ {
+ project = ProjectConfigFactory.eINSTANCE.createProject();
+ }
+
+ project.setPreferenceNode(projectPreferenceNode);
+
+ projects.add(project);
+ }
+ }
+
+ EList<EObject> contents = resource.getContents();
+ contents.add(workspaceConfiguration);
+ contents.add(rootPreferenceNode);
+
+ for (Project project : projects)
+ {
+ for (PreferenceProfile preferenceProfile : project.getPreferenceProfiles())
+ {
+ for (PreferenceFilter preferenceFilter : preferenceProfile.getPreferenceFilters())
+ {
+ preferenceFilter.getPreferenceNode();
+ }
+
+ for (PreferenceProfile requiredPreferenceProfile : preferenceProfile.getPrerequisites())
+ {
+ // Resolve proxies.
+ requiredPreferenceProfile.getClass();
+ }
+ }
+ EList<PreferenceProfile> profileReferences = project.getPreferenceProfileReferences();
+ ArrayList<PreferenceProfile> copy = new ArrayList<PreferenceProfile>(profileReferences);
+ profileReferences.clear();
+ profileReferences.addAll(copy);
+ }
+
+ workspaceConfiguration.updatePreferenceProfileReferences();
+
+ return workspaceConfiguration;
+ }
+
+ public static final void saveWorkspaceConfiguration(WorkspaceConfiguration workspaceConfiguration)
+ throws BackingStoreException
+ {
+ for (Project project : workspaceConfiguration.getProjects())
+ {
+ PreferenceNode projectPreferenceNode = project.getPreferenceNode();
+ String projectName = projectPreferenceNode.getName();
+
+ Preferences projectPreferences = PreferencesUtil.getPreferences(projectPreferenceNode, true);
+
+ EList<PreferenceProfile> preferenceProfiles = project.getPreferenceProfiles();
+ EList<PreferenceProfile> preferenceProfileReferences = project.getPreferenceProfileReferences();
+
+ String projectPropertyValue = null;
+ if (!preferenceProfileReferences.isEmpty() || !preferenceProfiles.isEmpty())
+ {
+ Project copy = EcoreUtil.copy(project);
+ copy.setPreferenceNode(null);
+ EList<PreferenceProfile> copyPreferenceProfileReferences = copy.getPreferenceProfileReferences();
+ copyPreferenceProfileReferences.clear();
+
+ for (PreferenceProfile preferenceProfileReference : preferenceProfileReferences)
+ {
+ if (preferenceProfileReference.getPredicates().isEmpty())
+ {
+ PreferenceProfile proxy = ProjectConfigFactory.eINSTANCE.createPreferenceProfile();
+ ((InternalEObject)proxy).eSetProxyURI(URI.createURI(".#"
+ + preferenceProfileReference.eResource().getURIFragment(preferenceProfileReference)));
+ copyPreferenceProfileReferences.add(proxy);
+ }
+ }
+
+ for (PreferenceProfile preferenceProfile : copy.getPreferenceProfiles())
+ {
+ for (PreferenceFilter preferenceFilter : preferenceProfile.getPreferenceFilters())
+ {
+ PreferenceNode preferenceNode = preferenceFilter.getPreferenceNode();
+ if (preferenceNode != null)
+ {
+ PreferenceNode proxy = PreferencesFactory.eINSTANCE.createPreferenceNode();
+ ((InternalEObject)proxy).eSetProxyURI(URI.createURI(".#"
+ + preferenceNode.eResource().getURIFragment(preferenceNode)));
+ preferenceFilter.setPreferenceNode(proxy);
+ }
+ }
+
+ EList<PreferenceProfile> requires = preferenceProfile.getPrerequisites();
+ List<PreferenceProfile> requiresCopy = new ArrayList<PreferenceProfile>(requires);
+ requires.clear();
+ for (PreferenceProfile requiredPreferenceProfile : requiresCopy)
+ {
+ Resource eResource = requiredPreferenceProfile.eResource();
+ if (eResource == null)
+ {
+ requires.add(requiredPreferenceProfile);
+ }
+ else
+ {
+ PreferenceProfile proxy = ProjectConfigFactory.eINSTANCE.createPreferenceProfile();
+ ((InternalEObject)proxy).eSetProxyURI(URI.createURI(".#"
+ + eResource.getURIFragment(requiredPreferenceProfile)));
+ requires.add(proxy);
+ }
+ }
+ }
+
+ if (!copy.getPreferenceProfiles().isEmpty() || !copy.getPreferenceProfileReferences().isEmpty())
+ {
+ Resource resource = new XMLResourceImpl(workspaceConfiguration.eResource().getURI());
+ resource.getContents().add(copy);
+
+ Map<Object, Object> options = new HashMap<Object, Object>();
+ options.put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ options.put(XMLResource.OPTION_LINE_WIDTH, 10);
+ options.put(XMLResource.OPTION_ENCODING, "UTF-8");
+ try
+ {
+ StringWriter writer = new StringWriter();
+ OutputStream out = new URIConverter.WriteableOutputStream(writer, "UTF-8");
+ resource.save(out, options);
+ projectPropertyValue = writer.toString();
+ }
+ catch (IOException ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+ }
+
+ if (projectPropertyValue == null)
+ {
+ if (projectPreferences.nodeExists(PROJECT_CONF_NODE_NAME))
+ {
+ projectPreferences.node(PROJECT_CONF_NODE_NAME).removeNode();
+ projectPreferences.flush();
+ }
+ }
+ else
+ {
+ System.err.println(projectName + " -> project = " + projectPropertyValue);
+
+ Preferences projectConfPreferences = projectPreferences.node(PROJECT_CONF_NODE_NAME);
+ projectConfPreferences.put(PROJECT_CONF_PROJECT_KEY, projectPropertyValue);
+ projectConfPreferences.flush();
+ }
+ }
+ }
+
+ public static IProject getProject(Project project)
+ {
+ PreferenceNode preferenceNode = project.getPreferenceNode();
+ if (preferenceNode != null)
+ {
+ String name = preferenceNode.getName();
+ if (name != null)
+ {
+ return WORKSPACE_ROOT.getProject(name);
+ }
+ }
+
+ return null;
+ }
+
+ public static Collection<PreferenceNode> getUnmanagedPreferenceNodes(Project project)
+ {
+ return ProjectConfigValidator.collectUnmanagedPreferences(project).values();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/util/ProjectConfigValidator.java b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/util/ProjectConfigValidator.java
new file mode 100644
index 0000000000..e88c76a58b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.projectconfig/src/org/eclipse/emf/cdo/releng/projectconfig/util/ProjectConfigValidator.java
@@ -0,0 +1,263 @@
+/**
+ */
+package org.eclipse.emf.cdo.releng.projectconfig.util;
+
+import org.eclipse.emf.cdo.releng.preferences.PreferenceNode;
+import org.eclipse.emf.cdo.releng.projectconfig.*;
+import org.eclipse.emf.cdo.releng.projectconfig.impl.ProjectConfigPlugin;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.EObjectValidator;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Pattern;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Validator</b> for the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.releng.projectconfig.ProjectConfigPackage
+ * @generated
+ */
+public class ProjectConfigValidator extends EObjectValidator
+{
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final ProjectConfigValidator INSTANCE = new ProjectConfigValidator();
+
+ /**
+ * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.common.util.Diagnostic#getSource()
+ * @see org.eclipse.emf.common.util.Diagnostic#getCode()
+ * @generated
+ */
+ public static final String DIAGNOSTIC_SOURCE = "org.eclipse.emf.cdo.releng.projectconfig";
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0;
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProjectConfigValidator()
+ {
+ super();
+ }
+
+ /**
+ * Returns the package of this validator switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EPackage getEPackage()
+ {
+ return ProjectConfigPackage.eINSTANCE;
+ }
+
+ /**
+ * Calls <code>validateXXX</code> for the corresponding classifier of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context)
+ {
+ switch (classifierID)
+ {
+ case ProjectConfigPackage.WORKSPACE_CONFIGURATION:
+ return validateWorkspaceConfiguration((WorkspaceConfiguration)value, diagnostics, context);
+ case ProjectConfigPackage.PROJECT:
+ return validateProject((Project)value, diagnostics, context);
+ case ProjectConfigPackage.PREFERENCE_PROFILE:
+ return validatePreferenceProfile((PreferenceProfile)value, diagnostics, context);
+ case ProjectConfigPackage.PREFERENCE_FILTER:
+ return validatePreferenceFilter((PreferenceFilter)value, diagnostics, context);
+ case ProjectConfigPackage.PATTERN:
+ return validatePattern((Pattern)value, diagnostics, context);
+ default:
+ return true;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateWorkspaceConfiguration(WorkspaceConfiguration workspaceConfiguration,
+ DiagnosticChain diagnostics, Map<Object, Object> context)
+ {
+ return validate_EveryDefaultConstraint(workspaceConfiguration, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateProject(Project project, DiagnosticChain diagnostics, Map<Object, Object> context)
+ {
+ if (!validate_NoCircularContainment(project, diagnostics, context)) return false;
+ boolean result = validate_EveryMultiplicityConforms(project, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryDataValueConforms(project, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(project, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(project, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryProxyResolves(project, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_UniqueID(project, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryKeyUnique(project, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(project, diagnostics, context);
+ if (result || diagnostics != null) result &= validateProject_AllPreferencesManaged(project, diagnostics, context);
+ return result;
+ }
+
+ static Map<String, PreferenceNode> collectUnmanagedPreferences(Project project)
+ {
+ Map<String, PreferenceNode> result = new LinkedHashMap<String, PreferenceNode>();
+ PreferenceNode preferenceNode = project.getPreferenceNode();
+ if (preferenceNode != null)
+ {
+ for (PreferenceNode child : preferenceNode.getChildren())
+ {
+ if (!child.getProperties().isEmpty())
+ {
+ result.put(child.getName(), child);
+ }
+ }
+
+ result.remove(ProjectConfigUtil.PROJECT_CONF_NODE_NAME);
+
+ for (PreferenceProfile preferenceProfile : project.getPreferenceProfiles())
+ {
+ for (PreferenceFilter preferenceFilter : preferenceProfile.getPreferenceFilters())
+ {
+ PreferenceNode otherPreferenceNode = preferenceFilter.getPreferenceNode();
+ if (otherPreferenceNode != null)
+ {
+ result.remove(otherPreferenceNode.getName());
+ }
+ }
+ }
+
+ for (PreferenceProfile preferenceProfile : project.getPreferenceProfileReferences())
+ {
+ for (PreferenceFilter preferenceFilter : preferenceProfile.getPreferenceFilters())
+ {
+ PreferenceNode otherPreferenceNode = preferenceFilter.getPreferenceNode();
+ if (otherPreferenceNode != null)
+ {
+ result.remove(otherPreferenceNode.getName());
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Validates the AllPreferencesManaged constraint of '<em>Project</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public boolean validateProject_AllPreferencesManaged(Project project, DiagnosticChain diagnostics,
+ Map<Object, Object> context)
+ {
+ Map<String, PreferenceNode> unmanagedPreferences = collectUnmanagedPreferences(project);
+
+ if (!unmanagedPreferences.isEmpty())
+ {
+ if (diagnostics != null)
+ {
+ String substitution = unmanagedPreferences.keySet().toString();
+ substitution = substitution.substring(1, substitution.length() - 1);
+ int lastComma = substitution.lastIndexOf(',');
+ if (lastComma != -1)
+ {
+ substitution = substitution.substring(0, lastComma) + " and " + substitution.substring(lastComma + 1);
+ }
+ List<Object> data = new ArrayList<Object>();
+ data.add(project);
+ data.add(ProjectConfigPackage.Literals.PROJECT__PREFERENCE_PROFILE_REFERENCES);
+ data.addAll(unmanagedPreferences.values());
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0,
+ "_UI_AllPreferencesManaged_diagnostic", new Object[] { substitution }, data.toArray(), context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePreferenceProfile(PreferenceProfile preferenceProfile, DiagnosticChain diagnostics,
+ Map<Object, Object> context)
+ {
+ return validate_EveryDefaultConstraint(preferenceProfile, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePreferenceFilter(PreferenceFilter preferenceFilter, DiagnosticChain diagnostics,
+ Map<Object, Object> context)
+ {
+ return validate_EveryDefaultConstraint(preferenceFilter, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePattern(Pattern pattern, DiagnosticChain diagnostics, Map<Object, Object> context)
+ {
+ return true;
+ }
+
+ /**
+ * Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator()
+ {
+ return ProjectConfigPlugin.INSTANCE;
+ }
+
+} // ProjectConfigValidator

Back to the top