[521126] Improve support for newer versions
diff --git a/features/org.eclipse.emf.codegen.ecore.ui-feature/feature.xml b/features/org.eclipse.emf.codegen.ecore.ui-feature/feature.xml
index dd3e87e..430011a 100644
--- a/features/org.eclipse.emf.codegen.ecore.ui-feature/feature.xml
+++ b/features/org.eclipse.emf.codegen.ecore.ui-feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.emf.codegen.ecore.ui"
label="%featureName"
- version="2.13.0.qualifier"
+ version="2.14.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.emf.license"
license-feature-version="2.8.0.qualifier">
diff --git a/plugins/org.eclipse.emf.codegen.ecore.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.codegen.ecore.ui/META-INF/MANIFEST.MF
index 57be7ae..aca9ee3 100644
--- a/plugins/org.eclipse.emf.codegen.ecore.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.codegen.ecore.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.codegen.ecore.ui; singleton:=true
-Bundle-Version: 2.13.0.qualifier
+Bundle-Version: 2.14.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.emf.codegen.ecore.genmodel.provider.GenModelEditPlugin$Implementation
Bundle-Vendor: %providerName
diff --git a/plugins/org.eclipse.emf.codegen.ecore.ui/plugin.properties b/plugins/org.eclipse.emf.codegen.ecore.ui/plugin.properties
index f33755e..984639a 100644
--- a/plugins/org.eclipse.emf.codegen.ecore.ui/plugin.properties
+++ b/plugins/org.eclipse.emf.codegen.ecore.ui/plugin.properties
@@ -330,6 +330,7 @@
_UI_GenJDKLevel_JDK60_literal = 6.0
_UI_GenJDKLevel_JDK70_literal = 7.0
_UI_GenJDKLevel_JDK80_literal = 8.0
+_UI_GenJDKLevel_JDK90_literal = 9.0
_UI_GenModel_complianceLevel_description = The JDK compliance level for the generated Java code
_UI_GenTypeParameter_type = Gen Type Parameter
_UI_GenTypeParameter_ecoreTypeParameter_feature = Ecore Type Parameter
@@ -392,6 +393,7 @@
_UI_GenRuntimeVersion_EMF211_literal = 2.11
_UI_GenRuntimeVersion_EMF212_literal = 2.12
_UI_GenRuntimeVersion_EMF213_literal = 2.13
+_UI_GenRuntimeVersion_EMF214_literal = 2.14
_UI_GenPackage_contentTypeIdentifier_feature = Content Type Identifier
_UI_GenPackage_contentTypeIdentifier_description = A content type identifier against which to register this model's resource factory
_UI_GenPackage_fileExtensions_feature = File Extensions
@@ -454,3 +456,12 @@
_UI_GenModel_oSGiCompatible_feature = OSGi Compatible
_UI_GenModel_oSGiCompatible_description = Whether to generate bundles that are purely compatible with any OSGi runtime implementation
+_UI_GenModel_eclipsePlatformVersion_feature = Eclipse Platform Version
+_UI_GenModel_eclipsePlatformVersion_description = The version of the Eclipse runtime against which to target the generated code for an RCP or IDE runtime platform
+_UI_GenEclipsePlatformVersion_Juno_literal = Juno - 4.2
+_UI_GenEclipsePlatformVersion_Kepler_literal = Kepler - 4.3
+_UI_GenEclipsePlatformVersion_Luna_literal = Luna - 4.4
+_UI_GenEclipsePlatformVersion_Mars_literal = Mars - 4.5
+_UI_GenEclipsePlatformVersion_Neon_literal = Neon - 4.6
+_UI_GenEclipsePlatformVersion_Oxygen_literal = Oxygen - 4.7
+_UI_GenEclipsePlatformVersion_Photon_literal = Photon - 4.8
diff --git a/plugins/org.eclipse.emf.codegen.ecore.ui/src/org/eclipse/emf/codegen/ecore/genmodel/presentation/GenModelEditor.java b/plugins/org.eclipse.emf.codegen.ecore.ui/src/org/eclipse/emf/codegen/ecore/genmodel/presentation/GenModelEditor.java
index e7643f5..cf787cb 100644
--- a/plugins/org.eclipse.emf.codegen.ecore.ui/src/org/eclipse/emf/codegen/ecore/genmodel/presentation/GenModelEditor.java
+++ b/plugins/org.eclipse.emf.codegen.ecore.ui/src/org/eclipse/emf/codegen/ecore/genmodel/presentation/GenModelEditor.java
@@ -338,6 +338,8 @@
protected EContentAdapter problemIndicationAdapter =
new EContentAdapter()
{
+ protected boolean dispatching;
+
@Override
public void notifyChanged(Notification notification)
{
@@ -359,18 +361,7 @@
{
resourceToDiagnosticMap.remove(resource);
}
-
- if (updateProblemIndication)
- {
- getSite().getShell().getDisplay().asyncExec
- (new Runnable()
- {
- public void run()
- {
- updateProblemIndication();
- }
- });
- }
+ dispatchUpdateProblemIndication();
break;
}
}
@@ -381,6 +372,23 @@
}
}
+ protected void dispatchUpdateProblemIndication()
+ {
+ if (updateProblemIndication && !dispatching)
+ {
+ dispatching = true;
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable()
+ {
+ public void run()
+ {
+ dispatching = false;
+ updateProblemIndication();
+ }
+ });
+ }
+ }
+
@Override
protected void setTarget(Resource target)
{
@@ -392,17 +400,7 @@
{
basicUnsetTarget(target);
resourceToDiagnosticMap.remove(target);
- if (updateProblemIndication)
- {
- getSite().getShell().getDisplay().asyncExec
- (new Runnable()
- {
- public void run()
- {
- updateProblemIndication();
- }
- });
- }
+ dispatchUpdateProblemIndication();
}
};
@@ -665,17 +663,13 @@
if (markerHelper.hasMarkers(editingDomain.getResourceSet()))
{
- markerHelper.deleteMarkers(editingDomain.getResourceSet());
- if (diagnostic.getSeverity() != Diagnostic.OK)
+ try
{
- try
- {
- markerHelper.createMarkers(diagnostic);
- }
- catch (CoreException exception)
- {
- GenModelEditPlugin.INSTANCE.log(exception);
- }
+ markerHelper.updateMarkers(diagnostic);
+ }
+ catch (CoreException exception)
+ {
+ GenModelEditPlugin.INSTANCE.log(exception);
}
}
}
@@ -1253,6 +1247,7 @@
// Set up the tree viewer.
//
+ contentOutlineViewer.setUseHashlookup(true);
contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
contentOutlineViewer.setInput(editingDomain.getResourceSet());
@@ -1405,8 +1400,10 @@
// Save the resources to the file system.
//
boolean first = true;
- for (Resource resource : editingDomain.getResourceSet().getResources())
+ List<Resource> resources = editingDomain.getResourceSet().getResources();
+ for (int i = 0; i < resources.size(); ++i)
{
+ Resource resource = resources.get(i);
if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource))
{
try
diff --git a/plugins/org.eclipse.emf.codegen.ecore.ui/src/org/eclipse/emf/codegen/ecore/genmodel/provider/GenModelItemProvider.java b/plugins/org.eclipse.emf.codegen.ecore.ui/src/org/eclipse/emf/codegen/ecore/genmodel/provider/GenModelItemProvider.java
index a4e7351..29b52d0 100644
--- a/plugins/org.eclipse.emf.codegen.ecore.ui/src/org/eclipse/emf/codegen/ecore/genmodel/provider/GenModelItemProvider.java
+++ b/plugins/org.eclipse.emf.codegen.ecore.ui/src/org/eclipse/emf/codegen/ecore/genmodel/provider/GenModelItemProvider.java
@@ -148,6 +148,7 @@
addStyleProvidersPropertyDescriptor(object);
addCleanupPropertyDescriptor(object);
addOSGiCompatiblePropertyDescriptor(object);
+ addEclipsePlatformVersionPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
@@ -1994,6 +1995,29 @@
}
/**
+ * This adds a property descriptor for the Eclipse Platform Version feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addEclipsePlatformVersionPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenModel_eclipsePlatformVersion_feature"),
+ getString("_UI_GenModel_eclipsePlatformVersion_description"),
+ GenModelPackage.Literals.GEN_MODEL__ECLIPSE_PLATFORM_VERSION,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ getString("_UI_AllPropertyCategory"),
+ null));
+ }
+
+ /**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
@@ -2143,6 +2167,7 @@
case GenModelPackage.GEN_MODEL__STYLE_PROVIDERS:
case GenModelPackage.GEN_MODEL__CLEANUP:
case GenModelPackage.GEN_MODEL__OS_GI_COMPATIBLE:
+ case GenModelPackage.GEN_MODEL__ECLIPSE_PLATFORM_VERSION:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case GenModelPackage.GEN_MODEL__GEN_PACKAGES:
diff --git a/plugins/org.eclipse.emf.codegen.ecore/model/GenModel.ecore b/plugins/org.eclipse.emf.codegen.ecore/model/GenModel.ecore
index afb6a09..303f493 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/model/GenModel.ecore
+++ b/plugins/org.eclipse.emf.codegen.ecore/model/GenModel.ecore
@@ -131,6 +131,12 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="styleProviders" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="cleanup" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="oSGiCompatible" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="eclipsePlatformVersion"
+ eType="#//GenEclipsePlatformVersion" unsettable="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="@since 2.14"/>
+ </eAnnotations>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GenPackage" eSuperTypes="#//GenBase">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="prefix" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
@@ -312,6 +318,11 @@
<eLiterals name="JDK60" value="2" literal="6.0"/>
<eLiterals name="JDK70" value="3" literal="7.0"/>
<eLiterals name="JDK80" value="4" literal="8.0"/>
+ <eLiterals name="JDK90" value="5" literal="9.0">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="@since 2.14"/>
+ </eAnnotations>
+ </eLiterals>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GenTypeParameter" eSuperTypes="#//GenBase">
<eStructuralFeatures xsi:type="ecore:EReference" name="ecoreTypeParameter" lowerBound="1"
@@ -330,6 +341,11 @@
<eLiterals name="EMF211" value="9" literal="2.11"/>
<eLiterals name="EMF212" value="10" literal="2.12"/>
<eLiterals name="EMF213" value="11" literal="2.13"/>
+ <eLiterals name="EMF214" value="12" literal="2.14">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="@since 2.14"/>
+ </eAnnotations>
+ </eLiterals>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="GenRuntimePlatform">
<eLiterals name="IDE"/>
@@ -342,4 +358,16 @@
<eLiterals name="Manual" value="1"/>
<eLiterals name="Live" value="2"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="GenEclipsePlatformVersion">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="@since 2.14"/>
+ </eAnnotations>
+ <eLiterals name="Juno"/>
+ <eLiterals name="Kepler" value="1"/>
+ <eLiterals name="Luna" value="2"/>
+ <eLiterals name="Mars" value="3"/>
+ <eLiterals name="Neon" value="4"/>
+ <eLiterals name="Oxygen" value="5"/>
+ <eLiterals name="Photon" value="6"/>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/plugins/org.eclipse.emf.codegen.ecore/model/GenModel.genmodel b/plugins/org.eclipse.emf.codegen.ecore/model/GenModel.genmodel
index 2be5ee3..2a175ef 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/model/GenModel.genmodel
+++ b/plugins/org.eclipse.emf.codegen.ecore/model/GenModel.genmodel
@@ -39,6 +39,7 @@
<genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenJDKLevel/JDK60"/>
<genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenJDKLevel/JDK70"/>
<genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenJDKLevel/JDK80"/>
+ <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenJDKLevel/JDK90"/>
</genEnums>
<genEnums typeSafeEnumCompatible="false" ecoreEnum="GenModel.ecore#//GenRuntimeVersion">
<genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenRuntimeVersion/EMF22"/>
@@ -53,6 +54,7 @@
<genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenRuntimeVersion/EMF211"/>
<genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenRuntimeVersion/EMF212"/>
<genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenRuntimeVersion/EMF213"/>
+ <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenRuntimeVersion/EMF214"/>
</genEnums>
<genEnums typeSafeEnumCompatible="false" ecoreEnum="GenModel.ecore#//GenRuntimePlatform">
<genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenRuntimePlatform/IDE"/>
@@ -65,6 +67,15 @@
<genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenDecoration/Manual"/>
<genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenDecoration/Live"/>
</genEnums>
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="GenModel.ecore#//GenEclipsePlatformVersion">
+ <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenEclipsePlatformVersion/Juno"/>
+ <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenEclipsePlatformVersion/Kepler"/>
+ <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenEclipsePlatformVersion/Luna"/>
+ <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenEclipsePlatformVersion/Mars"/>
+ <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenEclipsePlatformVersion/Neon"/>
+ <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenEclipsePlatformVersion/Oxygen"/>
+ <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenEclipsePlatformVersion/Photon"/>
+ </genEnums>
<genClasses ecoreClass="GenModel.ecore#//GenModel">
<genFeatures createChild="false" propertyCategory="All" propertyDescription="A copyright string to appear in the header of each generated artifact"
propertyMultiLine="true" ecoreFeature="ecore:EAttribute GenModel.ecore#//GenModel/copyrightText"/>
@@ -233,6 +244,8 @@
ecoreFeature="ecore:EAttribute GenModel.ecore#//GenModel/cleanup"/>
<genFeatures createChild="false" propertyCategory="All" propertyDescription="Whether to generate bundles that are purely compatible with any OSGi runtime implementation"
ecoreFeature="ecore:EAttribute GenModel.ecore#//GenModel/oSGiCompatible"/>
+ <genFeatures createChild="false" propertyCategory="All" propertyDescription="The version of the Eclipse runtime against which to target the generated code for an RCP or IDE runtime platform"
+ ecoreFeature="ecore:EAttribute GenModel.ecore#//GenModel/eclipsePlatformVersion"/>
</genClasses>
<genClasses image="false" ecoreClass="GenModel.ecore#//GenPackage">
<genFeatures createChild="false" propertyCategory="All" propertyDescription="The prefix for names of several packaged-related classes, including package, factory, switch, and adapter factory"
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/generator/Generator.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/generator/Generator.java
index 19b836f..198679a 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/generator/Generator.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/generator/Generator.java
@@ -358,6 +358,11 @@
facadeHelper.setCompilerCompliance("1.8");
break;
}
+ case JDK90_LITERAL:
+ {
+ facadeHelper.setCompilerCompliance("9");
+ break;
+ }
}
if (genModel.isCodeFormatting())
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenAnnotation.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenAnnotation.java
index 8dee737..cb5f621 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenAnnotation.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenAnnotation.java
@@ -66,7 +66,7 @@
* <!-- end-user-doc -->
* @return the value of the '<em>Details</em>' map.
* @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenAnnotation_Details()
- * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EString>"
+ * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EString>"
* @generated
*/
EMap<String, String> getDetails();
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenEclipsePlatformVersion.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenEclipsePlatformVersion.java
new file mode 100644
index 0000000..07bc86a
--- /dev/null
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenEclipsePlatformVersion.java
@@ -0,0 +1,339 @@
+/**
+ */
+package org.eclipse.emf.codegen.ecore.genmodel;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Gen Eclipse Platform Version</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * @since 2.14
+ * <!-- end-model-doc -->
+ * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenEclipsePlatformVersion()
+ * @model
+ * @generated
+ */
+public enum GenEclipsePlatformVersion implements Enumerator
+{
+ /**
+ * The '<em><b>Juno</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #JUNO_VALUE
+ * @generated
+ * @ordered
+ */
+ JUNO(0, "Juno", "Juno"),
+
+ /**
+ * The '<em><b>Kepler</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #KEPLER_VALUE
+ * @generated
+ * @ordered
+ */
+ KEPLER(1, "Kepler", "Kepler"),
+
+ /**
+ * The '<em><b>Luna</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #LUNA_VALUE
+ * @generated
+ * @ordered
+ */
+ LUNA(2, "Luna", "Luna"),
+
+ /**
+ * The '<em><b>Mars</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #MARS_VALUE
+ * @generated
+ * @ordered
+ */
+ MARS(3, "Mars", "Mars"),
+
+ /**
+ * The '<em><b>Neon</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #NEON_VALUE
+ * @generated
+ * @ordered
+ */
+ NEON(4, "Neon", "Neon"),
+
+ /**
+ * The '<em><b>Oxygen</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #OXYGEN_VALUE
+ * @generated
+ * @ordered
+ */
+ OXYGEN(5, "Oxygen", "Oxygen"),
+
+ /**
+ * The '<em><b>Photon</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #PHOTON_VALUE
+ * @generated
+ * @ordered
+ */
+ PHOTON(6, "Photon", "Photon");
+
+ /**
+ * The '<em><b>Juno</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #JUNO
+ * @model name="Juno"
+ * @generated
+ * @ordered
+ */
+ public static final int JUNO_VALUE = 0;
+
+ /**
+ * The '<em><b>Kepler</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #KEPLER
+ * @model name="Kepler"
+ * @generated
+ * @ordered
+ */
+ public static final int KEPLER_VALUE = 1;
+
+ /**
+ * The '<em><b>Luna</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #LUNA
+ * @model name="Luna"
+ * @generated
+ * @ordered
+ */
+ public static final int LUNA_VALUE = 2;
+
+ /**
+ * The '<em><b>Mars</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #MARS
+ * @model name="Mars"
+ * @generated
+ * @ordered
+ */
+ public static final int MARS_VALUE = 3;
+
+ /**
+ * The '<em><b>Neon</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #NEON
+ * @model name="Neon"
+ * @generated
+ * @ordered
+ */
+ public static final int NEON_VALUE = 4;
+
+ /**
+ * The '<em><b>Oxygen</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #OXYGEN
+ * @model name="Oxygen"
+ * @generated
+ * @ordered
+ */
+ public static final int OXYGEN_VALUE = 5;
+
+ /**
+ * The '<em><b>Photon</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #PHOTON
+ * @model name="Photon"
+ * @generated
+ * @ordered
+ */
+ public static final int PHOTON_VALUE = 6;
+
+ /**
+ * An array of all the '<em><b>Gen Eclipse Platform Version</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final GenEclipsePlatformVersion[] VALUES_ARRAY =
+ new GenEclipsePlatformVersion[]
+ {
+ JUNO,
+ KEPLER,
+ LUNA,
+ MARS,
+ NEON,
+ OXYGEN,
+ PHOTON,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>Gen Eclipse Platform Version</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<GenEclipsePlatformVersion> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Gen Eclipse Platform Version</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param literal the literal.
+ * @return the matching enumerator or <code>null</code>.
+ * @generated
+ */
+ public static GenEclipsePlatformVersion get(String literal)
+ {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i)
+ {
+ GenEclipsePlatformVersion result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal))
+ {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Gen Eclipse Platform Version</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param name the name.
+ * @return the matching enumerator or <code>null</code>.
+ * @generated
+ */
+ public static GenEclipsePlatformVersion getByName(String name)
+ {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i)
+ {
+ GenEclipsePlatformVersion result = VALUES_ARRAY[i];
+ if (result.getName().equals(name))
+ {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Gen Eclipse Platform Version</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the integer value.
+ * @return the matching enumerator or <code>null</code>.
+ * @generated
+ */
+ public static GenEclipsePlatformVersion get(int value)
+ {
+ switch (value)
+ {
+ case JUNO_VALUE: return JUNO;
+ case KEPLER_VALUE: return KEPLER;
+ case LUNA_VALUE: return LUNA;
+ case MARS_VALUE: return MARS;
+ case NEON_VALUE: return NEON;
+ case OXYGEN_VALUE: return OXYGEN;
+ case PHOTON_VALUE: return PHOTON;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private GenEclipsePlatformVersion(int value, String name, String literal)
+ {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue()
+ {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral()
+ {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ return literal;
+ }
+
+} //GenEclipsePlatformVersion
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenJDKLevel.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenJDKLevel.java
index cb7b2d3..043e6b9 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenJDKLevel.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenJDKLevel.java
@@ -71,7 +71,16 @@
* @generated
* @ordered
*/
- JDK80_LITERAL(4, "JDK80", "8.0");
+ JDK80_LITERAL(4, "JDK80", "8.0"), /**
+ * The '<em><b>JDK90</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #JDK90
+ * @since 2.14
+ * @generated
+ * @ordered
+ */
+ JDK90_LITERAL(5, "JDK90", "9.0");
/**
* The '<em><b>JDK14</b></em>' literal value.
* <!-- begin-user-doc -->
@@ -131,6 +140,22 @@
public static final int JDK80 = 4;
/**
+ * The '<em><b>JDK90</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * </p>
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * @since 2.14
+ * <!-- end-model-doc -->
+ * @see #JDK90_LITERAL
+ * @model literal="9.0"
+ * @generated
+ * @ordered
+ */
+ public static final int JDK90 = 5;
+
+ /**
* An array of all the '<em><b>Gen JDK Level</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -144,6 +169,7 @@
JDK60_LITERAL,
JDK70_LITERAL,
JDK80_LITERAL,
+ JDK90_LITERAL,
};
/**
@@ -213,6 +239,7 @@
case JDK60: return JDK60_LITERAL;
case JDK70: return JDK70_LITERAL;
case JDK80: return JDK80_LITERAL;
+ case JDK90: return JDK90_LITERAL;
}
return null;
}
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenModel.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenModel.java
index a9e4714..38f266a 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenModel.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenModel.java
@@ -129,6 +129,7 @@
* <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenModel#isStyleProviders <em>Style Providers</em>}</li>
* <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenModel#isCleanup <em>Cleanup</em>}</li>
* <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenModel#isOSGiCompatible <em>OS Gi Compatible</em>}</li>
+ * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.GenModel#getEclipsePlatformVersion <em>Eclipse Platform Version</em>}</li>
* </ul>
*
* @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenModel()
@@ -2290,6 +2291,68 @@
*/
void setOSGiCompatible(boolean value);
+ /**
+ * Returns the value of the '<em><b>Eclipse Platform Version</b></em>' attribute.
+ * The literals are from the enumeration {@link org.eclipse.emf.codegen.ecore.genmodel.GenEclipsePlatformVersion}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Eclipse Platform Version</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * @since 2.14
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Eclipse Platform Version</em>' attribute.
+ * @see org.eclipse.emf.codegen.ecore.genmodel.GenEclipsePlatformVersion
+ * @see #isSetEclipsePlatformVersion()
+ * @see #unsetEclipsePlatformVersion()
+ * @see #setEclipsePlatformVersion(GenEclipsePlatformVersion)
+ * @see org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage#getGenModel_EclipsePlatformVersion()
+ * @model unsettable="true"
+ * @generated
+ */
+ GenEclipsePlatformVersion getEclipsePlatformVersion();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenModel#getEclipsePlatformVersion <em>Eclipse Platform Version</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Eclipse Platform Version</em>' attribute.
+ * @see org.eclipse.emf.codegen.ecore.genmodel.GenEclipsePlatformVersion
+ * @see #isSetEclipsePlatformVersion()
+ * @see #unsetEclipsePlatformVersion()
+ * @see #getEclipsePlatformVersion()
+ * @since 2.14
+ * @generated
+ */
+ void setEclipsePlatformVersion(GenEclipsePlatformVersion value);
+
+ /**
+ * Unsets the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenModel#getEclipsePlatformVersion <em>Eclipse Platform Version</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetEclipsePlatformVersion()
+ * @see #getEclipsePlatformVersion()
+ * @see #setEclipsePlatformVersion(GenEclipsePlatformVersion)
+ * @since 2.14
+ * @generated
+ */
+ void unsetEclipsePlatformVersion();
+
+ /**
+ * Returns whether the value of the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenModel#getEclipsePlatformVersion <em>Eclipse Platform Version</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Eclipse Platform Version</em>' attribute is set.
+ * @see #unsetEclipsePlatformVersion()
+ * @see #getEclipsePlatformVersion()
+ * @see #setEclipsePlatformVersion(GenEclipsePlatformVersion)
+ * @since 2.14
+ * @generated
+ */
+ boolean isSetEclipsePlatformVersion();
+
EList<GenPackage> getStaticGenPackages();
void initialize(Collection<? extends EPackage> ePackages);
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenModelPackage.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenModelPackage.java
index 62ce5ca..207510c 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenModelPackage.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenModelPackage.java
@@ -902,13 +902,23 @@
int GEN_MODEL__OS_GI_COMPATIBLE = GEN_BASE_FEATURE_COUNT + 85;
/**
+ * The feature id for the '<em><b>Eclipse Platform Version</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @since 2.14
+ * @generated
+ * @ordered
+ */
+ int GEN_MODEL__ECLIPSE_PLATFORM_VERSION = GEN_BASE_FEATURE_COUNT + 86;
+
+ /**
* The number of structural features of the '<em>Gen Model</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int GEN_MODEL_FEATURE_COUNT = GEN_BASE_FEATURE_COUNT + 86;
+ int GEN_MODEL_FEATURE_COUNT = GEN_BASE_FEATURE_COUNT + 87;
/**
* The meta object id for the '{@link org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl <em>Gen Package</em>}' class.
@@ -2010,6 +2020,18 @@
/**
+ * The meta object id for the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenEclipsePlatformVersion <em>Gen Eclipse Platform Version</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.codegen.ecore.genmodel.GenEclipsePlatformVersion
+ * @see org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelPackageImpl#getGenEclipsePlatformVersion()
+ * @since 2.14
+ * @generated
+ */
+ int GEN_ECLIPSE_PLATFORM_VERSION = 22;
+
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.codegen.ecore.genmodel.GenModel <em>Gen Model</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2967,6 +2989,18 @@
EAttribute getGenModel_OSGiCompatible();
/**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.codegen.ecore.genmodel.GenModel#getEclipsePlatformVersion <em>Eclipse Platform Version</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Eclipse Platform Version</em>'.
+ * @see org.eclipse.emf.codegen.ecore.genmodel.GenModel#getEclipsePlatformVersion()
+ * @see #getGenModel()
+ * @since 2.14
+ * @generated
+ */
+ EAttribute getGenModel_EclipsePlatformVersion();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.codegen.ecore.genmodel.GenPackage <em>Gen Package</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -3936,6 +3970,17 @@
EEnum getGenDecoration();
/**
+ * Returns the meta object for enum '{@link org.eclipse.emf.codegen.ecore.genmodel.GenEclipsePlatformVersion <em>Gen Eclipse Platform Version</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Gen Eclipse Platform Version</em>'.
+ * @see org.eclipse.emf.codegen.ecore.genmodel.GenEclipsePlatformVersion
+ * @since 2.14
+ * @generated
+ */
+ EEnum getGenEclipsePlatformVersion();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -4658,6 +4703,15 @@
EAttribute GEN_MODEL__OS_GI_COMPATIBLE = eINSTANCE.getGenModel_OSGiCompatible();
/**
+ * The meta object literal for the '<em><b>Eclipse Platform Version</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @since 2.14
+ * @generated
+ */
+ EAttribute GEN_MODEL__ECLIPSE_PLATFORM_VERSION = eINSTANCE.getGenModel_EclipsePlatformVersion();
+
+ /**
* The meta object literal for the '{@link org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl <em>Gen Package</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -5419,6 +5473,17 @@
*/
EEnum GEN_DECORATION = eINSTANCE.getGenDecoration();
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.codegen.ecore.genmodel.GenEclipsePlatformVersion <em>Gen Eclipse Platform Version</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.codegen.ecore.genmodel.GenEclipsePlatformVersion
+ * @see org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelPackageImpl#getGenEclipsePlatformVersion()
+ * @since 2.14
+ * @generated
+ */
+ EEnum GEN_ECLIPSE_PLATFORM_VERSION = eINSTANCE.getGenEclipsePlatformVersion();
+
}
} //GenModelPackage
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenRuntimeVersion.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenRuntimeVersion.java
index 3853a78..439d994 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenRuntimeVersion.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/GenRuntimeVersion.java
@@ -126,7 +126,16 @@
* @generated
* @ordered
*/
- EMF213(11, "EMF213", "2.13");
+ EMF213(11, "EMF213", "2.13"), /**
+ * The '<em><b>EMF214</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #EMF214_VALUE
+ * @since 2.14
+ * @generated
+ * @ordered
+ */
+ EMF214(12, "EMF214", "2.14");
/**
* The '<em><b>EMF22</b></em>' literal value.
@@ -287,6 +296,22 @@
public static final int EMF213_VALUE = 11;
/**
+ * The '<em><b>EMF214</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * </p>
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * @since 2.14
+ * <!-- end-model-doc -->
+ * @see #EMF214
+ * @model literal="2.14"
+ * @generated
+ * @ordered
+ */
+ public static final int EMF214_VALUE = 12;
+
+ /**
* An array of all the '<em><b>Gen Runtime Version</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -307,6 +332,7 @@
EMF211,
EMF212,
EMF213,
+ EMF214,
};
/**
@@ -383,6 +409,7 @@
case EMF211_VALUE: return EMF211;
case EMF212_VALUE: return EMF212;
case EMF213_VALUE: return EMF213;
+ case EMF214_VALUE: return EMF214;
}
return null;
}
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelFactoryImpl.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelFactoryImpl.java
index 47ca638..903ba56 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelFactoryImpl.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelFactoryImpl.java
@@ -116,6 +116,8 @@
return createGenRuntimePlatformFromString(eDataType, initialValue);
case GenModelPackage.GEN_DECORATION:
return createGenDecorationFromString(eDataType, initialValue);
+ case GenModelPackage.GEN_ECLIPSE_PLATFORM_VERSION:
+ return createGenEclipsePlatformVersionFromString(eDataType, initialValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
@@ -147,6 +149,8 @@
return convertGenRuntimePlatformToString(eDataType, instanceValue);
case GenModelPackage.GEN_DECORATION:
return convertGenDecorationToString(eDataType, instanceValue);
+ case GenModelPackage.GEN_ECLIPSE_PLATFORM_VERSION:
+ return convertGenEclipsePlatformVersionToString(eDataType, instanceValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
@@ -452,6 +456,30 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ * @since 2.14
+ * @generated
+ */
+ public GenEclipsePlatformVersion createGenEclipsePlatformVersionFromString(EDataType eDataType, String initialValue)
+ {
+ GenEclipsePlatformVersion result = GenEclipsePlatformVersion.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @since 2.14
+ * @generated
+ */
+ public String convertGenEclipsePlatformVersionToString(EDataType eDataType, Object instanceValue)
+ {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
public GenModelPackage getGenModelPackage()
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelImpl.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelImpl.java
index 76fa162..9fc1961 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelImpl.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelImpl.java
@@ -52,6 +52,7 @@
import org.eclipse.emf.codegen.ecore.genmodel.GenDataType;
import org.eclipse.emf.codegen.ecore.genmodel.GenDecoration;
import org.eclipse.emf.codegen.ecore.genmodel.GenDelegationKind;
+import org.eclipse.emf.codegen.ecore.genmodel.GenEclipsePlatformVersion;
import org.eclipse.emf.codegen.ecore.genmodel.GenJDKLevel;
import org.eclipse.emf.codegen.ecore.genmodel.GenEnum;
import org.eclipse.emf.codegen.ecore.genmodel.GenEnumLiteral;
@@ -214,6 +215,7 @@
* <li>{@link org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl#isStyleProviders <em>Style Providers</em>}</li>
* <li>{@link org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl#isCleanup <em>Cleanup</em>}</li>
* <li>{@link org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl#isOSGiCompatible <em>OS Gi Compatible</em>}</li>
+ * <li>{@link org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl#getEclipsePlatformVersion <em>Eclipse Platform Version</em>}</li>
* </ul>
*
* @generated
@@ -1888,6 +1890,38 @@
*/
protected boolean oSGiCompatible = OS_GI_COMPATIBLE_EDEFAULT;
+ /**
+ * The default value of the '{@link #getEclipsePlatformVersion() <em>Eclipse Platform Version</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEclipsePlatformVersion()
+ * @since 2.14
+ * @generated NOT
+ * @ordered
+ */
+ protected static final GenEclipsePlatformVersion ECLIPSE_PLATFORM_VERSION_EDEFAULT = GenEclipsePlatformVersion.VALUES.get(GenEclipsePlatformVersion.VALUES.size() - 1);
+
+ /**
+ * The cached value of the '{@link #getEclipsePlatformVersion() <em>Eclipse Platform Version</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEclipsePlatformVersion()
+ * @since 2.14
+ * @generated
+ * @ordered
+ */
+ protected GenEclipsePlatformVersion eclipsePlatformVersion = ECLIPSE_PLATFORM_VERSION_EDEFAULT;
+
+ /**
+ * This is true if the Eclipse Platform Version attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @since 2.14
+ * @generated
+ * @ordered
+ */
+ protected boolean eclipsePlatformVersionESet;
+
protected boolean validateModel = false;
/**
@@ -6632,6 +6666,60 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ * @since 2.14
+ * @generated
+ */
+ public GenEclipsePlatformVersion getEclipsePlatformVersion()
+ {
+ return eclipsePlatformVersion;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @since 2.14
+ * @generated
+ */
+ public void setEclipsePlatformVersion(GenEclipsePlatformVersion newEclipsePlatformVersion)
+ {
+ GenEclipsePlatformVersion oldEclipsePlatformVersion = eclipsePlatformVersion;
+ eclipsePlatformVersion = newEclipsePlatformVersion == null ? ECLIPSE_PLATFORM_VERSION_EDEFAULT : newEclipsePlatformVersion;
+ boolean oldEclipsePlatformVersionESet = eclipsePlatformVersionESet;
+ eclipsePlatformVersionESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GenModelPackage.GEN_MODEL__ECLIPSE_PLATFORM_VERSION, oldEclipsePlatformVersion, eclipsePlatformVersion, !oldEclipsePlatformVersionESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @since 2.14
+ * @generated
+ */
+ public void unsetEclipsePlatformVersion()
+ {
+ GenEclipsePlatformVersion oldEclipsePlatformVersion = eclipsePlatformVersion;
+ boolean oldEclipsePlatformVersionESet = eclipsePlatformVersionESet;
+ eclipsePlatformVersion = ECLIPSE_PLATFORM_VERSION_EDEFAULT;
+ eclipsePlatformVersionESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, GenModelPackage.GEN_MODEL__ECLIPSE_PLATFORM_VERSION, oldEclipsePlatformVersion, ECLIPSE_PLATFORM_VERSION_EDEFAULT, oldEclipsePlatformVersionESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @since 2.14
+ * @generated
+ */
+ public boolean isSetEclipsePlatformVersion()
+ {
+ return eclipsePlatformVersionESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@@ -6844,6 +6932,8 @@
return isCleanup();
case GenModelPackage.GEN_MODEL__OS_GI_COMPATIBLE:
return isOSGiCompatible();
+ case GenModelPackage.GEN_MODEL__ECLIPSE_PLATFORM_VERSION:
+ return getEclipsePlatformVersion();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -7126,6 +7216,9 @@
case GenModelPackage.GEN_MODEL__OS_GI_COMPATIBLE:
setOSGiCompatible((Boolean)newValue);
return;
+ case GenModelPackage.GEN_MODEL__ECLIPSE_PLATFORM_VERSION:
+ setEclipsePlatformVersion((GenEclipsePlatformVersion)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -7398,6 +7491,9 @@
case GenModelPackage.GEN_MODEL__OS_GI_COMPATIBLE:
setOSGiCompatible(OS_GI_COMPATIBLE_EDEFAULT);
return;
+ case GenModelPackage.GEN_MODEL__ECLIPSE_PLATFORM_VERSION:
+ unsetEclipsePlatformVersion();
+ return;
}
super.eUnset(featureID);
}
@@ -7584,6 +7680,8 @@
return cleanup != CLEANUP_EDEFAULT;
case GenModelPackage.GEN_MODEL__OS_GI_COMPATIBLE:
return oSGiCompatible != OS_GI_COMPATIBLE_EDEFAULT;
+ case GenModelPackage.GEN_MODEL__ECLIPSE_PLATFORM_VERSION:
+ return isSetEclipsePlatformVersion();
}
return super.eIsSet(featureID);
}
@@ -7761,6 +7859,8 @@
result.append(cleanup);
result.append(", oSGiCompatible: ");
result.append(oSGiCompatible);
+ result.append(", eclipsePlatformVersion: ");
+ if (eclipsePlatformVersionESet) result.append(eclipsePlatformVersion); else result.append("<unset>");
result.append(')');
return result.toString();
}
@@ -10240,10 +10340,14 @@
{
return GenJDKLevel.JDK70_LITERAL;
}
- else
+ else if ("1.8".equals(complianceLevel))
{
return GenJDKLevel.JDK80_LITERAL;
}
+ else if ("9".equals(complianceLevel))
+ {
+ return GenJDKLevel.JDK90_LITERAL;
+ }
}
}
catch (Exception exception)
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelPackageImpl.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelPackageImpl.java
index 4b7f606..6889b73 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelPackageImpl.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelPackageImpl.java
@@ -18,6 +18,7 @@
import org.eclipse.emf.codegen.ecore.genmodel.GenDataType;
import org.eclipse.emf.codegen.ecore.genmodel.GenDecoration;
import org.eclipse.emf.codegen.ecore.genmodel.GenDelegationKind;
+import org.eclipse.emf.codegen.ecore.genmodel.GenEclipsePlatformVersion;
import org.eclipse.emf.codegen.ecore.genmodel.GenEnum;
import org.eclipse.emf.codegen.ecore.genmodel.GenEnumLiteral;
import org.eclipse.emf.codegen.ecore.genmodel.GenFeature;
@@ -211,6 +212,14 @@
private EEnum genDecorationEEnum = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @since 2.14
+ * @generated
+ */
+ private EEnum genEclipsePlatformVersionEEnum = 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.
@@ -1161,6 +1170,17 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ * @since 2.14
+ * @generated
+ */
+ public EAttribute getGenModel_EclipsePlatformVersion()
+ {
+ return (EAttribute)genModelEClass.getEStructuralFeatures().get(86);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
public EClass getGenPackage()
@@ -2061,6 +2081,17 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ * @since 2.14
+ * @generated
+ */
+ public EEnum getGenEclipsePlatformVersion()
+ {
+ return genEclipsePlatformVersionEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
public GenModelFactory getGenModelFactory()
@@ -2175,6 +2206,7 @@
createEAttribute(genModelEClass, GEN_MODEL__STYLE_PROVIDERS);
createEAttribute(genModelEClass, GEN_MODEL__CLEANUP);
createEAttribute(genModelEClass, GEN_MODEL__OS_GI_COMPATIBLE);
+ createEAttribute(genModelEClass, GEN_MODEL__ECLIPSE_PLATFORM_VERSION);
genPackageEClass = createEClass(GEN_PACKAGE);
createEAttribute(genPackageEClass, GEN_PACKAGE__PREFIX);
@@ -2280,6 +2312,7 @@
genRuntimeVersionEEnum = createEEnum(GEN_RUNTIME_VERSION);
genRuntimePlatformEEnum = createEEnum(GEN_RUNTIME_PLATFORM);
genDecorationEEnum = createEEnum(GEN_DECORATION);
+ genEclipsePlatformVersionEEnum = createEEnum(GEN_ECLIPSE_PLATFORM_VERSION);
}
/**
@@ -2416,6 +2449,7 @@
initEAttribute(getGenModel_StyleProviders(), ecorePackage.getEBoolean(), "styleProviders", null, 0, 1, GenModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getGenModel_Cleanup(), ecorePackage.getEBoolean(), "cleanup", null, 0, 1, GenModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getGenModel_OSGiCompatible(), theEcorePackage.getEBoolean(), "oSGiCompatible", null, 0, 1, GenModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getGenModel_EclipsePlatformVersion(), this.getGenEclipsePlatformVersion(), "eclipsePlatformVersion", null, 0, 1, GenModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(genPackageEClass, GenPackage.class, "GenPackage", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getGenPackage_Prefix(), ecorePackage.getEString(), "prefix", null, 0, 1, GenPackage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -2544,6 +2578,7 @@
addEEnumLiteral(genJDKLevelEEnum, GenJDKLevel.JDK60_LITERAL);
addEEnumLiteral(genJDKLevelEEnum, GenJDKLevel.JDK70_LITERAL);
addEEnumLiteral(genJDKLevelEEnum, GenJDKLevel.JDK80_LITERAL);
+ addEEnumLiteral(genJDKLevelEEnum, GenJDKLevel.JDK90_LITERAL);
initEEnum(genRuntimeVersionEEnum, GenRuntimeVersion.class, "GenRuntimeVersion");
addEEnumLiteral(genRuntimeVersionEEnum, GenRuntimeVersion.EMF22);
@@ -2558,6 +2593,7 @@
addEEnumLiteral(genRuntimeVersionEEnum, GenRuntimeVersion.EMF211);
addEEnumLiteral(genRuntimeVersionEEnum, GenRuntimeVersion.EMF212);
addEEnumLiteral(genRuntimeVersionEEnum, GenRuntimeVersion.EMF213);
+ addEEnumLiteral(genRuntimeVersionEEnum, GenRuntimeVersion.EMF214);
initEEnum(genRuntimePlatformEEnum, GenRuntimePlatform.class, "GenRuntimePlatform");
addEEnumLiteral(genRuntimePlatformEEnum, GenRuntimePlatform.IDE);
@@ -2570,6 +2606,15 @@
addEEnumLiteral(genDecorationEEnum, GenDecoration.MANUAL);
addEEnumLiteral(genDecorationEEnum, GenDecoration.LIVE);
+ initEEnum(genEclipsePlatformVersionEEnum, GenEclipsePlatformVersion.class, "GenEclipsePlatformVersion");
+ addEEnumLiteral(genEclipsePlatformVersionEEnum, GenEclipsePlatformVersion.JUNO);
+ addEEnumLiteral(genEclipsePlatformVersionEEnum, GenEclipsePlatformVersion.KEPLER);
+ addEEnumLiteral(genEclipsePlatformVersionEEnum, GenEclipsePlatformVersion.LUNA);
+ addEEnumLiteral(genEclipsePlatformVersionEEnum, GenEclipsePlatformVersion.MARS);
+ addEEnumLiteral(genEclipsePlatformVersionEEnum, GenEclipsePlatformVersion.NEON);
+ addEEnumLiteral(genEclipsePlatformVersionEEnum, GenEclipsePlatformVersion.OXYGEN);
+ addEEnumLiteral(genEclipsePlatformVersionEEnum, GenEclipsePlatformVersion.PHOTON);
+
// Create resource
createResource(eNS_URI);
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/util/GenModelValidator.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/util/GenModelValidator.java
index 2c68cc4..520f992 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/util/GenModelValidator.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/genmodel/util/GenModelValidator.java
@@ -153,6 +153,8 @@
return validateGenRuntimePlatform((GenRuntimePlatform)value, diagnostics, context);
case GenModelPackage.GEN_DECORATION:
return validateGenDecoration((GenDecoration)value, diagnostics, context);
+ case GenModelPackage.GEN_ECLIPSE_PLATFORM_VERSION:
+ return validateGenEclipsePlatformVersion((GenEclipsePlatformVersion)value, diagnostics, context);
default:
return true;
}
@@ -424,6 +426,17 @@
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @since 2.14
+ * @generated
+ */
+ public boolean validateGenEclipsePlatformVersion(GenEclipsePlatformVersion genEclipsePlatformVersion, 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 -->
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/edit/ManifestMF.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/edit/ManifestMF.java
index 08868e3..d46f70f 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/edit/ManifestMF.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/edit/ManifestMF.java
@@ -27,20 +27,21 @@
protected final String TEXT_10 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-1.6";
protected final String TEXT_11 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-1.7";
protected final String TEXT_12 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-1.8";
- protected final String TEXT_13 = NL + "Export-Package: ";
- protected final String TEXT_14 = ",";
- protected final String TEXT_15 = NL + " ";
- protected final String TEXT_16 = NL + "Require-Bundle: ";
- protected final String TEXT_17 = ";resolution:=optional;x-installation:=greedy";
- protected final String TEXT_18 = ";visibility:=reexport";
- protected final String TEXT_19 = ",";
- protected final String TEXT_20 = NL + " ";
- protected final String TEXT_21 = ";resolution:=optional;x-installation:=greedy";
- protected final String TEXT_22 = ";visibility:=reexport";
- protected final String TEXT_23 = NL + "Import-Package: org.osgi.framework";
- protected final String TEXT_24 = NL + "Eclipse-LazyStart: true";
- protected final String TEXT_25 = NL + "Bundle-ActivationPolicy: lazy";
- protected final String TEXT_26 = NL;
+ protected final String TEXT_13 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-9";
+ protected final String TEXT_14 = NL + "Export-Package: ";
+ protected final String TEXT_15 = ",";
+ protected final String TEXT_16 = NL + " ";
+ protected final String TEXT_17 = NL + "Require-Bundle: ";
+ protected final String TEXT_18 = ";resolution:=optional;x-installation:=greedy";
+ protected final String TEXT_19 = ";visibility:=reexport";
+ protected final String TEXT_20 = ",";
+ protected final String TEXT_21 = NL + " ";
+ protected final String TEXT_22 = ";resolution:=optional;x-installation:=greedy";
+ protected final String TEXT_23 = ";visibility:=reexport";
+ protected final String TEXT_24 = NL + "Import-Package: org.osgi.framework";
+ protected final String TEXT_25 = NL + "Eclipse-LazyStart: true";
+ protected final String TEXT_26 = NL + "Bundle-ActivationPolicy: lazy";
+ protected final String TEXT_27 = NL;
public String generate(Object argument)
{
@@ -84,41 +85,43 @@
stringBuffer.append(TEXT_11);
} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK80_LITERAL) {
stringBuffer.append(TEXT_12);
+ } else if (genModel.getComplianceLevel() == GenJDKLevel.JDK90_LITERAL) {
+ stringBuffer.append(TEXT_13);
}
Iterator<String> packagesIterator = genModel.getEditQualifiedPackageNames().iterator(); if (packagesIterator.hasNext()) { String pack = packagesIterator.next();
- stringBuffer.append(TEXT_13);
+ stringBuffer.append(TEXT_14);
stringBuffer.append(pack);
while(packagesIterator.hasNext()) { pack = packagesIterator.next();
- stringBuffer.append(TEXT_14);
stringBuffer.append(TEXT_15);
+ stringBuffer.append(TEXT_16);
stringBuffer.append(pack);
}
}
Iterator<String> requiredPluginIterator = genModel.getEditRequiredPlugins().iterator(); if (requiredPluginIterator.hasNext()) { String pluginID = requiredPluginIterator.next();
- stringBuffer.append(TEXT_16);
- stringBuffer.append(pluginID);
- if (pluginID.startsWith("org.eclipse.core.runtime")) {if (genModel.isOSGiCompatible()) {
stringBuffer.append(TEXT_17);
- }} else {
- stringBuffer.append(TEXT_18);
- } while(requiredPluginIterator.hasNext()) { pluginID = requiredPluginIterator.next();
- stringBuffer.append(TEXT_19);
- stringBuffer.append(TEXT_20);
stringBuffer.append(pluginID);
if (pluginID.startsWith("org.eclipse.core.runtime")) {if (genModel.isOSGiCompatible()) {
+ stringBuffer.append(TEXT_18);
+ }} else {
+ stringBuffer.append(TEXT_19);
+ } while(requiredPluginIterator.hasNext()) { pluginID = requiredPluginIterator.next();
+ stringBuffer.append(TEXT_20);
stringBuffer.append(TEXT_21);
- }} else if (!pluginID.equals("org.eclipse.xtext.xbase.lib") && !pluginID.equals("org.eclipse.emf.ecore.xcore.lib")) {
+ stringBuffer.append(pluginID);
+ if (pluginID.startsWith("org.eclipse.core.runtime")) {if (genModel.isOSGiCompatible()) {
stringBuffer.append(TEXT_22);
+ }} else if (!pluginID.equals("org.eclipse.xtext.xbase.lib") && !pluginID.equals("org.eclipse.emf.ecore.xcore.lib")) {
+ stringBuffer.append(TEXT_23);
}}
}
if (genModel.isOSGiCompatible()) {
- stringBuffer.append(TEXT_23);
- }
- if (genModel.getRuntimeVersion() == GenRuntimeVersion.EMF22 || genModel.getRuntimeVersion() == GenRuntimeVersion.EMF23) {
stringBuffer.append(TEXT_24);
}
+ if (genModel.getRuntimeVersion() == GenRuntimeVersion.EMF22 || genModel.getRuntimeVersion() == GenRuntimeVersion.EMF23) {
stringBuffer.append(TEXT_25);
+ }
stringBuffer.append(TEXT_26);
+ stringBuffer.append(TEXT_27);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/editor/Editor.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/editor/Editor.java
index db9e368..e4b9b71 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/editor/Editor.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/editor/Editor.java
@@ -391,143 +391,154 @@
protected final String TEXT_374 = "unchecked";
protected final String TEXT_375 = "\")";
protected final String TEXT_376 = NL + "\t@Override";
- protected final String TEXT_377 = NL + "\tpublic Object getAdapter(Class key)" + NL + "\t{" + NL + "\t\tif (key.equals(IContentOutlinePage.class))" + NL + "\t\t{" + NL + "\t\t\treturn showOutlineView() ? getContentOutlinePage() : null;" + NL + "\t\t}" + NL + "\t\telse if (key.equals(IPropertySheetPage.class))" + NL + "\t\t{" + NL + "\t\t\treturn getPropertySheetPage();" + NL + "\t\t}";
- protected final String TEXT_378 = NL + "\t\telse if (key.equals(IGotoMarker.class))" + NL + "\t\t{" + NL + "\t\t\treturn this;" + NL + "\t\t}";
- protected final String TEXT_379 = NL + "\t\telse" + NL + "\t\t{" + NL + "\t\t\treturn super.getAdapter(key);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This accesses a cached version of the content outliner." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IContentOutlinePage getContentOutlinePage()" + NL + "\t{" + NL + "\t\tif (contentOutlinePage == null)" + NL + "\t\t{" + NL + "\t\t\t// The content outline is just a tree." + NL + "\t\t\t//" + NL + "\t\t\tclass MyContentOutlinePage extends ContentOutlinePage" + NL + "\t\t\t{";
- protected final String TEXT_380 = NL + "\t\t\t\t@Override";
- protected final String TEXT_381 = NL + "\t\t\t\tpublic void createControl(Composite parent)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.createControl(parent);" + NL + "\t\t\t\t\tcontentOutlineViewer = getTreeViewer();" + NL + "\t\t\t\t\tcontentOutlineViewer.addSelectionChangedListener(this);" + NL + "" + NL + "\t\t\t\t\t// Set up the tree viewer." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tcontentOutlineViewer.setUseHashlookup(true);" + NL + "\t\t\t\t\tcontentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t\t\t\tcontentOutlineViewer.setLabelProvider(";
- protected final String TEXT_382 = "new ";
- protected final String TEXT_383 = "(";
- protected final String TEXT_384 = "new ";
- protected final String TEXT_385 = "(";
- protected final String TEXT_386 = "new ";
- protected final String TEXT_387 = "(adapterFactory";
- protected final String TEXT_388 = ", contentOutlineViewer";
- protected final String TEXT_389 = ")";
- protected final String TEXT_390 = ", new ";
- protected final String TEXT_391 = "(editingDomain";
- protected final String TEXT_392 = ".getResourceSet()";
- protected final String TEXT_393 = ", contentOutlineViewer";
- protected final String TEXT_394 = ", ";
- protected final String TEXT_395 = ".getPlugin().getDialogSettings()";
- protected final String TEXT_396 = "))";
- protected final String TEXT_397 = ")";
- protected final String TEXT_398 = ");" + NL + "\t\t\t\t\tcontentOutlineViewer.setInput(editingDomain.getResourceSet());" + NL;
- protected final String TEXT_399 = NL + "\t\t\t\t\tnew ";
- protected final String TEXT_400 = "(contentOutlineViewer, new ";
- protected final String TEXT_401 = ".EditingDomainLocationListener(editingDomain, contentOutlineViewer));" + NL;
- protected final String TEXT_402 = NL + "\t\t\t\t\t// Make sure our popups work." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tcreateContextMenuFor(contentOutlineViewer);" + NL + "" + NL + "\t\t\t\t\tif (!editingDomain.getResourceSet().getResources().isEmpty())" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t // Select the root object in the view." + NL + "\t\t\t\t\t //" + NL + "\t\t\t\t\t contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL;
- protected final String TEXT_403 = NL + "\t\t\t\t@Override";
- protected final String TEXT_404 = NL + "\t\t\t\tpublic void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.makeContributions(menuManager, toolBarManager, statusLineManager);" + NL + "\t\t\t\t\tcontentOutlineStatusLineManager = statusLineManager;" + NL + "\t\t\t\t}" + NL;
- protected final String TEXT_405 = NL + "\t\t\t\t@Override";
- protected final String TEXT_406 = NL + "\t\t\t\tpublic void setActionBars(IActionBars actionBars)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.setActionBars(actionBars);" + NL + "\t\t\t\t\tgetActionBarContributor().shareGlobalActions(this, actionBars);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\tcontentOutlinePage = new MyContentOutlinePage();" + NL + "" + NL + "\t\t\t// Listen to selection so that we can handle it is a special way." + NL + "\t\t\t//" + NL + "\t\t\tcontentOutlinePage.addSelectionChangedListener" + NL + "\t\t\t\t(new ISelectionChangedListener()" + NL + "\t\t\t\t {" + NL + "\t\t\t\t\t // This ensures that we handle selections correctly." + NL + "\t\t\t\t\t //" + NL + "\t\t\t\t\t public void selectionChanged(SelectionChangedEvent event)" + NL + "\t\t\t\t\t {" + NL + "\t\t\t\t\t\t handleContentOutlineSelection(event.getSelection());" + NL + "\t\t\t\t\t }" + NL + "\t\t\t\t });" + NL + "\t\t}" + NL + "" + NL + "\t\treturn contentOutlinePage;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This accesses a cached version of the property sheet." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IPropertySheetPage getPropertySheetPage()" + NL + "\t{" + NL + "\t\tPropertySheetPage propertySheetPage =" + NL + "\t\t\tnew ExtendedPropertySheetPage(editingDomain";
- protected final String TEXT_407 = ", ExtendedPropertySheetPage.Decoration.MANUAL";
- protected final String TEXT_408 = ", ExtendedPropertySheetPage.Decoration.LIVE, ";
- protected final String TEXT_409 = ".getPlugin().getDialogSettings()";
- protected final String TEXT_410 = ")" + NL + "\t\t\t{";
- protected final String TEXT_411 = NL + "\t\t\t\t@Override";
- protected final String TEXT_412 = NL + "\t\t\t\tpublic void setSelectionToViewer(";
- protected final String TEXT_413 = " selection)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
- protected final String TEXT_414 = ".this.setSelectionToViewer(selection);" + NL + "\t\t\t\t\t";
- protected final String TEXT_415 = ".this.setFocus();" + NL + "\t\t\t\t}" + NL;
+ protected final String TEXT_377 = NL + "\tpublic <T> T getAdapter(Class<T> key)";
+ protected final String TEXT_378 = NL + "\tpublic Object getAdapter(Class key)";
+ protected final String TEXT_379 = NL + "\t{" + NL + "\t\tif (key.equals(IContentOutlinePage.class))" + NL + "\t\t{";
+ protected final String TEXT_380 = NL + "\t\t\treturn showOutlineView() ? key.cast(getContentOutlinePage()) : null;";
+ protected final String TEXT_381 = NL + "\t\t\treturn showOutlineView() ? getContentOutlinePage() : null;";
+ protected final String TEXT_382 = NL + "\t\t}" + NL + "\t\telse if (key.equals(IPropertySheetPage.class))" + NL + "\t\t{";
+ protected final String TEXT_383 = NL + "\t\t\treturn key.cast(getPropertySheetPage());";
+ protected final String TEXT_384 = NL + "\t\t\treturn getPropertySheetPage();";
+ protected final String TEXT_385 = NL + "\t\t}";
+ protected final String TEXT_386 = NL + "\t\telse if (key.equals(IGotoMarker.class))" + NL + "\t\t{";
+ protected final String TEXT_387 = NL + "\t\t\treturn key.cast(this);";
+ protected final String TEXT_388 = NL + "\t\t\treturn this;";
+ protected final String TEXT_389 = NL + "\t\t}";
+ protected final String TEXT_390 = NL + "\t\telse" + NL + "\t\t{" + NL + "\t\t\treturn super.getAdapter(key);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This accesses a cached version of the content outliner." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IContentOutlinePage getContentOutlinePage()" + NL + "\t{" + NL + "\t\tif (contentOutlinePage == null)" + NL + "\t\t{" + NL + "\t\t\t// The content outline is just a tree." + NL + "\t\t\t//" + NL + "\t\t\tclass MyContentOutlinePage extends ContentOutlinePage" + NL + "\t\t\t{";
+ protected final String TEXT_391 = NL + "\t\t\t\t@Override";
+ protected final String TEXT_392 = NL + "\t\t\t\tpublic void createControl(Composite parent)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.createControl(parent);" + NL + "\t\t\t\t\tcontentOutlineViewer = getTreeViewer();" + NL + "\t\t\t\t\tcontentOutlineViewer.addSelectionChangedListener(this);" + NL + "" + NL + "\t\t\t\t\t// Set up the tree viewer." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tcontentOutlineViewer.setUseHashlookup(true);" + NL + "\t\t\t\t\tcontentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\t\t\t\tcontentOutlineViewer.setLabelProvider(";
+ protected final String TEXT_393 = "new ";
+ protected final String TEXT_394 = "(";
+ protected final String TEXT_395 = "new ";
+ protected final String TEXT_396 = "(";
+ protected final String TEXT_397 = "new ";
+ protected final String TEXT_398 = "(adapterFactory";
+ protected final String TEXT_399 = ", contentOutlineViewer";
+ protected final String TEXT_400 = ")";
+ protected final String TEXT_401 = ", new ";
+ protected final String TEXT_402 = "(editingDomain";
+ protected final String TEXT_403 = ".getResourceSet()";
+ protected final String TEXT_404 = ", contentOutlineViewer";
+ protected final String TEXT_405 = ", ";
+ protected final String TEXT_406 = ".getPlugin().getDialogSettings()";
+ protected final String TEXT_407 = "))";
+ protected final String TEXT_408 = ")";
+ protected final String TEXT_409 = ");" + NL + "\t\t\t\t\tcontentOutlineViewer.setInput(editingDomain.getResourceSet());" + NL;
+ protected final String TEXT_410 = NL + "\t\t\t\t\tnew ";
+ protected final String TEXT_411 = "(contentOutlineViewer, new ";
+ protected final String TEXT_412 = ".EditingDomainLocationListener(editingDomain, contentOutlineViewer));" + NL;
+ protected final String TEXT_413 = NL + "\t\t\t\t\t// Make sure our popups work." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tcreateContextMenuFor(contentOutlineViewer);" + NL + "" + NL + "\t\t\t\t\tif (!editingDomain.getResourceSet().getResources().isEmpty())" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t // Select the root object in the view." + NL + "\t\t\t\t\t //" + NL + "\t\t\t\t\t contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL;
+ protected final String TEXT_414 = NL + "\t\t\t\t@Override";
+ protected final String TEXT_415 = NL + "\t\t\t\tpublic void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.makeContributions(menuManager, toolBarManager, statusLineManager);" + NL + "\t\t\t\t\tcontentOutlineStatusLineManager = statusLineManager;" + NL + "\t\t\t\t}" + NL;
protected final String TEXT_416 = NL + "\t\t\t\t@Override";
- protected final String TEXT_417 = NL + "\t\t\t\tpublic void setActionBars(IActionBars actionBars)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.setActionBars(actionBars);" + NL + "\t\t\t\t\tgetActionBarContributor().shareGlobalActions(this, actionBars);" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\tpropertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\tpropertySheetPages.add(propertySheetPage);" + NL + "" + NL + "\t\treturn propertySheetPage;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This deals with how we want selection in the outliner to affect the other views." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void handleContentOutlineSelection(ISelection selection)" + NL + "\t{";
- protected final String TEXT_418 = NL + "\t\tif (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection)";
- protected final String TEXT_419 = NL + "\t\tif (selectionViewer != null && !selection.isEmpty() && selection instanceof IStructuredSelection)";
- protected final String TEXT_420 = NL + "\t\t{" + NL + "\t\t\tIterator";
- protected final String TEXT_421 = "<?>";
- protected final String TEXT_422 = " selectedElements = ((IStructuredSelection)selection).iterator();" + NL + "\t\t\tif (selectedElements.hasNext())" + NL + "\t\t\t{" + NL + "\t\t\t\t// Get the first selected element." + NL + "\t\t\t\t//" + NL + "\t\t\t\tObject selectedElement = selectedElements.next();" + NL;
- protected final String TEXT_423 = NL + "\t\t\t\t// If it's the selection viewer, then we want it to select the same selection as this selection." + NL + "\t\t\t\t//" + NL + "\t\t\t\tif (currentViewerPane.getViewer() == selectionViewer)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
- protected final String TEXT_424 = " selectionList = new ";
- protected final String TEXT_425 = "();" + NL + "\t\t\t\t\tselectionList.add(selectedElement);" + NL + "\t\t\t\t\twhile (selectedElements.hasNext())" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tselectionList.add(selectedElements.next());" + NL + "\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\t// Set the selection to the widget." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tselectionViewer.setSelection(new StructuredSelection(selectionList));" + NL + "\t\t\t\t}" + NL + "\t\t\t\telse" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t// Set the input to the widget." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tif (currentViewerPane.getViewer().getInput() != selectedElement)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tcurrentViewerPane.getViewer().setInput(selectedElement);" + NL + "\t\t\t\t\t\tcurrentViewerPane.setTitle(selectedElement);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}";
- protected final String TEXT_426 = NL + "\t\t\t\t";
- protected final String TEXT_427 = " selectionList = new ";
- protected final String TEXT_428 = "();" + NL + "\t\t\t\tselectionList.add(selectedElement);" + NL + "\t\t\t\twhile (selectedElements.hasNext())" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tselectionList.add(selectedElements.next());" + NL + "\t\t\t\t}" + NL + "" + NL + "\t\t\t\t// Set the selection to the widget." + NL + "\t\t\t\t//" + NL + "\t\t\t\tselectionViewer.setSelection(new StructuredSelection(selectionList));";
- protected final String TEXT_429 = NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is for implementing {@link IEditorPart} and simply tests the command stack." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_430 = NL + "\t@Override";
- protected final String TEXT_431 = NL + "\tpublic boolean isDirty()" + NL + "\t{" + NL + "\t\treturn ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is for implementing {@link IEditorPart} and simply saves the model file." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_432 = NL + "\t@Override";
- protected final String TEXT_433 = NL + "\tpublic void doSave(IProgressMonitor progressMonitor)" + NL + "\t{" + NL + "\t\t// Save only resources that have actually changed." + NL + "\t\t//" + NL + "\t\tfinal ";
- protected final String TEXT_434 = " saveOptions = new ";
- protected final String TEXT_435 = "();";
- protected final String TEXT_436 = NL + "\t\tsaveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);";
- protected final String TEXT_437 = NL + "\t\tsaveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);";
- protected final String TEXT_438 = NL + NL + "\t\t// Do the work within an operation because this is a long running activity that modifies the workbench." + NL + "\t\t//" + NL + "\t\t";
- protected final String TEXT_439 = " operation =" + NL + "\t\t\tnew ";
- protected final String TEXT_440 = "()" + NL + "\t\t\t{" + NL + "\t\t\t\t// This is the method that gets invoked when the operation runs." + NL + "\t\t\t\t//";
- protected final String TEXT_441 = NL + "\t\t\t\t@Override";
- protected final String TEXT_442 = NL + "\t\t\t\tpublic void ";
- protected final String TEXT_443 = "(IProgressMonitor monitor)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t// Save the resources to the file system." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tboolean first = true;" + NL + "\t\t\t\t\t";
- protected final String TEXT_444 = " resources = editingDomain.getResourceSet().getResources();" + NL + "\t\t\t\t\tfor (int i = 0; i < resources.size(); ++i)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tResource resource = ";
- protected final String TEXT_445 = "(Resource)";
- protected final String TEXT_446 = "resources.get(i);" + NL + "\t\t\t\t\t\tif ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource))" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\ttry" + NL + "\t\t\t\t\t\t\t{";
- protected final String TEXT_447 = NL + "\t\t\t\t\t\t\t\tlong timeStamp = resource.getTimeStamp();" + NL + "\t\t\t\t\t\t\t\tresource.save(saveOptions);" + NL + "\t\t\t\t\t\t\t\tif (resource.getTimeStamp() != timeStamp)" + NL + "\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\tsavedResources.add(resource);" + NL + "\t\t\t\t\t\t\t\t}";
- protected final String TEXT_448 = NL + "\t\t\t\t\t\t\t\tresource.save(saveOptions);" + NL + "\t\t\t\t\t\t\t\tsavedResources.add(resource);";
- protected final String TEXT_449 = NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\tcatch (Exception exception)" + NL + "\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\tresourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));" + NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\tfirst = false;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "" + NL + "\t\tupdateProblemIndication = false;" + NL + "\t\ttry" + NL + "\t\t{" + NL + "\t\t\t// This runs the options, and shows progress." + NL + "\t\t\t//" + NL + "\t\t\tnew ProgressMonitorDialog(getSite().getShell()).run(true, false, operation);" + NL + "" + NL + "\t\t\t// Refresh the necessary state." + NL + "\t\t\t//" + NL + "\t\t\t((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();" + NL + "\t\t\tfirePropertyChange(IEditorPart.PROP_DIRTY);" + NL + "\t\t}" + NL + "\t\tcatch (Exception exception)" + NL + "\t\t{" + NL + "\t\t\t// Something went wrong that shouldn't." + NL + "\t\t\t//" + NL + "\t\t\t";
- protected final String TEXT_450 = ".INSTANCE.log(exception);" + NL + "\t\t}" + NL + "\t\tupdateProblemIndication = true;" + NL + "\t\tupdateProblemIndication();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This returns whether something has been persisted to the URI of the specified resource." + NL + "\t * The implementation uses the URI converter from the editor's resource set to try to open an input stream." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isPersisted(Resource resource)" + NL + "\t{" + NL + "\t\tboolean result = false;" + NL + "\t\ttry" + NL + "\t\t{" + NL + "\t\t\tInputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());" + NL + "\t\t\tif (stream != null)" + NL + "\t\t\t{" + NL + "\t\t\t\tresult = true;" + NL + "\t\t\t\tstream.close();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tcatch (IOException e)" + NL + "\t\t{" + NL + "\t\t\t// Ignore" + NL + "\t\t}" + NL + "\t\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This always returns true because it is not currently supported." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_451 = NL + "\t@Override";
- protected final String TEXT_452 = NL + "\tpublic boolean isSaveAsAllowed()" + NL + "\t{" + NL + "\t\treturn true;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This also changes the editor's input." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_453 = NL + "\t@Override";
- protected final String TEXT_454 = NL + "\tpublic void doSaveAs()" + NL + "\t{";
- protected final String TEXT_455 = NL + "\t\tnew ";
- protected final String TEXT_456 = "(getSite().getShell(), null, SWT.NONE)" + NL + "\t\t\t{";
- protected final String TEXT_457 = NL + "\t\t\t\t@Override";
- protected final String TEXT_458 = NL + "\t\t\t\tprotected boolean isSave()" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\treturn true;" + NL + "\t\t\t\t}" + NL;
- protected final String TEXT_459 = NL + "\t\t\t\t@Override";
- protected final String TEXT_460 = NL + "\t\t\t\tprotected boolean processResources()" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
- protected final String TEXT_461 = " uris = getURIs();" + NL + "\t\t\t\t\tif (uris.size() > 0)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tURI uri = ";
- protected final String TEXT_462 = "uris.get(0);" + NL + "\t\t\t\t\t\tdoSaveAs(uri, new ";
- protected final String TEXT_463 = "(uri));" + NL + "\t\t\t\t\t\treturn true;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\telse" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\treturn false;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}.open();";
- protected final String TEXT_464 = NL + "\t\tString[] filters = ";
- protected final String TEXT_465 = "(String[])";
- protected final String TEXT_466 = "FILE_EXTENSION_FILTERS.toArray(new String[FILE_EXTENSION_FILTERS.size()]);" + NL + "\t\tString[] files = ";
- protected final String TEXT_467 = ".openFilePathDialog(getSite().getShell(), ";
- protected final String TEXT_468 = ".SAVE, filters);" + NL + "\t\tif (files.length > 0)" + NL + "\t\t{" + NL + "\t\t\tURI uri = URI.createFileURI(files[0]);" + NL + "\t\t\tdoSaveAs(uri, new ";
- protected final String TEXT_469 = "(uri));" + NL + "\t\t}";
- protected final String TEXT_470 = NL + "\t\tSaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());" + NL + "\t\tsaveAsDialog.open();" + NL + "\t\tIPath path = saveAsDialog.getResult();" + NL + "\t\tif (path != null)" + NL + "\t\t{" + NL + "\t\t\tIFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);" + NL + "\t\t\tif (file != null)" + NL + "\t\t\t{" + NL + "\t\t\t\tdoSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));" + NL + "\t\t\t}" + NL + "\t\t}";
- protected final String TEXT_471 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void doSaveAs(URI uri, IEditorInput editorInput)" + NL + "\t{" + NL + "\t\t(";
- protected final String TEXT_472 = "(Resource)";
- protected final String TEXT_473 = "editingDomain.getResourceSet().getResources().get(0)).setURI(uri);" + NL + "\t\tsetInputWithNotify(editorInput);" + NL + "\t\tsetPartName(editorInput.getName());" + NL + "\t\tIProgressMonitor progressMonitor =" + NL + "\t\t\tgetActionBars().getStatusLineManager() != null ?" + NL + "\t\t\t\tgetActionBars().getStatusLineManager().getProgressMonitor() :" + NL + "\t\t\t\tnew ";
- protected final String TEXT_474 = "();" + NL + "\t\tdoSave(progressMonitor);" + NL + "\t}";
- protected final String TEXT_475 = NL + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void gotoMarker(IMarker marker)" + NL + "\t{";
- protected final String TEXT_476 = NL + "\t\t";
- protected final String TEXT_477 = " targetObjects = markerHelper.getTargetObjects(editingDomain, marker);" + NL + "\t\tif (!targetObjects.isEmpty())" + NL + "\t\t{" + NL + "\t\t\tsetSelectionToViewer(targetObjects);" + NL + "\t\t}";
- protected final String TEXT_478 = NL + "\t\ttry" + NL + "\t\t{" + NL + "\t\t\tif (marker.isSubtypeOf(EValidator.MARKER))" + NL + "\t\t\t{" + NL + "\t\t\t\tString uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null);" + NL + "\t\t\t\tif (uriAttribute != null)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tURI uri = URI.createURI(uriAttribute);" + NL + "\t\t\t\t\tEObject eObject = editingDomain.getResourceSet().getEObject(uri, true);" + NL + "\t\t\t\t\tif (eObject != null)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t setSelectionToViewer(Collections.singleton(editingDomain.getWrapper(eObject)));" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tcatch (CoreException exception)" + NL + "\t\t{" + NL + "\t\t\t";
- protected final String TEXT_479 = ".INSTANCE.log(exception);" + NL + "\t\t}";
- protected final String TEXT_480 = NL + "\t}";
- protected final String TEXT_481 = NL + NL + "\t/**" + NL + "\t * This is called during startup." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_482 = NL + "\t@Override";
- protected final String TEXT_483 = NL + "\tpublic void init(IEditorSite site, IEditorInput editorInput)" + NL + "\t{" + NL + "\t\tsetSite(site);" + NL + "\t\tsetInputWithNotify(editorInput);" + NL + "\t\tsetPartName(editorInput.getName());" + NL + "\t\tsite.setSelectionProvider(this);" + NL + "\t\tsite.getPage().addPartListener(partListener);";
- protected final String TEXT_484 = NL + "\t\tResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);";
- protected final String TEXT_485 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_486 = NL + "\t@Override";
- protected final String TEXT_487 = NL + "\tpublic void setFocus()" + NL + "\t{";
- protected final String TEXT_488 = NL + "\t\tif (currentViewerPane != null)" + NL + "\t\t{" + NL + "\t\t\tcurrentViewerPane.setFocus();" + NL + "\t\t}" + NL + "\t\telse" + NL + "\t\t{" + NL + "\t\t\tgetControl(getActivePage()).setFocus();" + NL + "\t\t}";
- protected final String TEXT_489 = NL + "\t\tgetControl(getActivePage()).setFocus();";
- protected final String TEXT_490 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void addSelectionChangedListener(ISelectionChangedListener listener)" + NL + "\t{" + NL + "\t\tselectionChangedListeners.add(listener);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void removeSelectionChangedListener(ISelectionChangedListener listener)" + NL + "\t{" + NL + "\t\tselectionChangedListeners.remove(listener);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ISelection getSelection()" + NL + "\t{" + NL + "\t\treturn editorSelection;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection." + NL + "\t * Calling this result will notify the listeners." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setSelection(ISelection selection)" + NL + "\t{" + NL + "\t\teditorSelection = selection;" + NL;
- protected final String TEXT_491 = NL + "\t\tfor (ISelectionChangedListener listener : selectionChangedListeners)";
- protected final String TEXT_492 = NL + "\t\tfor (Iterator listeners = selectionChangedListeners.iterator(); listeners.hasNext(); )";
- protected final String TEXT_493 = NL + "\t\t{";
- protected final String TEXT_494 = NL + "\t\t\tISelectionChangedListener listener = (ISelectionChangedListener)listeners.next();";
- protected final String TEXT_495 = NL + "\t\t\tlistener.selectionChanged(new SelectionChangedEvent(this, selection));" + NL + "\t\t}" + NL + "\t\tsetStatusLineManager(selection);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setStatusLineManager(ISelection selection)" + NL + "\t{" + NL + "\t\tIStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?" + NL + "\t\t\tcontentOutlineStatusLineManager : getActionBars().getStatusLineManager();" + NL + "" + NL + "\t\tif (statusLineManager != null)" + NL + "\t\t{" + NL + "\t\t\tif (selection instanceof IStructuredSelection)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
- protected final String TEXT_496 = " collection = ((IStructuredSelection)selection).toList();" + NL + "\t\t\t\tswitch (collection.size())" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tcase 0:" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tstatusLineManager.setMessage(getString(\"_UI_NoObjectSelected\"));";
- protected final String TEXT_497 = NL + "\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tcase 1:" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tString text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());" + NL + "\t\t\t\t\t\tstatusLineManager.setMessage(getString(\"_UI_SingleObjectSelected\", text));";
- protected final String TEXT_498 = NL + "\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tdefault:" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tstatusLineManager.setMessage(getString(\"_UI_MultiObjectSelected\", Integer.toString(collection.size())));";
- protected final String TEXT_499 = NL + "\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\telse" + NL + "\t\t\t{" + NL + "\t\t\t\tstatusLineManager.setMessage(\"\");";
- protected final String TEXT_500 = NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This looks up a string in the plugin's plugin.properties file." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static String getString(String key)" + NL + "\t{" + NL + "\t\treturn ";
- protected final String TEXT_501 = ".INSTANCE.getString(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This looks up a string in plugin.properties, making a substitution." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static String getString(String key, Object s1)" + NL + "\t{" + NL + "\t\treturn ";
- protected final String TEXT_502 = ".INSTANCE.getString(key, new Object [] { s1 });" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void menuAboutToShow(IMenuManager menuManager)" + NL + "\t{" + NL + "\t\t((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EditingDomainActionBarContributor getActionBarContributor()" + NL + "\t{" + NL + "\t\treturn (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IActionBars getActionBars()" + NL + "\t{" + NL + "\t\treturn getActionBarContributor().getActionBars();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic AdapterFactory getAdapterFactory()" + NL + "\t{" + NL + "\t\treturn adapterFactory;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
- protected final String TEXT_503 = NL + "\t@Override";
- protected final String TEXT_504 = NL + "\tpublic void dispose()" + NL + "\t{" + NL + "\t\tupdateProblemIndication = false;" + NL;
- protected final String TEXT_505 = NL + "\t\tResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);" + NL;
- protected final String TEXT_506 = NL + "\t\tgetSite().getPage().removePartListener(partListener);" + NL + "" + NL + "\t\tadapterFactory.dispose();" + NL + "" + NL + "\t\tif (getActionBarContributor().getActiveEditor() == this)" + NL + "\t\t{" + NL + "\t\t\tgetActionBarContributor().setActiveEditor(null);" + NL + "\t\t}" + NL;
- protected final String TEXT_507 = NL + "\t\tfor (PropertySheetPage propertySheetPage : propertySheetPages)";
- protected final String TEXT_508 = NL + "\t\tfor (Iterator i = propertySheetPages.iterator(); i.hasNext(); )";
- protected final String TEXT_509 = NL + "\t\t{";
- protected final String TEXT_510 = NL + "\t\t\tPropertySheetPage propertySheetPage = (PropertySheetPage)i.next();";
- protected final String TEXT_511 = NL + "\t\t\tpropertySheetPage.dispose();" + NL + "\t\t}" + NL + "" + NL + "\t\tif (contentOutlinePage != null)" + NL + "\t\t{" + NL + "\t\t\tcontentOutlinePage.dispose();" + NL + "\t\t}" + NL + "" + NL + "\t\tsuper.dispose();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Returns whether the outline view should be presented to the user." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean showOutlineView()" + NL + "\t{" + NL + "\t\treturn ";
- protected final String TEXT_512 = ";" + NL + "\t}" + NL + "}";
- protected final String TEXT_513 = NL;
+ protected final String TEXT_417 = NL + "\t\t\t\tpublic void setActionBars(IActionBars actionBars)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.setActionBars(actionBars);" + NL + "\t\t\t\t\tgetActionBarContributor().shareGlobalActions(this, actionBars);" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\tcontentOutlinePage = new MyContentOutlinePage();" + NL + "" + NL + "\t\t\t// Listen to selection so that we can handle it is a special way." + NL + "\t\t\t//" + NL + "\t\t\tcontentOutlinePage.addSelectionChangedListener" + NL + "\t\t\t\t(new ISelectionChangedListener()" + NL + "\t\t\t\t {" + NL + "\t\t\t\t\t // This ensures that we handle selections correctly." + NL + "\t\t\t\t\t //" + NL + "\t\t\t\t\t public void selectionChanged(SelectionChangedEvent event)" + NL + "\t\t\t\t\t {" + NL + "\t\t\t\t\t\t handleContentOutlineSelection(event.getSelection());" + NL + "\t\t\t\t\t }" + NL + "\t\t\t\t });" + NL + "\t\t}" + NL + "" + NL + "\t\treturn contentOutlinePage;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This accesses a cached version of the property sheet." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IPropertySheetPage getPropertySheetPage()" + NL + "\t{" + NL + "\t\tPropertySheetPage propertySheetPage =" + NL + "\t\t\tnew ExtendedPropertySheetPage(editingDomain";
+ protected final String TEXT_418 = ", ExtendedPropertySheetPage.Decoration.MANUAL";
+ protected final String TEXT_419 = ", ExtendedPropertySheetPage.Decoration.LIVE, ";
+ protected final String TEXT_420 = ".getPlugin().getDialogSettings()";
+ protected final String TEXT_421 = ")" + NL + "\t\t\t{";
+ protected final String TEXT_422 = NL + "\t\t\t\t@Override";
+ protected final String TEXT_423 = NL + "\t\t\t\tpublic void setSelectionToViewer(";
+ protected final String TEXT_424 = " selection)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
+ protected final String TEXT_425 = ".this.setSelectionToViewer(selection);" + NL + "\t\t\t\t\t";
+ protected final String TEXT_426 = ".this.setFocus();" + NL + "\t\t\t\t}" + NL;
+ protected final String TEXT_427 = NL + "\t\t\t\t@Override";
+ protected final String TEXT_428 = NL + "\t\t\t\tpublic void setActionBars(IActionBars actionBars)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tsuper.setActionBars(actionBars);" + NL + "\t\t\t\t\tgetActionBarContributor().shareGlobalActions(this, actionBars);" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\tpropertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));" + NL + "\t\tpropertySheetPages.add(propertySheetPage);" + NL + "" + NL + "\t\treturn propertySheetPage;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This deals with how we want selection in the outliner to affect the other views." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void handleContentOutlineSelection(ISelection selection)" + NL + "\t{";
+ protected final String TEXT_429 = NL + "\t\tif (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection)";
+ protected final String TEXT_430 = NL + "\t\tif (selectionViewer != null && !selection.isEmpty() && selection instanceof IStructuredSelection)";
+ protected final String TEXT_431 = NL + "\t\t{" + NL + "\t\t\tIterator";
+ protected final String TEXT_432 = "<?>";
+ protected final String TEXT_433 = " selectedElements = ((IStructuredSelection)selection).iterator();" + NL + "\t\t\tif (selectedElements.hasNext())" + NL + "\t\t\t{" + NL + "\t\t\t\t// Get the first selected element." + NL + "\t\t\t\t//" + NL + "\t\t\t\tObject selectedElement = selectedElements.next();" + NL;
+ protected final String TEXT_434 = NL + "\t\t\t\t// If it's the selection viewer, then we want it to select the same selection as this selection." + NL + "\t\t\t\t//" + NL + "\t\t\t\tif (currentViewerPane.getViewer() == selectionViewer)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
+ protected final String TEXT_435 = " selectionList = new ";
+ protected final String TEXT_436 = "();" + NL + "\t\t\t\t\tselectionList.add(selectedElement);" + NL + "\t\t\t\t\twhile (selectedElements.hasNext())" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tselectionList.add(selectedElements.next());" + NL + "\t\t\t\t\t}" + NL + "" + NL + "\t\t\t\t\t// Set the selection to the widget." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tselectionViewer.setSelection(new StructuredSelection(selectionList));" + NL + "\t\t\t\t}" + NL + "\t\t\t\telse" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t// Set the input to the widget." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tif (currentViewerPane.getViewer().getInput() != selectedElement)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tcurrentViewerPane.getViewer().setInput(selectedElement);" + NL + "\t\t\t\t\t\tcurrentViewerPane.setTitle(selectedElement);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}";
+ protected final String TEXT_437 = NL + "\t\t\t\t";
+ protected final String TEXT_438 = " selectionList = new ";
+ protected final String TEXT_439 = "();" + NL + "\t\t\t\tselectionList.add(selectedElement);" + NL + "\t\t\t\twhile (selectedElements.hasNext())" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tselectionList.add(selectedElements.next());" + NL + "\t\t\t\t}" + NL + "" + NL + "\t\t\t\t// Set the selection to the widget." + NL + "\t\t\t\t//" + NL + "\t\t\t\tselectionViewer.setSelection(new StructuredSelection(selectionList));";
+ protected final String TEXT_440 = NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is for implementing {@link IEditorPart} and simply tests the command stack." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_441 = NL + "\t@Override";
+ protected final String TEXT_442 = NL + "\tpublic boolean isDirty()" + NL + "\t{" + NL + "\t\treturn ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This is for implementing {@link IEditorPart} and simply saves the model file." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_443 = NL + "\t@Override";
+ protected final String TEXT_444 = NL + "\tpublic void doSave(IProgressMonitor progressMonitor)" + NL + "\t{" + NL + "\t\t// Save only resources that have actually changed." + NL + "\t\t//" + NL + "\t\tfinal ";
+ protected final String TEXT_445 = " saveOptions = new ";
+ protected final String TEXT_446 = "();";
+ protected final String TEXT_447 = NL + "\t\tsaveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);";
+ protected final String TEXT_448 = NL + "\t\tsaveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);";
+ protected final String TEXT_449 = NL + NL + "\t\t// Do the work within an operation because this is a long running activity that modifies the workbench." + NL + "\t\t//" + NL + "\t\t";
+ protected final String TEXT_450 = " operation =" + NL + "\t\t\tnew ";
+ protected final String TEXT_451 = "()" + NL + "\t\t\t{" + NL + "\t\t\t\t// This is the method that gets invoked when the operation runs." + NL + "\t\t\t\t//";
+ protected final String TEXT_452 = NL + "\t\t\t\t@Override";
+ protected final String TEXT_453 = NL + "\t\t\t\tpublic void ";
+ protected final String TEXT_454 = "(IProgressMonitor monitor)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t// Save the resources to the file system." + NL + "\t\t\t\t\t//" + NL + "\t\t\t\t\tboolean first = true;" + NL + "\t\t\t\t\t";
+ protected final String TEXT_455 = " resources = editingDomain.getResourceSet().getResources();" + NL + "\t\t\t\t\tfor (int i = 0; i < resources.size(); ++i)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tResource resource = ";
+ protected final String TEXT_456 = "(Resource)";
+ protected final String TEXT_457 = "resources.get(i);" + NL + "\t\t\t\t\t\tif ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource))" + NL + "\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\ttry" + NL + "\t\t\t\t\t\t\t{";
+ protected final String TEXT_458 = NL + "\t\t\t\t\t\t\t\tlong timeStamp = resource.getTimeStamp();" + NL + "\t\t\t\t\t\t\t\tresource.save(saveOptions);" + NL + "\t\t\t\t\t\t\t\tif (resource.getTimeStamp() != timeStamp)" + NL + "\t\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\t\tsavedResources.add(resource);" + NL + "\t\t\t\t\t\t\t\t}";
+ protected final String TEXT_459 = NL + "\t\t\t\t\t\t\t\tresource.save(saveOptions);" + NL + "\t\t\t\t\t\t\t\tsavedResources.add(resource);";
+ protected final String TEXT_460 = NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\tcatch (Exception exception)" + NL + "\t\t\t\t\t\t\t{" + NL + "\t\t\t\t\t\t\t\tresourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));" + NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t\tfirst = false;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "" + NL + "\t\tupdateProblemIndication = false;" + NL + "\t\ttry" + NL + "\t\t{" + NL + "\t\t\t// This runs the options, and shows progress." + NL + "\t\t\t//" + NL + "\t\t\tnew ProgressMonitorDialog(getSite().getShell()).run(true, false, operation);" + NL + "" + NL + "\t\t\t// Refresh the necessary state." + NL + "\t\t\t//" + NL + "\t\t\t((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();" + NL + "\t\t\tfirePropertyChange(IEditorPart.PROP_DIRTY);" + NL + "\t\t}" + NL + "\t\tcatch (Exception exception)" + NL + "\t\t{" + NL + "\t\t\t// Something went wrong that shouldn't." + NL + "\t\t\t//" + NL + "\t\t\t";
+ protected final String TEXT_461 = ".INSTANCE.log(exception);" + NL + "\t\t}" + NL + "\t\tupdateProblemIndication = true;" + NL + "\t\tupdateProblemIndication();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This returns whether something has been persisted to the URI of the specified resource." + NL + "\t * The implementation uses the URI converter from the editor's resource set to try to open an input stream." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isPersisted(Resource resource)" + NL + "\t{" + NL + "\t\tboolean result = false;" + NL + "\t\ttry" + NL + "\t\t{" + NL + "\t\t\tInputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());" + NL + "\t\t\tif (stream != null)" + NL + "\t\t\t{" + NL + "\t\t\t\tresult = true;" + NL + "\t\t\t\tstream.close();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tcatch (IOException e)" + NL + "\t\t{" + NL + "\t\t\t// Ignore" + NL + "\t\t}" + NL + "\t\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This always returns true because it is not currently supported." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_462 = NL + "\t@Override";
+ protected final String TEXT_463 = NL + "\tpublic boolean isSaveAsAllowed()" + NL + "\t{" + NL + "\t\treturn true;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This also changes the editor's input." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_464 = NL + "\t@Override";
+ protected final String TEXT_465 = NL + "\tpublic void doSaveAs()" + NL + "\t{";
+ protected final String TEXT_466 = NL + "\t\tnew ";
+ protected final String TEXT_467 = "(getSite().getShell(), null, SWT.NONE)" + NL + "\t\t\t{";
+ protected final String TEXT_468 = NL + "\t\t\t\t@Override";
+ protected final String TEXT_469 = NL + "\t\t\t\tprotected boolean isSave()" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\treturn true;" + NL + "\t\t\t\t}" + NL;
+ protected final String TEXT_470 = NL + "\t\t\t\t@Override";
+ protected final String TEXT_471 = NL + "\t\t\t\tprotected boolean processResources()" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\t";
+ protected final String TEXT_472 = " uris = getURIs();" + NL + "\t\t\t\t\tif (uris.size() > 0)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tURI uri = ";
+ protected final String TEXT_473 = "uris.get(0);" + NL + "\t\t\t\t\t\tdoSaveAs(uri, new ";
+ protected final String TEXT_474 = "(uri));" + NL + "\t\t\t\t\t\treturn true;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\telse" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\treturn false;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}.open();";
+ protected final String TEXT_475 = NL + "\t\tString[] filters = ";
+ protected final String TEXT_476 = "(String[])";
+ protected final String TEXT_477 = "FILE_EXTENSION_FILTERS.toArray(new String[FILE_EXTENSION_FILTERS.size()]);" + NL + "\t\tString[] files = ";
+ protected final String TEXT_478 = ".openFilePathDialog(getSite().getShell(), ";
+ protected final String TEXT_479 = ".SAVE, filters);" + NL + "\t\tif (files.length > 0)" + NL + "\t\t{" + NL + "\t\t\tURI uri = URI.createFileURI(files[0]);" + NL + "\t\t\tdoSaveAs(uri, new ";
+ protected final String TEXT_480 = "(uri));" + NL + "\t\t}";
+ protected final String TEXT_481 = NL + "\t\tSaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());" + NL + "\t\tsaveAsDialog.open();" + NL + "\t\tIPath path = saveAsDialog.getResult();" + NL + "\t\tif (path != null)" + NL + "\t\t{" + NL + "\t\t\tIFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);" + NL + "\t\t\tif (file != null)" + NL + "\t\t\t{" + NL + "\t\t\t\tdoSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));" + NL + "\t\t\t}" + NL + "\t\t}";
+ protected final String TEXT_482 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void doSaveAs(URI uri, IEditorInput editorInput)" + NL + "\t{" + NL + "\t\t(";
+ protected final String TEXT_483 = "(Resource)";
+ protected final String TEXT_484 = "editingDomain.getResourceSet().getResources().get(0)).setURI(uri);" + NL + "\t\tsetInputWithNotify(editorInput);" + NL + "\t\tsetPartName(editorInput.getName());" + NL + "\t\tIProgressMonitor progressMonitor =" + NL + "\t\t\tgetActionBars().getStatusLineManager() != null ?" + NL + "\t\t\t\tgetActionBars().getStatusLineManager().getProgressMonitor() :" + NL + "\t\t\t\tnew ";
+ protected final String TEXT_485 = "();" + NL + "\t\tdoSave(progressMonitor);" + NL + "\t}";
+ protected final String TEXT_486 = NL + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void gotoMarker(IMarker marker)" + NL + "\t{";
+ protected final String TEXT_487 = NL + "\t\t";
+ protected final String TEXT_488 = " targetObjects = markerHelper.getTargetObjects(editingDomain, marker);" + NL + "\t\tif (!targetObjects.isEmpty())" + NL + "\t\t{" + NL + "\t\t\tsetSelectionToViewer(targetObjects);" + NL + "\t\t}";
+ protected final String TEXT_489 = NL + "\t\ttry" + NL + "\t\t{" + NL + "\t\t\tif (marker.isSubtypeOf(EValidator.MARKER))" + NL + "\t\t\t{" + NL + "\t\t\t\tString uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null);" + NL + "\t\t\t\tif (uriAttribute != null)" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tURI uri = URI.createURI(uriAttribute);" + NL + "\t\t\t\t\tEObject eObject = editingDomain.getResourceSet().getEObject(uri, true);" + NL + "\t\t\t\t\tif (eObject != null)" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t setSelectionToViewer(Collections.singleton(editingDomain.getWrapper(eObject)));" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tcatch (CoreException exception)" + NL + "\t\t{" + NL + "\t\t\t";
+ protected final String TEXT_490 = ".INSTANCE.log(exception);" + NL + "\t\t}";
+ protected final String TEXT_491 = NL + "\t}";
+ protected final String TEXT_492 = NL + NL + "\t/**" + NL + "\t * This is called during startup." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_493 = NL + "\t@Override";
+ protected final String TEXT_494 = NL + "\tpublic void init(IEditorSite site, IEditorInput editorInput)" + NL + "\t{" + NL + "\t\tsetSite(site);" + NL + "\t\tsetInputWithNotify(editorInput);" + NL + "\t\tsetPartName(editorInput.getName());" + NL + "\t\tsite.setSelectionProvider(this);" + NL + "\t\tsite.getPage().addPartListener(partListener);";
+ protected final String TEXT_495 = NL + "\t\tResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);";
+ protected final String TEXT_496 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_497 = NL + "\t@Override";
+ protected final String TEXT_498 = NL + "\tpublic void setFocus()" + NL + "\t{";
+ protected final String TEXT_499 = NL + "\t\tif (currentViewerPane != null)" + NL + "\t\t{" + NL + "\t\t\tcurrentViewerPane.setFocus();" + NL + "\t\t}" + NL + "\t\telse" + NL + "\t\t{" + NL + "\t\t\tgetControl(getActivePage()).setFocus();" + NL + "\t\t}";
+ protected final String TEXT_500 = NL + "\t\tgetControl(getActivePage()).setFocus();";
+ protected final String TEXT_501 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void addSelectionChangedListener(ISelectionChangedListener listener)" + NL + "\t{" + NL + "\t\tselectionChangedListeners.add(listener);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void removeSelectionChangedListener(ISelectionChangedListener listener)" + NL + "\t{" + NL + "\t\tselectionChangedListeners.remove(listener);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ISelection getSelection()" + NL + "\t{" + NL + "\t\treturn editorSelection;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection." + NL + "\t * Calling this result will notify the listeners." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setSelection(ISelection selection)" + NL + "\t{" + NL + "\t\teditorSelection = selection;" + NL;
+ protected final String TEXT_502 = NL + "\t\tfor (ISelectionChangedListener listener : selectionChangedListeners)";
+ protected final String TEXT_503 = NL + "\t\tfor (Iterator listeners = selectionChangedListeners.iterator(); listeners.hasNext(); )";
+ protected final String TEXT_504 = NL + "\t\t{";
+ protected final String TEXT_505 = NL + "\t\t\tISelectionChangedListener listener = (ISelectionChangedListener)listeners.next();";
+ protected final String TEXT_506 = NL + "\t\t\tlistener.selectionChanged(new SelectionChangedEvent(this, selection));" + NL + "\t\t}" + NL + "\t\tsetStatusLineManager(selection);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setStatusLineManager(ISelection selection)" + NL + "\t{" + NL + "\t\tIStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?" + NL + "\t\t\tcontentOutlineStatusLineManager : getActionBars().getStatusLineManager();" + NL + "" + NL + "\t\tif (statusLineManager != null)" + NL + "\t\t{" + NL + "\t\t\tif (selection instanceof IStructuredSelection)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
+ protected final String TEXT_507 = " collection = ((IStructuredSelection)selection).toList();" + NL + "\t\t\t\tswitch (collection.size())" + NL + "\t\t\t\t{" + NL + "\t\t\t\t\tcase 0:" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tstatusLineManager.setMessage(getString(\"_UI_NoObjectSelected\"));";
+ protected final String TEXT_508 = NL + "\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tcase 1:" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tString text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());" + NL + "\t\t\t\t\t\tstatusLineManager.setMessage(getString(\"_UI_SingleObjectSelected\", text));";
+ protected final String TEXT_509 = NL + "\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tdefault:" + NL + "\t\t\t\t\t{" + NL + "\t\t\t\t\t\tstatusLineManager.setMessage(getString(\"_UI_MultiObjectSelected\", Integer.toString(collection.size())));";
+ protected final String TEXT_510 = NL + "\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\telse" + NL + "\t\t\t{" + NL + "\t\t\t\tstatusLineManager.setMessage(\"\");";
+ protected final String TEXT_511 = NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This looks up a string in the plugin's plugin.properties file." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static String getString(String key)" + NL + "\t{" + NL + "\t\treturn ";
+ protected final String TEXT_512 = ".INSTANCE.getString(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This looks up a string in plugin.properties, making a substitution." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static String getString(String key, Object s1)" + NL + "\t{" + NL + "\t\treturn ";
+ protected final String TEXT_513 = ".INSTANCE.getString(key, new Object [] { s1 });" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void menuAboutToShow(IMenuManager menuManager)" + NL + "\t{" + NL + "\t\t((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EditingDomainActionBarContributor getActionBarContributor()" + NL + "\t{" + NL + "\t\treturn (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IActionBars getActionBars()" + NL + "\t{" + NL + "\t\treturn getActionBarContributor().getActionBars();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic AdapterFactory getAdapterFactory()" + NL + "\t{" + NL + "\t\treturn adapterFactory;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_514 = NL + "\t@Override";
+ protected final String TEXT_515 = NL + "\tpublic void dispose()" + NL + "\t{" + NL + "\t\tupdateProblemIndication = false;" + NL;
+ protected final String TEXT_516 = NL + "\t\tResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);" + NL;
+ protected final String TEXT_517 = NL + "\t\tgetSite().getPage().removePartListener(partListener);" + NL + "" + NL + "\t\tadapterFactory.dispose();" + NL + "" + NL + "\t\tif (getActionBarContributor().getActiveEditor() == this)" + NL + "\t\t{" + NL + "\t\t\tgetActionBarContributor().setActiveEditor(null);" + NL + "\t\t}" + NL;
+ protected final String TEXT_518 = NL + "\t\tfor (PropertySheetPage propertySheetPage : propertySheetPages)";
+ protected final String TEXT_519 = NL + "\t\tfor (Iterator i = propertySheetPages.iterator(); i.hasNext(); )";
+ protected final String TEXT_520 = NL + "\t\t{";
+ protected final String TEXT_521 = NL + "\t\t\tPropertySheetPage propertySheetPage = (PropertySheetPage)i.next();";
+ protected final String TEXT_522 = NL + "\t\t\tpropertySheetPage.dispose();" + NL + "\t\t}" + NL + "" + NL + "\t\tif (contentOutlinePage != null)" + NL + "\t\t{" + NL + "\t\t\tcontentOutlinePage.dispose();" + NL + "\t\t}" + NL + "" + NL + "\t\tsuper.dispose();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Returns whether the outline view should be presented to the user." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean showOutlineView()" + NL + "\t{" + NL + "\t\treturn ";
+ protected final String TEXT_523 = ";" + NL + "\t}" + NL + "}";
+ protected final String TEXT_524 = NL;
public String generate(Object argument)
{
@@ -1340,7 +1351,7 @@
stringBuffer.append(TEXT_370);
}
stringBuffer.append(TEXT_371);
- if (genModel.useGenerics()) {
+ if (genModel.useGenerics() && genModel.getEclipsePlatformVersion().getValue() < GenEclipsePlatformVersion.MARS_VALUE) {
stringBuffer.append(TEXT_372);
if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE) {
stringBuffer.append(TEXT_373);
@@ -1352,284 +1363,307 @@
if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_376);
}
+ if (genModel.getEclipsePlatformVersion().getValue() >= GenEclipsePlatformVersion.MARS_VALUE) {
stringBuffer.append(TEXT_377);
- if (!genModel.isRichClientPlatform()) {
+ } else {
stringBuffer.append(TEXT_378);
}
stringBuffer.append(TEXT_379);
- if (genModel.useClassOverrideAnnotation()) {
+ if (genModel.getEclipsePlatformVersion().getValue() >= GenEclipsePlatformVersion.MARS_VALUE) {
stringBuffer.append(TEXT_380);
- }
+ } else {
stringBuffer.append(TEXT_381);
- if (useStyledLabelProvider) {
+ }
stringBuffer.append(TEXT_382);
- stringBuffer.append(_DelegatingAdapterFactoryLabelProvider);
+ if (genModel.getEclipsePlatformVersion().getValue() >= GenEclipsePlatformVersion.MARS_VALUE) {
stringBuffer.append(TEXT_383);
- }
- if (genModel.getDecoration() != GenDecoration.NONE) {
+ } else {
stringBuffer.append(TEXT_384);
- stringBuffer.append(_DecoratingColumLabelProvider);
- stringBuffer.append(TEXT_385);
}
+ stringBuffer.append(TEXT_385);
+ if (!genModel.isRichClientPlatform()) {
stringBuffer.append(TEXT_386);
- stringBuffer.append(_AdapterFactoryLabelProvider);
+ if (genModel.getEclipsePlatformVersion().getValue() >= GenEclipsePlatformVersion.MARS_VALUE) {
stringBuffer.append(TEXT_387);
- if (useExtendedLabelProvider) {
+ } else {
stringBuffer.append(TEXT_388);
}
stringBuffer.append(TEXT_389);
- if (genModel.getDecoration() != GenDecoration.NONE) {
+ }
stringBuffer.append(TEXT_390);
- stringBuffer.append(_DiagnosticDecorator);
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_391);
- if (genModel.getDecoration() == GenDecoration.MANUAL) {
+ }
stringBuffer.append(TEXT_392);
- }
+ if (useStyledLabelProvider) {
stringBuffer.append(TEXT_393);
- if (genModel.getDecoration() == GenDecoration.LIVE) {
+ stringBuffer.append(_DelegatingAdapterFactoryLabelProvider);
stringBuffer.append(TEXT_394);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
- stringBuffer.append(TEXT_395);
}
+ if (genModel.getDecoration() != GenDecoration.NONE) {
+ stringBuffer.append(TEXT_395);
+ stringBuffer.append(_DecoratingColumLabelProvider);
stringBuffer.append(TEXT_396);
}
- if (useStyledLabelProvider) {
stringBuffer.append(TEXT_397);
- }
+ stringBuffer.append(_AdapterFactoryLabelProvider);
stringBuffer.append(TEXT_398);
- if (genModel.getDecoration() != GenDecoration.NONE) {
+ if (useExtendedLabelProvider) {
stringBuffer.append(TEXT_399);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.viewer.ColumnViewerInformationControlToolTipSupport"));
- stringBuffer.append(TEXT_400);
- stringBuffer.append(_DiagnosticDecorator);
- stringBuffer.append(TEXT_401);
}
+ stringBuffer.append(TEXT_400);
+ if (genModel.getDecoration() != GenDecoration.NONE) {
+ stringBuffer.append(TEXT_401);
+ stringBuffer.append(_DiagnosticDecorator);
stringBuffer.append(TEXT_402);
- if (genModel.useClassOverrideAnnotation()) {
+ if (genModel.getDecoration() == GenDecoration.MANUAL) {
stringBuffer.append(TEXT_403);
}
stringBuffer.append(TEXT_404);
- if (genModel.useClassOverrideAnnotation()) {
+ if (genModel.getDecoration() == GenDecoration.LIVE) {
stringBuffer.append(TEXT_405);
- }
- stringBuffer.append(TEXT_406);
- if (genModel.getDecoration() == GenDecoration.MANUAL) {
- stringBuffer.append(TEXT_407);
- } else if (genModel.getDecoration() == GenDecoration.LIVE) {
- stringBuffer.append(TEXT_408);
stringBuffer.append(genPackage.getImportedEditorPluginClassName());
+ stringBuffer.append(TEXT_406);
+ }
+ stringBuffer.append(TEXT_407);
+ }
+ if (useStyledLabelProvider) {
+ stringBuffer.append(TEXT_408);
+ }
stringBuffer.append(TEXT_409);
- }
+ if (genModel.getDecoration() != GenDecoration.NONE) {
stringBuffer.append(TEXT_410);
- if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.viewer.ColumnViewerInformationControlToolTipSupport"));
stringBuffer.append(TEXT_411);
- }
+ stringBuffer.append(_DiagnosticDecorator);
stringBuffer.append(TEXT_412);
- stringBuffer.append(_ListOfAnything);
+ }
stringBuffer.append(TEXT_413);
- stringBuffer.append(genPackage.getEditorClassName());
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_414);
- stringBuffer.append(genPackage.getEditorClassName());
+ }
stringBuffer.append(TEXT_415);
if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_416);
}
stringBuffer.append(TEXT_417);
- if (genPackage.isMultipleEditorPages()) {
+ if (genModel.getDecoration() == GenDecoration.MANUAL) {
stringBuffer.append(TEXT_418);
- } else {
+ } else if (genModel.getDecoration() == GenDecoration.LIVE) {
stringBuffer.append(TEXT_419);
- }
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_420);
- if (genModel.useGenerics()) {
+ }
stringBuffer.append(TEXT_421);
- }
- stringBuffer.append(TEXT_422);
- if (genPackage.isMultipleEditorPages()) {
- stringBuffer.append(TEXT_423);
- stringBuffer.append(_ArrayListOfObject);
- stringBuffer.append(TEXT_424);
- stringBuffer.append(_ArrayListOfObject);
- stringBuffer.append(TEXT_425);
- } else {
- stringBuffer.append(TEXT_426);
- stringBuffer.append(_ArrayListOfObject);
- stringBuffer.append(TEXT_427);
- stringBuffer.append(_ArrayListOfObject);
- stringBuffer.append(TEXT_428);
- }
- stringBuffer.append(TEXT_429);
if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(TEXT_422);
+ }
+ stringBuffer.append(TEXT_423);
+ stringBuffer.append(_ListOfAnything);
+ stringBuffer.append(TEXT_424);
+ stringBuffer.append(genPackage.getEditorClassName());
+ stringBuffer.append(TEXT_425);
+ stringBuffer.append(genPackage.getEditorClassName());
+ stringBuffer.append(TEXT_426);
+ if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(TEXT_427);
+ }
+ stringBuffer.append(TEXT_428);
+ if (genPackage.isMultipleEditorPages()) {
+ stringBuffer.append(TEXT_429);
+ } else {
stringBuffer.append(TEXT_430);
}
stringBuffer.append(TEXT_431);
- if (genModel.useClassOverrideAnnotation()) {
+ if (genModel.useGenerics()) {
stringBuffer.append(TEXT_432);
}
stringBuffer.append(TEXT_433);
- stringBuffer.append(_MapOfObjectToObject);
+ if (genPackage.isMultipleEditorPages()) {
stringBuffer.append(TEXT_434);
- stringBuffer.append(_HashMapOfObjectToObject);
+ stringBuffer.append(_ArrayListOfObject);
stringBuffer.append(TEXT_435);
- if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF23_VALUE) {
+ stringBuffer.append(_ArrayListOfObject);
stringBuffer.append(TEXT_436);
- }
- if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF29_VALUE) {
+ } else {
stringBuffer.append(TEXT_437);
- }
+ stringBuffer.append(_ArrayListOfObject);
stringBuffer.append(TEXT_438);
- stringBuffer.append(importedOperationClassName);
+ stringBuffer.append(_ArrayListOfObject);
stringBuffer.append(TEXT_439);
- stringBuffer.append(importedOperationClassName);
+ }
stringBuffer.append(TEXT_440);
- if (!genModel.isRichClientPlatform() && genModel.useClassOverrideAnnotation()) {
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_441);
}
stringBuffer.append(TEXT_442);
- stringBuffer.append(operationMethodName);
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_443);
- stringBuffer.append(_ListOfResource);
- stringBuffer.append(TEXT_444);
- if (!genModel.useGenerics()) {
- stringBuffer.append(TEXT_445);
}
+ stringBuffer.append(TEXT_444);
+ stringBuffer.append(_MapOfObjectToObject);
+ stringBuffer.append(TEXT_445);
+ stringBuffer.append(_HashMapOfObjectToObject);
stringBuffer.append(TEXT_446);
- if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
+ if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF23_VALUE) {
stringBuffer.append(TEXT_447);
- } else {
+ }
+ if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF29_VALUE) {
stringBuffer.append(TEXT_448);
}
stringBuffer.append(TEXT_449);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
+ stringBuffer.append(importedOperationClassName);
stringBuffer.append(TEXT_450);
- if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(importedOperationClassName);
stringBuffer.append(TEXT_451);
- }
+ if (!genModel.isRichClientPlatform() && genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_452);
- if (genModel.useClassOverrideAnnotation()) {
+ }
stringBuffer.append(TEXT_453);
- }
+ stringBuffer.append(operationMethodName);
stringBuffer.append(TEXT_454);
- if (genModel.isRichClientPlatform()) {
- if (genModel.isRichAjaxPlatform()) {
+ stringBuffer.append(_ListOfResource);
stringBuffer.append(TEXT_455);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.dialogs.ResourceDialog"));
+ if (!genModel.useGenerics()) {
stringBuffer.append(TEXT_456);
- if (genModel.useClassOverrideAnnotation()) {
- stringBuffer.append(TEXT_457);
}
+ stringBuffer.append(TEXT_457);
+ if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
stringBuffer.append(TEXT_458);
- if (genModel.useClassOverrideAnnotation()) {
+ } else {
stringBuffer.append(TEXT_459);
}
stringBuffer.append(TEXT_460);
- stringBuffer.append("List" + (genModel.useGenerics() ? "<URI>" : ""));
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_461);
- stringBuffer.append(genModel.useGenerics() ? "": "(URI)");
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_462);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.URIEditorInput"));
+ }
stringBuffer.append(TEXT_463);
- } else {
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_464);
- if (!genModel.useGenerics()) {
+ }
stringBuffer.append(TEXT_465);
- }
+ if (genModel.isRichClientPlatform()) {
+ if (genModel.isRichAjaxPlatform()) {
stringBuffer.append(TEXT_466);
- stringBuffer.append(genModel.getImportedName(genModel.getQualifiedEditorAdvisorClassName()));
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.dialogs.ResourceDialog"));
stringBuffer.append(TEXT_467);
- stringBuffer.append(genModel.getImportedName("org.eclipse.swt.SWT"));
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_468);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.URIEditorInput"));
- stringBuffer.append(TEXT_469);
}
- } else {
+ stringBuffer.append(TEXT_469);
+ if (genModel.useClassOverrideAnnotation()) {
stringBuffer.append(TEXT_470);
}
stringBuffer.append(TEXT_471);
- if (!genModel.useGenerics()) {
+ stringBuffer.append("List" + (genModel.useGenerics() ? "<URI>" : ""));
stringBuffer.append(TEXT_472);
- }
+ stringBuffer.append(genModel.useGenerics() ? "": "(URI)");
stringBuffer.append(TEXT_473);
- stringBuffer.append(genModel.getImportedName("org.eclipse.core.runtime.NullProgressMonitor"));
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.URIEditorInput"));
stringBuffer.append(TEXT_474);
- if (!genModel.isRichClientPlatform()) {
- stringBuffer.append(TEXT_475);
- if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF23_VALUE) {
- stringBuffer.append(TEXT_476);
- stringBuffer.append(_ListOfAnything);
- stringBuffer.append(TEXT_477);
} else {
- stringBuffer.append(TEXT_478);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
- stringBuffer.append(TEXT_479);
+ stringBuffer.append(TEXT_475);
+ if (!genModel.useGenerics()) {
+ stringBuffer.append(TEXT_476);
}
+ stringBuffer.append(TEXT_477);
+ stringBuffer.append(genModel.getImportedName(genModel.getQualifiedEditorAdvisorClassName()));
+ stringBuffer.append(TEXT_478);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.swt.SWT"));
+ stringBuffer.append(TEXT_479);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.ui.URIEditorInput"));
stringBuffer.append(TEXT_480);
}
+ } else {
stringBuffer.append(TEXT_481);
- if (genModel.useClassOverrideAnnotation()) {
+ }
stringBuffer.append(TEXT_482);
- }
+ if (!genModel.useGenerics()) {
stringBuffer.append(TEXT_483);
- if (!genModel.isRichClientPlatform()) {
+ }
stringBuffer.append(TEXT_484);
- }
+ stringBuffer.append(genModel.getImportedName("org.eclipse.core.runtime.NullProgressMonitor"));
stringBuffer.append(TEXT_485);
- if (genModel.useClassOverrideAnnotation()) {
+ if (!genModel.isRichClientPlatform()) {
stringBuffer.append(TEXT_486);
- }
+ if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF23_VALUE) {
stringBuffer.append(TEXT_487);
- if (genPackage.isMultipleEditorPages()) {
+ stringBuffer.append(_ListOfAnything);
stringBuffer.append(TEXT_488);
} else {
stringBuffer.append(TEXT_489);
- }
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_490);
- if (genModel.useGenerics()) {
+ }
stringBuffer.append(TEXT_491);
- } else {
+ }
stringBuffer.append(TEXT_492);
- }
- stringBuffer.append(TEXT_493);
- if (!genModel.useGenerics()) {
- stringBuffer.append(TEXT_494);
- }
- stringBuffer.append(TEXT_495);
- stringBuffer.append(_CollectionOfAnything);
- stringBuffer.append(TEXT_496);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(TEXT_497);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(TEXT_498);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(TEXT_499);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(TEXT_500);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
- stringBuffer.append(TEXT_501);
- stringBuffer.append(genPackage.getImportedEditorPluginClassName());
- stringBuffer.append(TEXT_502);
if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(TEXT_493);
+ }
+ stringBuffer.append(TEXT_494);
+ if (!genModel.isRichClientPlatform()) {
+ stringBuffer.append(TEXT_495);
+ }
+ stringBuffer.append(TEXT_496);
+ if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(TEXT_497);
+ }
+ stringBuffer.append(TEXT_498);
+ if (genPackage.isMultipleEditorPages()) {
+ stringBuffer.append(TEXT_499);
+ } else {
+ stringBuffer.append(TEXT_500);
+ }
+ stringBuffer.append(TEXT_501);
+ if (genModel.useGenerics()) {
+ stringBuffer.append(TEXT_502);
+ } else {
stringBuffer.append(TEXT_503);
}
stringBuffer.append(TEXT_504);
- if (!genModel.isRichClientPlatform()) {
+ if (!genModel.useGenerics()) {
stringBuffer.append(TEXT_505);
}
stringBuffer.append(TEXT_506);
- if (genModel.useGenerics()) {
+ stringBuffer.append(_CollectionOfAnything);
stringBuffer.append(TEXT_507);
- } else {
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_508);
- }
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_509);
- if (!genModel.useGenerics()) {
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_510);
- }
+ stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(TEXT_511);
- stringBuffer.append(genPackage.isMultipleEditorPages());
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_512);
- genModel.emitSortedImports();
+ stringBuffer.append(genPackage.getImportedEditorPluginClassName());
stringBuffer.append(TEXT_513);
+ if (genModel.useClassOverrideAnnotation()) {
+ stringBuffer.append(TEXT_514);
+ }
+ stringBuffer.append(TEXT_515);
+ if (!genModel.isRichClientPlatform()) {
+ stringBuffer.append(TEXT_516);
+ }
+ stringBuffer.append(TEXT_517);
+ if (genModel.useGenerics()) {
+ stringBuffer.append(TEXT_518);
+ } else {
+ stringBuffer.append(TEXT_519);
+ }
+ stringBuffer.append(TEXT_520);
+ if (!genModel.useGenerics()) {
+ stringBuffer.append(TEXT_521);
+ }
+ stringBuffer.append(TEXT_522);
+ stringBuffer.append(genPackage.isMultipleEditorPages());
+ stringBuffer.append(TEXT_523);
+ genModel.emitSortedImports();
+ stringBuffer.append(TEXT_524);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/editor/ManifestMF.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/editor/ManifestMF.java
index 9bfd23e..1343f61 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/editor/ManifestMF.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/editor/ManifestMF.java
@@ -26,18 +26,19 @@
protected final String TEXT_9 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-1.6";
protected final String TEXT_10 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-1.7";
protected final String TEXT_11 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-1.8";
- protected final String TEXT_12 = NL + "Export-Package: ";
- protected final String TEXT_13 = ",";
- protected final String TEXT_14 = NL + " ";
- protected final String TEXT_15 = NL + "Require-Bundle: ";
- protected final String TEXT_16 = ";visibility:=reexport";
- protected final String TEXT_17 = ",";
- protected final String TEXT_18 = NL + " ";
- protected final String TEXT_19 = ";visibility:=reexport";
- protected final String TEXT_20 = NL + "Import-Package: org.eclipse.emf.common.ui," + NL + " org.eclipse.emf.common.ui.action," + NL + " org.eclipse.emf.common.ui.dialogs," + NL + " org.eclipse.emf.common.ui.editor," + NL + " org.eclipse.emf.common.ui.viewer," + NL + " org.eclipse.emf.edit.ui," + NL + " org.eclipse.emf.edit.ui.action," + NL + " org.eclipse.emf.edit.ui.celleditor," + NL + " org.eclipse.emf.edit.ui.dnd," + NL + " org.eclipse.emf.edit.ui.provider," + NL + " org.eclipse.emf.edit.ui.util," + NL + " org.eclipse.emf.edit.ui.view," + NL + " org.eclipse.jface.action," + NL + " org.eclipse.jface.dialogs," + NL + " org.eclipse.jface.operation," + NL + " org.eclipse.jface.viewers," + NL + " org.eclipse.jface.window," + NL + " org.eclipse.jface.wizard," + NL + " org.eclipse.swt," + NL + " org.eclipse.swt.custom," + NL + " org.eclipse.swt.dnd," + NL + " org.eclipse.swt.events," + NL + " org.eclipse.swt.graphics," + NL + " org.eclipse.swt.layout," + NL + " org.eclipse.swt.widgets," + NL + " org.eclipse.ui;ui.workbench=\"split\"," + NL + " org.eclipse.ui.actions;ui.workbench=\"split\"," + NL + " org.eclipse.ui.application," + NL + " org.eclipse.ui.part;ui.workbench=\"split\"," + NL + " org.eclipse.ui.views," + NL + " org.eclipse.ui.views.contentoutline," + NL + " org.eclipse.ui.views.properties;ui.views=\"split\"";
- protected final String TEXT_21 = NL + "Eclipse-LazyStart: true";
- protected final String TEXT_22 = NL + "Bundle-ActivationPolicy: lazy";
- protected final String TEXT_23 = NL;
+ protected final String TEXT_12 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-9";
+ protected final String TEXT_13 = NL + "Export-Package: ";
+ protected final String TEXT_14 = ",";
+ protected final String TEXT_15 = NL + " ";
+ protected final String TEXT_16 = NL + "Require-Bundle: ";
+ protected final String TEXT_17 = ";visibility:=reexport";
+ protected final String TEXT_18 = ",";
+ protected final String TEXT_19 = NL + " ";
+ protected final String TEXT_20 = ";visibility:=reexport";
+ protected final String TEXT_21 = NL + "Import-Package: org.eclipse.emf.common.ui," + NL + " org.eclipse.emf.common.ui.action," + NL + " org.eclipse.emf.common.ui.dialogs," + NL + " org.eclipse.emf.common.ui.editor," + NL + " org.eclipse.emf.common.ui.viewer," + NL + " org.eclipse.emf.edit.ui," + NL + " org.eclipse.emf.edit.ui.action," + NL + " org.eclipse.emf.edit.ui.celleditor," + NL + " org.eclipse.emf.edit.ui.dnd," + NL + " org.eclipse.emf.edit.ui.provider," + NL + " org.eclipse.emf.edit.ui.util," + NL + " org.eclipse.emf.edit.ui.view," + NL + " org.eclipse.jface.action," + NL + " org.eclipse.jface.dialogs," + NL + " org.eclipse.jface.operation," + NL + " org.eclipse.jface.viewers," + NL + " org.eclipse.jface.window," + NL + " org.eclipse.jface.wizard," + NL + " org.eclipse.swt," + NL + " org.eclipse.swt.custom," + NL + " org.eclipse.swt.dnd," + NL + " org.eclipse.swt.events," + NL + " org.eclipse.swt.graphics," + NL + " org.eclipse.swt.layout," + NL + " org.eclipse.swt.widgets," + NL + " org.eclipse.ui;ui.workbench=\"split\"," + NL + " org.eclipse.ui.actions;ui.workbench=\"split\"," + NL + " org.eclipse.ui.application," + NL + " org.eclipse.ui.part;ui.workbench=\"split\"," + NL + " org.eclipse.ui.views," + NL + " org.eclipse.ui.views.contentoutline," + NL + " org.eclipse.ui.views.properties;ui.views=\"split\"";
+ protected final String TEXT_22 = NL + "Eclipse-LazyStart: true";
+ protected final String TEXT_23 = NL + "Bundle-ActivationPolicy: lazy";
+ protected final String TEXT_24 = NL;
public String generate(Object argument)
{
@@ -78,37 +79,39 @@
stringBuffer.append(TEXT_10);
} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK80_LITERAL) {
stringBuffer.append(TEXT_11);
+ } else if (genModel.getComplianceLevel() == GenJDKLevel.JDK90_LITERAL) {
+ stringBuffer.append(TEXT_12);
}
Iterator<String> packagesIterator = genModel.getEditorQualifiedPackageNames().iterator(); if (packagesIterator.hasNext()) { String pack = packagesIterator.next();
- stringBuffer.append(TEXT_12);
+ stringBuffer.append(TEXT_13);
stringBuffer.append(pack);
while(packagesIterator.hasNext()) { pack = packagesIterator.next();
- stringBuffer.append(TEXT_13);
stringBuffer.append(TEXT_14);
+ stringBuffer.append(TEXT_15);
stringBuffer.append(pack);
}
}
Iterator<String> requiredPluginIterator = genModel.getEditorRequiredPlugins().iterator(); if (requiredPluginIterator.hasNext()) { String pluginID = requiredPluginIterator.next();
- stringBuffer.append(TEXT_15);
+ stringBuffer.append(TEXT_16);
stringBuffer.append(pluginID);
if (!pluginID.startsWith("org.eclipse.core.runtime")){
- stringBuffer.append(TEXT_16);
- } while(requiredPluginIterator.hasNext()) { pluginID = requiredPluginIterator.next();
stringBuffer.append(TEXT_17);
+ } while(requiredPluginIterator.hasNext()) { pluginID = requiredPluginIterator.next();
stringBuffer.append(TEXT_18);
+ stringBuffer.append(TEXT_19);
stringBuffer.append(pluginID);
if (!pluginID.startsWith("org.eclipse.core.runtime") && !pluginID.equals("org.eclipse.xtext.xbase.lib") && !pluginID.equals("org.eclipse.emf.ecore.xcore.lib")) {
- stringBuffer.append(TEXT_19);
+ stringBuffer.append(TEXT_20);
}}
}
if (genModel.isRichAjaxPlatform()) {
- stringBuffer.append(TEXT_20);
- }
- if (genModel.getRuntimeVersion() == GenRuntimeVersion.EMF22 || genModel.getRuntimeVersion() == GenRuntimeVersion.EMF23) {
stringBuffer.append(TEXT_21);
}
+ if (genModel.getRuntimeVersion() == GenRuntimeVersion.EMF22 || genModel.getRuntimeVersion() == GenRuntimeVersion.EMF23) {
stringBuffer.append(TEXT_22);
+ }
stringBuffer.append(TEXT_23);
+ stringBuffer.append(TEXT_24);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/model/ManifestMF.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/model/ManifestMF.java
index 20b844f..7215e1c 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/model/ManifestMF.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/model/ManifestMF.java
@@ -27,20 +27,21 @@
protected final String TEXT_10 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-1.6";
protected final String TEXT_11 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-1.7";
protected final String TEXT_12 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-1.8";
- protected final String TEXT_13 = NL + "Export-Package: ";
- protected final String TEXT_14 = ",";
- protected final String TEXT_15 = NL + " ";
- protected final String TEXT_16 = NL + "Require-Bundle: ";
- protected final String TEXT_17 = ";resolution:=optional;x-installation:=greedy";
- protected final String TEXT_18 = ";visibility:=reexport";
- protected final String TEXT_19 = ",";
- protected final String TEXT_20 = NL + " ";
- protected final String TEXT_21 = ";resolution:=optional;x-installation:=greedy";
- protected final String TEXT_22 = ";visibility:=reexport";
- protected final String TEXT_23 = NL + "Import-Package: org.osgi.framework";
- protected final String TEXT_24 = NL + "Eclipse-LazyStart: true";
- protected final String TEXT_25 = NL + "Bundle-ActivationPolicy: lazy";
- protected final String TEXT_26 = NL;
+ protected final String TEXT_13 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-9";
+ protected final String TEXT_14 = NL + "Export-Package: ";
+ protected final String TEXT_15 = ",";
+ protected final String TEXT_16 = NL + " ";
+ protected final String TEXT_17 = NL + "Require-Bundle: ";
+ protected final String TEXT_18 = ";resolution:=optional;x-installation:=greedy";
+ protected final String TEXT_19 = ";visibility:=reexport";
+ protected final String TEXT_20 = ",";
+ protected final String TEXT_21 = NL + " ";
+ protected final String TEXT_22 = ";resolution:=optional;x-installation:=greedy";
+ protected final String TEXT_23 = ";visibility:=reexport";
+ protected final String TEXT_24 = NL + "Import-Package: org.osgi.framework";
+ protected final String TEXT_25 = NL + "Eclipse-LazyStart: true";
+ protected final String TEXT_26 = NL + "Bundle-ActivationPolicy: lazy";
+ protected final String TEXT_27 = NL;
public String generate(Object argument)
{
@@ -84,41 +85,43 @@
stringBuffer.append(TEXT_11);
} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK80_LITERAL) {
stringBuffer.append(TEXT_12);
+ } else if (genModel.getComplianceLevel() == GenJDKLevel.JDK90_LITERAL) {
+ stringBuffer.append(TEXT_13);
}
Iterator<String> packagesIterator = genModel.getModelQualifiedPackageNames().iterator(); if (packagesIterator.hasNext()) { String pack = packagesIterator.next();
- stringBuffer.append(TEXT_13);
+ stringBuffer.append(TEXT_14);
stringBuffer.append(pack);
while(packagesIterator.hasNext()) { pack = packagesIterator.next();
- stringBuffer.append(TEXT_14);
stringBuffer.append(TEXT_15);
+ stringBuffer.append(TEXT_16);
stringBuffer.append(pack);
}
}
Iterator<String> requiredPluginIterator = genModel.getModelRequiredPlugins().iterator(); if (requiredPluginIterator.hasNext()) { String pluginID = requiredPluginIterator.next();
- stringBuffer.append(TEXT_16);
- stringBuffer.append(pluginID);
- if (pluginID.startsWith("org.eclipse.core.runtime")) {if (genModel.isOSGiCompatible()) {
stringBuffer.append(TEXT_17);
- }} else {
- stringBuffer.append(TEXT_18);
- } while(requiredPluginIterator.hasNext()) { pluginID = requiredPluginIterator.next();
- stringBuffer.append(TEXT_19);
- stringBuffer.append(TEXT_20);
stringBuffer.append(pluginID);
if (pluginID.startsWith("org.eclipse.core.runtime")) {if (genModel.isOSGiCompatible()) {
+ stringBuffer.append(TEXT_18);
+ }} else {
+ stringBuffer.append(TEXT_19);
+ } while(requiredPluginIterator.hasNext()) { pluginID = requiredPluginIterator.next();
+ stringBuffer.append(TEXT_20);
stringBuffer.append(TEXT_21);
- }} else if (!pluginID.equals("org.eclipse.xtext.xbase.lib") && !pluginID.equals("org.eclipse.emf.ecore.xcore.lib")) {
+ stringBuffer.append(pluginID);
+ if (pluginID.startsWith("org.eclipse.core.runtime")) {if (genModel.isOSGiCompatible()) {
stringBuffer.append(TEXT_22);
+ }} else if (!pluginID.equals("org.eclipse.xtext.xbase.lib") && !pluginID.equals("org.eclipse.emf.ecore.xcore.lib")) {
+ stringBuffer.append(TEXT_23);
}}
}
if (genModel.isOSGiCompatible() && genModel.hasModelPluginClass()) {
- stringBuffer.append(TEXT_23);
- }
- if (genModel.getRuntimeVersion() == GenRuntimeVersion.EMF22 || genModel.getRuntimeVersion() == GenRuntimeVersion.EMF23) {
stringBuffer.append(TEXT_24);
}
+ if (genModel.getRuntimeVersion() == GenRuntimeVersion.EMF22 || genModel.getRuntimeVersion() == GenRuntimeVersion.EMF23) {
stringBuffer.append(TEXT_25);
+ }
stringBuffer.append(TEXT_26);
+ stringBuffer.append(TEXT_27);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/model/tests/ManifestMF.java b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/model/tests/ManifestMF.java
index 3a55d20..763d96b 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/model/tests/ManifestMF.java
+++ b/plugins/org.eclipse.emf.codegen.ecore/src/org/eclipse/emf/codegen/ecore/templates/model/tests/ManifestMF.java
@@ -24,17 +24,18 @@
protected final String TEXT_7 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-1.6";
protected final String TEXT_8 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-1.7";
protected final String TEXT_9 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-1.8";
- protected final String TEXT_10 = NL + "Export-Package: ";
- protected final String TEXT_11 = ",";
- protected final String TEXT_12 = NL + " ";
- protected final String TEXT_13 = NL + "Require-Bundle: ";
- protected final String TEXT_14 = ";visibility:=reexport";
- protected final String TEXT_15 = ",";
- protected final String TEXT_16 = NL + " ";
- protected final String TEXT_17 = ";visibility:=reexport";
- protected final String TEXT_18 = NL + "Eclipse-LazyStart: true";
- protected final String TEXT_19 = NL + "Bundle-ActivationPolicy: lazy";
- protected final String TEXT_20 = NL;
+ protected final String TEXT_10 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-9";
+ protected final String TEXT_11 = NL + "Export-Package: ";
+ protected final String TEXT_12 = ",";
+ protected final String TEXT_13 = NL + " ";
+ protected final String TEXT_14 = NL + "Require-Bundle: ";
+ protected final String TEXT_15 = ";visibility:=reexport";
+ protected final String TEXT_16 = ",";
+ protected final String TEXT_17 = NL + " ";
+ protected final String TEXT_18 = ";visibility:=reexport";
+ protected final String TEXT_19 = NL + "Eclipse-LazyStart: true";
+ protected final String TEXT_20 = NL + "Bundle-ActivationPolicy: lazy";
+ protected final String TEXT_21 = NL;
public String generate(Object argument)
{
@@ -70,34 +71,36 @@
stringBuffer.append(TEXT_8);
} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK80_LITERAL) {
stringBuffer.append(TEXT_9);
+ } else if (genModel.getComplianceLevel() == GenJDKLevel.JDK90_LITERAL) {
+ stringBuffer.append(TEXT_10);
}
Iterator<String> packagesIterator = genModel.getTestsQualifiedPackageNames().iterator(); if (packagesIterator.hasNext()) { String pack = packagesIterator.next();
- stringBuffer.append(TEXT_10);
+ stringBuffer.append(TEXT_11);
stringBuffer.append(pack);
while(packagesIterator.hasNext()) { pack = packagesIterator.next();
- stringBuffer.append(TEXT_11);
stringBuffer.append(TEXT_12);
+ stringBuffer.append(TEXT_13);
stringBuffer.append(pack);
}
}
Iterator<String> requiredPluginIterator = genModel.getTestsRequiredPlugins().iterator(); if (requiredPluginIterator.hasNext()) { String pluginID = requiredPluginIterator.next();
- stringBuffer.append(TEXT_13);
+ stringBuffer.append(TEXT_14);
stringBuffer.append(pluginID);
if (!pluginID.startsWith("org.eclipse.core.runtime")){
- stringBuffer.append(TEXT_14);
- } while(requiredPluginIterator.hasNext()) { pluginID = requiredPluginIterator.next();
stringBuffer.append(TEXT_15);
+ } while(requiredPluginIterator.hasNext()) { pluginID = requiredPluginIterator.next();
stringBuffer.append(TEXT_16);
+ stringBuffer.append(TEXT_17);
stringBuffer.append(pluginID);
if (!pluginID.startsWith("org.eclipse.core.runtime") && !pluginID.equals("org.eclipse.xtext.xbase.lib") && !pluginID.equals("org.eclipse.emf.ecore.xcore.lib")) {
- stringBuffer.append(TEXT_17);
+ stringBuffer.append(TEXT_18);
}}
}
if (genModel.getRuntimeVersion() == GenRuntimeVersion.EMF22 || genModel.getRuntimeVersion() == GenRuntimeVersion.EMF23) {
- stringBuffer.append(TEXT_18);
- }
stringBuffer.append(TEXT_19);
+ }
stringBuffer.append(TEXT_20);
+ stringBuffer.append(TEXT_21);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.emf.codegen.ecore/templates/edit/manifest.mfjet b/plugins/org.eclipse.emf.codegen.ecore/templates/edit/manifest.mfjet
index 551af1c..1c916f5 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/templates/edit/manifest.mfjet
+++ b/plugins/org.eclipse.emf.codegen.ecore/templates/edit/manifest.mfjet
@@ -31,6 +31,8 @@
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK80_LITERAL) {%>
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK90_LITERAL) {%>
+Bundle-RequiredExecutionEnvironment: JavaSE-9
<%}%>
<%Iterator<String> packagesIterator = genModel.getEditQualifiedPackageNames().iterator(); if (packagesIterator.hasNext()) { String pack = packagesIterator.next();%>
Export-Package: <%=pack%><%while(packagesIterator.hasNext()) { pack = packagesIterator.next();%>,
diff --git a/plugins/org.eclipse.emf.codegen.ecore/templates/editor/Editor.javajet b/plugins/org.eclipse.emf.codegen.ecore/templates/editor/Editor.javajet
index 605abee..8cb1995 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/templates/editor/Editor.javajet
+++ b/plugins/org.eclipse.emf.codegen.ecore/templates/editor/Editor.javajet
@@ -1779,26 +1779,42 @@
* <!-- end-user-doc -->
* @generated
*/
-<%if (genModel.useGenerics()) {%>
+<%if (genModel.useGenerics() && genModel.getEclipsePlatformVersion().getValue() < GenEclipsePlatformVersion.MARS_VALUE) {%>
@SuppressWarnings("<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE) {%>rawtypes<%} else {%>unchecked<%}%>")
<%}%>
<%if (genModel.useClassOverrideAnnotation()) {%>
@Override
<%}%>
+<%if (genModel.getEclipsePlatformVersion().getValue() >= GenEclipsePlatformVersion.MARS_VALUE) {%>
+ public <T> T getAdapter(Class<T> key)
+<%} else {%>
public Object getAdapter(Class key)
+<%}%>
{
if (key.equals(IContentOutlinePage.class))
{
+<%if (genModel.getEclipsePlatformVersion().getValue() >= GenEclipsePlatformVersion.MARS_VALUE) {%>
+ return showOutlineView() ? key.cast(getContentOutlinePage()) : null;
+<%} else {%>
return showOutlineView() ? getContentOutlinePage() : null;
+<%}%>
}
else if (key.equals(IPropertySheetPage.class))
{
+<%if (genModel.getEclipsePlatformVersion().getValue() >= GenEclipsePlatformVersion.MARS_VALUE) {%>
+ return key.cast(getPropertySheetPage());
+<%} else {%>
return getPropertySheetPage();
+<%}%>
}
<%if (!genModel.isRichClientPlatform()) {%>
else if (key.equals(IGotoMarker.class))
{
+<%if (genModel.getEclipsePlatformVersion().getValue() >= GenEclipsePlatformVersion.MARS_VALUE) {%>
+ return key.cast(this);
+<%} else {%>
return this;
+<%}%>
}
<%}%>
else
diff --git a/plugins/org.eclipse.emf.codegen.ecore/templates/editor/manifest.mfjet b/plugins/org.eclipse.emf.codegen.ecore/templates/editor/manifest.mfjet
index c3b5ea8..293c74e 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/templates/editor/manifest.mfjet
+++ b/plugins/org.eclipse.emf.codegen.ecore/templates/editor/manifest.mfjet
@@ -31,6 +31,8 @@
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK80_LITERAL) {%>
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK90_LITERAL) {%>
+Bundle-RequiredExecutionEnvironment: JavaSE-9
<%}%>
<%Iterator<String> packagesIterator = genModel.getEditorQualifiedPackageNames().iterator(); if (packagesIterator.hasNext()) { String pack = packagesIterator.next();%>
Export-Package: <%=pack%><%while(packagesIterator.hasNext()) { pack = packagesIterator.next();%>,
diff --git a/plugins/org.eclipse.emf.codegen.ecore/templates/model.tests/manifest.mfjet b/plugins/org.eclipse.emf.codegen.ecore/templates/model.tests/manifest.mfjet
index 72105e3..fbfc189 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/templates/model.tests/manifest.mfjet
+++ b/plugins/org.eclipse.emf.codegen.ecore/templates/model.tests/manifest.mfjet
@@ -28,6 +28,8 @@
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK80_LITERAL) {%>
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK90_LITERAL) {%>
+Bundle-RequiredExecutionEnvironment: JavaSE-9
<%}%>
<%Iterator<String> packagesIterator = genModel.getTestsQualifiedPackageNames().iterator(); if (packagesIterator.hasNext()) { String pack = packagesIterator.next();%>
Export-Package: <%=pack%><%while(packagesIterator.hasNext()) { pack = packagesIterator.next();%>,
diff --git a/plugins/org.eclipse.emf.codegen.ecore/templates/model/manifest.mfjet b/plugins/org.eclipse.emf.codegen.ecore/templates/model/manifest.mfjet
index 20ce30f..8ad0b5b 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/templates/model/manifest.mfjet
+++ b/plugins/org.eclipse.emf.codegen.ecore/templates/model/manifest.mfjet
@@ -31,6 +31,8 @@
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK80_LITERAL) {%>
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK90_LITERAL) {%>
+Bundle-RequiredExecutionEnvironment: JavaSE-9
<%}%>
<%Iterator<String> packagesIterator = genModel.getModelQualifiedPackageNames().iterator(); if (packagesIterator.hasNext()) { String pack = packagesIterator.next();%>
Export-Package: <%=pack%><%while(packagesIterator.hasNext()) { pack = packagesIterator.next();%>,