Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2018-11-29 10:39:54 -0500
committervincent lorenzo2018-11-30 06:51:28 -0500
commitf9fd13e8521b75baaa85774ba5b888d542e7f8cd (patch)
treefdd907cb28ac28718147af241d5e162b1ab81277
parent589f1c8c5d31f9fafa95be905440025638218bb4 (diff)
downloadorg.eclipse.papyrus-f9fd13e8521b75baaa85774ba5b888d542e7f8cd.tar.gz
org.eclipse.papyrus-f9fd13e8521b75baaa85774ba5b888d542e7f8cd.tar.xz
org.eclipse.papyrus-f9fd13e8521b75baaa85774ba5b888d542e7f8cd.zip
Bug 533667: the name
/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors do not respect the layer - Manage the old DirectEditor extension point in the new plugin - Manage the new plugin with java 1.8 Change-Id: Id84de1e7a3b41442a443e2807cafa9df6717481c Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@cea.fr>
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/.classpath2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/META-INF/MANIFEST.MF2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/src/org/eclipse/papyrus/infra/gmfdiag/extensionpoints/editors/definition/DirectEditorExtensionPoint.java35
4 files changed, 35 insertions, 10 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/.classpath b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/.classpath
index 64c5e31b7a2..eca7bdba8f0 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/.classpath
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/.settings/org.eclipse.jdt.core.prefs
index 15d5f917b9c..74c6d08d7e4 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/.settings/org.eclipse.jdt.core.prefs
@@ -1,16 +1,16 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/META-INF/MANIFEST.MF
index ca15a0af856..cebe85c809a 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/META-INF/MANIFEST.MF
@@ -18,5 +18,5 @@ Bundle-Localization: plugin
Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.Activator
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Automatic-Module-Name: org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/src/org/eclipse/papyrus/infra/gmfdiag/extensionpoints/editors/definition/DirectEditorExtensionPoint.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/src/org/eclipse/papyrus/infra/gmfdiag/extensionpoints/editors/definition/DirectEditorExtensionPoint.java
index ae993c67d20..d797e99e672 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/src/org/eclipse/papyrus/infra/gmfdiag/extensionpoints/editors/definition/DirectEditorExtensionPoint.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors/src/org/eclipse/papyrus/infra/gmfdiag/extensionpoints/editors/definition/DirectEditorExtensionPoint.java
@@ -11,11 +11,12 @@
* CEA LIST - initial API and implementation
* Fanch BONNABESSE (ALL4TEC) fanch.bonnabesse@all4tec.net - Bug 497289
* Ansgar Radermacher (CEA LIST) ansgar.radermacher@cea.fr - Bug 528199
- *
+ *
*******************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.definition;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.List;
@@ -25,6 +26,7 @@ import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.constraints.constraints.JavaQuery;
import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.Activator;
import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.DefaultDirectEditorConfiguration;
import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
@@ -32,7 +34,6 @@ import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.I
import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.configuration.IDirectEditorConstraint;
import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.constraints.constraints.JavaQuery;
import org.eclipse.swt.graphics.Image;
/**
@@ -40,6 +41,15 @@ import org.eclipse.swt.graphics.Image;
*/
public class DirectEditorExtensionPoint implements IDirectEditorExtensionPoint {
+ /**
+ * Id of the deprecated direct editor configuration extension point.
+ * TODO : This field will be removed in Papyrus 5.0. See bug 541707.
+ *
+ * @deprecated since 1.0.
+ */
+ @Deprecated
+ private static final String OLD_DIRECT_EDITOR_CONFIGURATION_EXTENSION_ID = "org.eclipse.papyrus.extensionpoints.editors.DirectEditor"; //$NON-NLS-1$
+
private static volatile DirectEditorExtensionPoint instance = null;
/** Array that stores registered transformations */
@@ -75,10 +85,15 @@ public class DirectEditorExtensionPoint implements IDirectEditorExtensionPoint {
protected void init() {
// It was not already computed,
// returns the new Collection of DirectEditorExtensionPoint
- List<DirectEditorExtensionPoint> directEditorExtensionPoints = new ArrayList<DirectEditorExtensionPoint>();
+ List<DirectEditorExtensionPoint> directEditorExtensionPoints = new ArrayList<>();
// Reading data from plug-ins
- IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor(IDirectEditorConfigurationIds.DIRECT_EDITOR_CONFIGURATION_EXTENSION_ID);
+ Collection<IConfigurationElement> configElements = new ArrayList<>();
+ configElements.addAll(Arrays.asList(Platform.getExtensionRegistry().getConfigurationElementsFor(IDirectEditorConfigurationIds.DIRECT_EDITOR_CONFIGURATION_EXTENSION_ID)));
+
+ // TODO : This line will be removed in Papyrus 5.0. See bug 541707
+ // This manage the old extension point
+ configElements.addAll(Arrays.asList(Platform.getExtensionRegistry().getConfigurationElementsFor(OLD_DIRECT_EDITOR_CONFIGURATION_EXTENSION_ID)));
// Read configuration elements for the current extension
for (IConfigurationElement configElement : configElements) {
@@ -150,7 +165,7 @@ public class DirectEditorExtensionPoint implements IDirectEditorExtensionPoint {
public Collection<DirectEditorExtensionPoint> getDirectEditorConfigurations(EObject semanticObjectToEdit, Object selectedObject) {
Collection<IDirectEditorExtensionPoint> directEditorConfigurations = DirectEditorsUtil.getDirectEditorExtensions(semanticObjectToEdit, selectedObject);
- List<DirectEditorExtensionPoint> returnList = new ArrayList<DirectEditorExtensionPoint>();
+ List<DirectEditorExtensionPoint> returnList = new ArrayList<>();
for (IDirectEditorExtensionPoint extension : directEditorConfigurations) {
if (extension instanceof DirectEditorExtensionPoint) {
returnList.add((DirectEditorExtensionPoint) extension);
@@ -418,6 +433,7 @@ public class DirectEditorExtensionPoint implements IDirectEditorExtensionPoint {
*
* @return
*/
+ @Override
public String getLanguage() {
return language;
}
@@ -428,6 +444,7 @@ public class DirectEditorExtensionPoint implements IDirectEditorExtensionPoint {
*
* @return
*/
+ @Override
public String getObjectToEdit() {
return objectClassToEdit.getCanonicalName();
}
@@ -437,6 +454,7 @@ public class DirectEditorExtensionPoint implements IDirectEditorExtensionPoint {
*
* @return
*/
+ @Override
public Class<? extends EObject> getObjectClassToEdit() {
return objectClassToEdit;
}
@@ -447,6 +465,7 @@ public class DirectEditorExtensionPoint implements IDirectEditorExtensionPoint {
*
* @return
*/
+ @Override
public IDirectEditorConfiguration getDirectEditorConfiguration() {
return directEditorConfiguration;
}
@@ -457,6 +476,7 @@ public class DirectEditorExtensionPoint implements IDirectEditorExtensionPoint {
*
* @param directEditorConfiguration
*/
+ @Override
public void setDirectEditorConfiguration(IDirectEditorConfiguration directEditorConfiguration) {
this.directEditorConfiguration = directEditorConfiguration;
}
@@ -467,6 +487,7 @@ public class DirectEditorExtensionPoint implements IDirectEditorExtensionPoint {
*
* @return
*/
+ @Override
public Integer getPriority() {
int preferencePriority = getPreferencePriority();
return preferencePriority != -1 ? preferencePriority : extensionPriority;
@@ -493,6 +514,7 @@ public class DirectEditorExtensionPoint implements IDirectEditorExtensionPoint {
*
* @param priority
*/
+ @Override
public void setPriority(Integer priority) {
this.extensionPriority = priority;
}
@@ -502,6 +524,7 @@ public class DirectEditorExtensionPoint implements IDirectEditorExtensionPoint {
*
* @return the additional constraint
*/
+ @Override
public IDirectEditorConstraint getAdditionalConstraint() {
return constraint;
}
@@ -511,6 +534,7 @@ public class DirectEditorExtensionPoint implements IDirectEditorExtensionPoint {
*
* @return
*/
+ @Override
public Image getIcon() {
return null;
}
@@ -520,6 +544,7 @@ public class DirectEditorExtensionPoint implements IDirectEditorExtensionPoint {
*
* @return
*/
+ @Override
public boolean isSuperType() {
return superType;
}

Back to the top