Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.releng.preferences/src/org')
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferenceNode.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferencesFactory.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferencesPackage.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/Property.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferenceNodeImpl.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferencesFactoryImpl.java40
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferencesPackageImpl.java66
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PropertyImpl.java107
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesAdapterFactory.java56
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesSwitch.java50
10 files changed, 241 insertions, 135 deletions
diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferenceNode.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferenceNode.java
index 35c5597b3c..9b24a2c5d4 100644
--- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferenceNode.java
+++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferenceNode.java
@@ -1,9 +1,16 @@
-/**
+/*
+ * 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.preferences;
import org.eclipse.emf.common.util.EList;
-
import org.eclipse.emf.ecore.EObject;
/**
diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferencesFactory.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferencesFactory.java
index 427a8cb217..942882d95d 100644
--- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferencesFactory.java
+++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferencesFactory.java
@@ -1,4 +1,12 @@
-/**
+/*
+ * 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.preferences;
@@ -49,4 +57,4 @@ public interface PreferencesFactory extends EFactory
*/
PreferencesPackage getPreferencesPackage();
-} //PreferencesFactory
+} // PreferencesFactory
diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferencesPackage.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferencesPackage.java
index d8b8bf4ece..60a5a5d17a 100644
--- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferencesPackage.java
+++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/PreferencesPackage.java
@@ -1,4 +1,12 @@
-/**
+/*
+ * 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.preferences;
@@ -205,7 +213,6 @@ public interface PreferencesPackage extends EPackage
*/
int PROPERTY_OPERATION_COUNT = 0;
-
/**
* The meta object id for the '<em>Escaped String</em>' data type.
* <!-- begin-user-doc -->
@@ -216,7 +223,6 @@ public interface PreferencesPackage extends EPackage
*/
int ESCAPED_STRING = 2;
-
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceNode <em>Preference Node</em>}'.
* <!-- begin-user-doc -->
@@ -492,4 +498,4 @@ public interface PreferencesPackage extends EPackage
}
-} //PreferencesPackage
+} // PreferencesPackage
diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/Property.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/Property.java
index 2df74423c5..841a63c39f 100644
--- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/Property.java
+++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/Property.java
@@ -1,4 +1,12 @@
-/**
+/*
+ * 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.preferences;
diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferenceNodeImpl.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferenceNodeImpl.java
index 92abb11f66..676f11b81f 100644
--- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferenceNodeImpl.java
+++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferenceNodeImpl.java
@@ -1,4 +1,12 @@
-/**
+/*
+ * 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.preferences.impl;
diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferencesFactoryImpl.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferencesFactoryImpl.java
index 73af81b8a4..74db45a863 100644
--- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferencesFactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferencesFactoryImpl.java
@@ -1,4 +1,12 @@
-/**
+/*
+ * 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.preferences.impl;
@@ -6,6 +14,7 @@ import org.eclipse.emf.cdo.releng.preferences.PreferenceNode;
import org.eclipse.emf.cdo.releng.preferences.PreferencesFactory;
import org.eclipse.emf.cdo.releng.preferences.PreferencesPackage;
import org.eclipse.emf.cdo.releng.preferences.Property;
+
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
@@ -31,7 +40,8 @@ public class PreferencesFactoryImpl extends EFactoryImpl implements PreferencesF
{
try
{
- PreferencesFactory thePreferencesFactory = (PreferencesFactory)EPackage.Registry.INSTANCE.getEFactory(PreferencesPackage.eNS_URI);
+ PreferencesFactory thePreferencesFactory = (PreferencesFactory)EPackage.Registry.INSTANCE
+ .getEFactory(PreferencesPackage.eNS_URI);
if (thePreferencesFactory != null)
{
return thePreferencesFactory;
@@ -65,10 +75,12 @@ public class PreferencesFactoryImpl extends EFactoryImpl implements PreferencesF
{
switch (eClass.getClassifierID())
{
- case PreferencesPackage.PREFERENCE_NODE: return createPreferenceNode();
- case PreferencesPackage.PROPERTY: return createProperty();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ case PreferencesPackage.PREFERENCE_NODE:
+ return createPreferenceNode();
+ case PreferencesPackage.PROPERTY:
+ return createProperty();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
@@ -82,10 +94,10 @@ public class PreferencesFactoryImpl extends EFactoryImpl implements PreferencesF
{
switch (eDataType.getClassifierID())
{
- case PreferencesPackage.ESCAPED_STRING:
- return createEscapedStringFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ case PreferencesPackage.ESCAPED_STRING:
+ return createEscapedStringFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
@@ -99,10 +111,10 @@ public class PreferencesFactoryImpl extends EFactoryImpl implements PreferencesF
{
switch (eDataType.getClassifierID())
{
- case PreferencesPackage.ESCAPED_STRING:
- return convertEscapedStringToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ case PreferencesPackage.ESCAPED_STRING:
+ return convertEscapedStringToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferencesPackageImpl.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferencesPackageImpl.java
index dcc7b03510..1def78d942 100644
--- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferencesPackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PreferencesPackageImpl.java
@@ -1,4 +1,12 @@
-/**
+/*
+ * 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.preferences.impl;
@@ -13,7 +21,6 @@ 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.impl.EPackageImpl;
/**
@@ -86,10 +93,12 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP
*/
public static PreferencesPackage init()
{
- if (isInited) return (PreferencesPackage)EPackage.Registry.INSTANCE.getEPackage(PreferencesPackage.eNS_URI);
+ if (isInited)
+ return (PreferencesPackage)EPackage.Registry.INSTANCE.getEPackage(PreferencesPackage.eNS_URI);
// Obtain or create and register package
- PreferencesPackageImpl thePreferencesPackage = (PreferencesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PreferencesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PreferencesPackageImpl());
+ PreferencesPackageImpl thePreferencesPackage = (PreferencesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PreferencesPackageImpl ? EPackage.Registry.INSTANCE
+ .get(eNS_URI) : new PreferencesPackageImpl());
isInited = true;
@@ -102,7 +111,6 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP
// Mark meta-data to indicate it can't be changed
thePreferencesPackage.freeze();
-
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(PreferencesPackage.eNS_URI, thePreferencesPackage);
return thePreferencesPackage;
@@ -264,7 +272,8 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP
*/
public void createPackageContents()
{
- if (isCreated) return;
+ if (isCreated)
+ return;
isCreated = true;
// Create classes and their features
@@ -302,7 +311,8 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP
*/
public void initializePackageContents()
{
- if (isInitialized) return;
+ if (isInitialized)
+ return;
isInitialized = true;
// Initialize package
@@ -317,25 +327,41 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP
// Add supertypes to classes
// Initialize classes, features, and operations; add parameters
- initEClass(preferenceNodeEClass, PreferenceNode.class, "PreferenceNode", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getPreferenceNode_Children(), this.getPreferenceNode(), this.getPreferenceNode_Parent(), "children", null, 0, -1, PreferenceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(preferenceNodeEClass, PreferenceNode.class, "PreferenceNode", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getPreferenceNode_Children(), this.getPreferenceNode(), this.getPreferenceNode_Parent(), "children",
+ null, 0, -1, PreferenceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
+ !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
getPreferenceNode_Children().getEKeys().add(this.getPreferenceNode_Name());
- initEReference(getPreferenceNode_Parent(), this.getPreferenceNode(), this.getPreferenceNode_Children(), "parent", null, 0, 1, PreferenceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getPreferenceNode_Properties(), this.getProperty(), this.getProperty_Parent(), "properties", null, 0, -1, PreferenceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPreferenceNode_Parent(), this.getPreferenceNode(), this.getPreferenceNode_Children(), "parent",
+ null, 0, 1, PreferenceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
+ !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPreferenceNode_Properties(), this.getProperty(), this.getProperty_Parent(), "properties", null,
+ 0, -1, PreferenceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
+ !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
getPreferenceNode_Properties().getEKeys().add(this.getProperty_Name());
- initEAttribute(getPreferenceNode_Name(), ecorePackage.getEString(), "name", null, 1, 1, PreferenceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getPreferenceNode_Location(), ecorePackage.getEString(), "location", null, 0, 1, PreferenceNode.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
-
- EOperation op = initEOperation(getPreferenceNode__GetNode__String(), this.getPreferenceNode(), "getNode", 0, 1, IS_UNIQUE, IS_ORDERED);
+ initEAttribute(getPreferenceNode_Name(), ecorePackage.getEString(), "name", null, 1, 1, PreferenceNode.class,
+ !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPreferenceNode_Location(), ecorePackage.getEString(), "location", null, 0, 1,
+ PreferenceNode.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED,
+ IS_ORDERED);
+
+ EOperation op = initEOperation(getPreferenceNode__GetNode__String(), this.getPreferenceNode(), "getNode", 0, 1,
+ IS_UNIQUE, IS_ORDERED);
addEParameter(op, ecorePackage.getEString(), "name", 0, 1, IS_UNIQUE, IS_ORDERED);
- op = initEOperation(getPreferenceNode__GetProperty__String(), this.getProperty(), "getProperty", 0, 1, IS_UNIQUE, IS_ORDERED);
+ op = initEOperation(getPreferenceNode__GetProperty__String(), this.getProperty(), "getProperty", 0, 1, IS_UNIQUE,
+ IS_ORDERED);
addEParameter(op, ecorePackage.getEString(), "name", 0, 1, IS_UNIQUE, IS_ORDERED);
initEClass(propertyEClass, Property.class, "Property", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getProperty_Name(), ecorePackage.getEString(), "name", null, 1, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getProperty_Parent(), this.getPreferenceNode(), this.getPreferenceNode_Properties(), "parent", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getProperty_Value(), this.getEscapedString(), "value", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getProperty_Name(), ecorePackage.getEString(), "name", null, 1, 1, Property.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getProperty_Parent(), this.getPreferenceNode(), this.getPreferenceNode_Properties(), "parent", null,
+ 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES,
+ !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getProperty_Value(), this.getEscapedString(), "value", null, 0, 1, Property.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Initialize data types
initEDataType(escapedStringEDataType, String.class, "EscapedString", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
@@ -344,4 +370,4 @@ public class PreferencesPackageImpl extends EPackageImpl implements PreferencesP
createResource(eNS_URI);
}
-} //PreferencesPackageImpl
+} // PreferencesPackageImpl
diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PropertyImpl.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PropertyImpl.java
index 8319e1e9b7..896a5977a3 100644
--- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PropertyImpl.java
+++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/impl/PropertyImpl.java
@@ -1,4 +1,12 @@
-/**
+/*
+ * 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.preferences.impl;
@@ -8,13 +16,10 @@ import org.eclipse.emf.cdo.releng.preferences.Property;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
-
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;
/**
@@ -125,7 +130,8 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
*/
public PreferenceNode getParent()
{
- if (eContainerFeatureID() != PreferencesPackage.PROPERTY__PARENT) return null;
+ if (eContainerFeatureID() != PreferencesPackage.PROPERTY__PARENT)
+ return null;
return (PreferenceNode)eInternalContainer();
}
@@ -147,7 +153,8 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
*/
public void setParent(PreferenceNode newParent)
{
- if (newParent != eInternalContainer() || (eContainerFeatureID() != PreferencesPackage.PROPERTY__PARENT && newParent != null))
+ if (newParent != eInternalContainer()
+ || (eContainerFeatureID() != PreferencesPackage.PROPERTY__PARENT && newParent != null))
{
if (EcoreUtil.isAncestor(this, newParent))
throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
@@ -155,9 +162,11 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
if (newParent != null)
- msgs = ((InternalEObject)newParent).eInverseAdd(this, PreferencesPackage.PREFERENCE_NODE__PROPERTIES, PreferenceNode.class, msgs);
+ msgs = ((InternalEObject)newParent).eInverseAdd(this, PreferencesPackage.PREFERENCE_NODE__PROPERTIES,
+ PreferenceNode.class, msgs);
msgs = basicSetParent(newParent, msgs);
- if (msgs != null) msgs.dispatch();
+ if (msgs != null)
+ msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PreferencesPackage.PROPERTY__PARENT, newParent, newParent));
@@ -196,10 +205,10 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
{
switch (featureID)
{
- case PreferencesPackage.PROPERTY__PARENT:
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return basicSetParent((PreferenceNode)otherEnd, msgs);
+ case PreferencesPackage.PROPERTY__PARENT:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetParent((PreferenceNode)otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
@@ -214,8 +223,8 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
{
switch (featureID)
{
- case PreferencesPackage.PROPERTY__PARENT:
- return basicSetParent(null, msgs);
+ case PreferencesPackage.PROPERTY__PARENT:
+ return basicSetParent(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -230,8 +239,9 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
{
switch (eContainerFeatureID())
{
- case PreferencesPackage.PROPERTY__PARENT:
- return eInternalContainer().eInverseRemove(this, PreferencesPackage.PREFERENCE_NODE__PROPERTIES, PreferenceNode.class, msgs);
+ case PreferencesPackage.PROPERTY__PARENT:
+ return eInternalContainer().eInverseRemove(this, PreferencesPackage.PREFERENCE_NODE__PROPERTIES,
+ PreferenceNode.class, msgs);
}
return super.eBasicRemoveFromContainerFeature(msgs);
}
@@ -246,12 +256,12 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
{
switch (featureID)
{
- case PreferencesPackage.PROPERTY__NAME:
- return getName();
- case PreferencesPackage.PROPERTY__PARENT:
- return getParent();
- case PreferencesPackage.PROPERTY__VALUE:
- return getValue();
+ case PreferencesPackage.PROPERTY__NAME:
+ return getName();
+ case PreferencesPackage.PROPERTY__PARENT:
+ return getParent();
+ case PreferencesPackage.PROPERTY__VALUE:
+ return getValue();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -266,15 +276,15 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
{
switch (featureID)
{
- case PreferencesPackage.PROPERTY__NAME:
- setName((String)newValue);
- return;
- case PreferencesPackage.PROPERTY__PARENT:
- setParent((PreferenceNode)newValue);
- return;
- case PreferencesPackage.PROPERTY__VALUE:
- setValue((String)newValue);
- return;
+ case PreferencesPackage.PROPERTY__NAME:
+ setName((String)newValue);
+ return;
+ case PreferencesPackage.PROPERTY__PARENT:
+ setParent((PreferenceNode)newValue);
+ return;
+ case PreferencesPackage.PROPERTY__VALUE:
+ setValue((String)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -289,15 +299,15 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
{
switch (featureID)
{
- case PreferencesPackage.PROPERTY__NAME:
- setName(NAME_EDEFAULT);
- return;
- case PreferencesPackage.PROPERTY__PARENT:
- setParent((PreferenceNode)null);
- return;
- case PreferencesPackage.PROPERTY__VALUE:
- setValue(VALUE_EDEFAULT);
- return;
+ case PreferencesPackage.PROPERTY__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case PreferencesPackage.PROPERTY__PARENT:
+ setParent((PreferenceNode)null);
+ return;
+ case PreferencesPackage.PROPERTY__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -312,12 +322,12 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
{
switch (featureID)
{
- case PreferencesPackage.PROPERTY__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case PreferencesPackage.PROPERTY__PARENT:
- return getParent() != null;
- case PreferencesPackage.PROPERTY__VALUE:
- return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ case PreferencesPackage.PROPERTY__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case PreferencesPackage.PROPERTY__PARENT:
+ return getParent() != null;
+ case PreferencesPackage.PROPERTY__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
}
return super.eIsSet(featureID);
}
@@ -330,7 +340,8 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
@Override
public String toString()
{
- if (eIsProxy()) return super.toString();
+ if (eIsProxy())
+ return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (name: ");
@@ -341,4 +352,4 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
return result.toString();
}
-} //PropertyImpl
+} // PropertyImpl
diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesAdapterFactory.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesAdapterFactory.java
index 41057ad260..c8280c760a 100644
--- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesAdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesAdapterFactory.java
@@ -1,14 +1,22 @@
-/**
+/*
+ * 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.preferences.util;
-import org.eclipse.emf.cdo.releng.preferences.*;
+import org.eclipse.emf.cdo.releng.preferences.PreferenceNode;
+import org.eclipse.emf.cdo.releng.preferences.PreferencesPackage;
+import org.eclipse.emf.cdo.releng.preferences.Property;
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;
/**
@@ -71,25 +79,26 @@ public class PreferencesAdapterFactory extends AdapterFactoryImpl
* <!-- end-user-doc -->
* @generated
*/
- protected PreferencesSwitch<Adapter> modelSwitch =
- new PreferencesSwitch<Adapter>()
+ protected PreferencesSwitch<Adapter> modelSwitch = new PreferencesSwitch<Adapter>()
+ {
+ @Override
+ public Adapter casePreferenceNode(PreferenceNode object)
+ {
+ return createPreferenceNodeAdapter();
+ }
+
+ @Override
+ public Adapter caseProperty(Property object)
+ {
+ return createPropertyAdapter();
+ }
+
+ @Override
+ public Adapter defaultCase(EObject object)
{
- @Override
- public Adapter casePreferenceNode(PreferenceNode object)
- {
- return createPreferenceNodeAdapter();
- }
- @Override
- public Adapter caseProperty(Property object)
- {
- return createPropertyAdapter();
- }
- @Override
- public Adapter defaultCase(EObject object)
- {
- return createEObjectAdapter();
- }
- };
+ return createEObjectAdapter();
+ }
+ };
/**
* Creates an adapter for the <code>target</code>.
@@ -105,7 +114,6 @@ public class PreferencesAdapterFactory extends AdapterFactoryImpl
return modelSwitch.doSwitch((EObject)target);
}
-
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.releng.preferences.PreferenceNode <em>Preference Node</em>}'.
* <!-- begin-user-doc -->
@@ -149,4 +157,4 @@ public class PreferencesAdapterFactory extends AdapterFactoryImpl
return null;
}
-} //PreferencesAdapterFactory
+} // PreferencesAdapterFactory
diff --git a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesSwitch.java b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesSwitch.java
index c4de14a7f7..14f3e66c56 100644
--- a/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesSwitch.java
+++ b/plugins/org.eclipse.emf.cdo.releng.preferences/src/org/eclipse/emf/cdo/releng/preferences/util/PreferencesSwitch.java
@@ -1,12 +1,21 @@
-/**
+/*
+ * 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.preferences.util;
-import org.eclipse.emf.cdo.releng.preferences.*;
+import org.eclipse.emf.cdo.releng.preferences.PreferenceNode;
+import org.eclipse.emf.cdo.releng.preferences.PreferencesPackage;
+import org.eclipse.emf.cdo.releng.preferences.Property;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
-
import org.eclipse.emf.ecore.util.Switch;
/**
@@ -72,21 +81,24 @@ public class PreferencesSwitch<T> extends Switch<T>
{
switch (classifierID)
{
- case PreferencesPackage.PREFERENCE_NODE:
- {
- PreferenceNode preferenceNode = (PreferenceNode)theEObject;
- T result = casePreferenceNode(preferenceNode);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case PreferencesPackage.PROPERTY:
- {
- Property property = (Property)theEObject;
- T result = caseProperty(property);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
+ case PreferencesPackage.PREFERENCE_NODE:
+ {
+ PreferenceNode preferenceNode = (PreferenceNode)theEObject;
+ T result = casePreferenceNode(preferenceNode);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PreferencesPackage.PROPERTY:
+ {
+ Property property = (Property)theEObject;
+ T result = caseProperty(property);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
}
}
@@ -139,4 +151,4 @@ public class PreferencesSwitch<T> extends Switch<T>
return null;
}
-} //PreferencesSwitch
+} // PreferencesSwitch

Back to the top