Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2020-06-07 07:30:13 +0000
committerEike Stepper2020-06-07 07:30:13 +0000
commitbb8a4f3928a633f438dd30406784b3b948c7d7f1 (patch)
treec2334f18f5ce84eeee9ff71d5a1144a211c25cc6
parentc6ab623856e1dcdc1403f114b7ac0fa22b7c05a4 (diff)
downloadcdo-bb8a4f3928a633f438dd30406784b3b948c7d7f1.tar.gz
cdo-bb8a4f3928a633f438dd30406784b3b948c7d7f1.tar.xz
cdo-bb8a4f3928a633f438dd30406784b3b948c7d7f1.zip
[Releng] Regenerate etypes with Java 8 compliance
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/CDOEditPlugin.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/ModelElementItemProvider.java32
-rw-r--r--plugins/org.eclipse.emf.cdo/model/etypes.genmodel2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java54
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/util/EtypesSwitch.java6
5 files changed, 55 insertions, 41 deletions
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/CDOEditPlugin.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/CDOEditPlugin.java
index fcb471a65e..65927c8233 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/CDOEditPlugin.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/CDOEditPlugin.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
/**
- * This is the central singleton for the Eresource edit plugin.
+ * This is the central singleton for the Etypes edit plugin.
* <!-- begin-user-doc -->
*
* @since 4.0 <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/ModelElementItemProvider.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/ModelElementItemProvider.java
index 7acd58b7f1..a6c3b2cdd9 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/ModelElementItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/ModelElementItemProvider.java
@@ -117,6 +117,22 @@ public class ModelElementItemProvider extends CDOItemProviderAdapter
}
/**
+ * This returns <code>getImage(object)</code> for the column index <code>0</code> or <code>super.getImage(object)</code> otherwise.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getText(Object)
+ * @see #getColumnText(Object, int)
+ * @generated
+ */
+ @Override
+ public Object getColumnImage(Object object, int columnIndex)
+ {
+ // TODO: implement this method to return appropriate information for each column.
+ // Ensure that you remove @generated or mark it @generated NOT
+ return columnIndex == 0 ? getImage(object) : super.getImage(object);
+ }
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -139,6 +155,22 @@ public class ModelElementItemProvider extends CDOItemProviderAdapter
}
/**
+ * This returns <code>getText(object)</code> for the column index <code>0</code> or <code>super.getText(object)</code> otherwise.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImage(Object)
+ * @see #getColumnImage(Object, int)
+ * @generated
+ */
+ @Override
+ public String getColumnText(Object object, int columnIndex)
+ {
+ // TODO: implement this method to return appropriate information for each column.
+ // Ensure that you remove @generated or mark it @generated NOT
+ return columnIndex == 0 ? getText(object) : super.getText(object);
+ }
+
+ /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc --> <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo/model/etypes.genmodel b/plugins/org.eclipse.emf.cdo/model/etypes.genmodel
index 59be8537b9..1ab64cf807 100644
--- a/plugins/org.eclipse.emf.cdo/model/etypes.genmodel
+++ b/plugins/org.eclipse.emf.cdo/model/etypes.genmodel
@@ -6,7 +6,7 @@
updateClasspath="false" nonNLSMarkers="true" rootExtendsInterface="org.eclipse.emf.cdo.CDOObject"
rootExtendsClass="org.eclipse.emf.internal.cdo.CDOObjectImpl" reflectiveDelegation="true"
codeFormatting="true" testsDirectory="" importerID="org.eclipse.emf.importer.ecore"
- featureDelegation="Reflective" complianceLevel="5.0" copyrightFields="false" providerRootExtendsClass="org.eclipse.emf.cdo.edit.CDOItemProviderAdapter"
+ featureDelegation="Reflective" complianceLevel="8.0" copyrightFields="false" providerRootExtendsClass="org.eclipse.emf.cdo.edit.CDOItemProviderAdapter"
testsPluginID="org.eclipse.emf.cdo.editor" optimizedHasChildren="true" tableProviders="true"
colorProviders="true" fontProviders="true" runtimeVersion="2.6">
<foreignModel>etypes.ecore</foreignModel>
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java
index 372542ab4e..b508ba37ed 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java
@@ -121,14 +121,12 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage
public static EtypesPackage init()
{
if (isInited)
- {
return (EtypesPackage)EPackage.Registry.INSTANCE.getEPackage(EtypesPackage.eNS_URI);
- }
// Obtain or create and register package
- EtypesPackageImpl theEtypesPackage = (EtypesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof EtypesPackageImpl
- ? EPackage.Registry.INSTANCE.get(eNS_URI)
- : new EtypesPackageImpl());
+ Object registeredEtypesPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
+ EtypesPackageImpl theEtypesPackage = registeredEtypesPackage instanceof EtypesPackageImpl ? (EtypesPackageImpl)registeredEtypesPackage
+ : new EtypesPackageImpl();
isInited = true;
@@ -307,9 +305,7 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage
public void createPackageContents()
{
if (isCreated)
- {
return;
- }
isCreated = true;
// Create classes and their features
@@ -346,9 +342,7 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage
public void initializePackageContents()
{
if (isInitialized)
- {
return;
- }
isInitialized = true;
// Initialize package
@@ -362,39 +356,33 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage
// Set bounds for type parameters
// Add supertypes to classes
- annotationEClass.getESuperTypes().add(getModelElement());
+ annotationEClass.getESuperTypes().add(this.getModelElement());
// Initialize classes and features; add operations and parameters
- initEClass(modelElementEClass, ModelElement.class, "ModelElement", IS_ABSTRACT, !IS_INTERFACE, //$NON-NLS-1$
- IS_GENERATED_INSTANCE_CLASS);
- initEReference(getModelElement_Annotations(), getAnnotation(), getAnnotation_ModelElement(), "annotations", null, 0, //$NON-NLS-1$
- -1, ModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
-
- EOperation op = addEOperation(modelElementEClass, getAnnotation(), "getAnnotation", 0, 1, IS_UNIQUE, //$NON-NLS-1$
- IS_ORDERED);
+ initEClass(modelElementEClass, ModelElement.class, "ModelElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getModelElement_Annotations(), this.getAnnotation(), this.getAnnotation_ModelElement(), "annotations", null, 0, -1, ModelElement.class, //$NON-NLS-1$
+ !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ EOperation op = addEOperation(modelElementEClass, this.getAnnotation(), "getAnnotation", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
addEParameter(op, ecorePackage.getEString(), "source", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
- initEClass(annotationEClass, Annotation.class, "Annotation", !IS_ABSTRACT, !IS_INTERFACE, //$NON-NLS-1$
- IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getAnnotation_Source(), ecorePackage.getEString(), "source", null, 0, 1, Annotation.class, //$NON-NLS-1$
- !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAnnotation_Details(), ecorePackage.getEStringToStringMapEntry(), null, "details", null, 0, -1, //$NON-NLS-1$
- Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAnnotation_ModelElement(), getModelElement(), getModelElement_Annotations(), "modelElement", null, //$NON-NLS-1$
- 0, 1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
- initEReference(getAnnotation_Contents(), ecorePackage.getEObject(), null, "contents", null, 0, -1, Annotation.class, //$NON-NLS-1$
- !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAnnotation_References(), ecorePackage.getEObject(), null, "references", null, 0, -1, //$NON-NLS-1$
- Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(annotationEClass, Annotation.class, "Annotation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getAnnotation_Source(), ecorePackage.getEString(), "source", null, 0, 1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$
+ !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getAnnotation_Details(), ecorePackage.getEStringToStringMapEntry(), null, "details", null, 0, -1, Annotation.class, !IS_TRANSIENT, //$NON-NLS-1$
+ !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getAnnotation_ModelElement(), this.getModelElement(), this.getModelElement_Annotations(), "modelElement", null, 0, 1, Annotation.class, //$NON-NLS-1$
+ !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getAnnotation_Contents(), ecorePackage.getEObject(), null, "contents", null, 0, -1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$
+ IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getAnnotation_References(), ecorePackage.getEObject(), null, "references", null, 0, -1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$
+ IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Initialize data types
initEDataType(blobEDataType, CDOBlob.class, "Blob", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(clobEDataType, CDOClob.class, "Clob", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(lobEDataType, CDOLob.class, "Lob", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEDataType(inputStreamEDataType, InputStream.class, "InputStream", !IS_SERIALIZABLE, //$NON-NLS-1$
- !IS_GENERATED_INSTANCE_CLASS);
+ initEDataType(inputStreamEDataType, InputStream.class, "InputStream", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEDataType(readerEDataType, Reader.class, "Reader", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
// Create resource
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/util/EtypesSwitch.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/util/EtypesSwitch.java
index ae4044e8cc..88a7c1cb5d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/util/EtypesSwitch.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/util/EtypesSwitch.java
@@ -94,9 +94,7 @@ public class EtypesSwitch<T>
ModelElement modelElement = (ModelElement)theEObject;
T result = caseModelElement(modelElement);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case EtypesPackage.ANNOTATION:
@@ -104,13 +102,9 @@ public class EtypesSwitch<T>
Annotation annotation = (Annotation)theEObject;
T result = caseAnnotation(annotation);
if (result == null)
- {
result = caseModelElement(annotation);
- }
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
default:

Back to the top