Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorenzo Bettini2015-11-06 18:31:01 +0000
committerLorenzo Bettini2015-11-06 18:31:01 +0000
commitd91d5ba8b26871b0098dc77383f53e3a3d67da3a (patch)
tree25817dc61a59b220c7884714971c0cd0af213088
parenta21791cb2fd3a0ab1427c6f75a4dd32a9c227037 (diff)
downloadorg.eclipse.emf-parsley-d91d5ba8b26871b0098dc77383f53e3a3d67da3a.tar.gz
org.eclipse.emf-parsley-d91d5ba8b26871b0098dc77383f53e3a3d67da3a.tar.xz
org.eclipse.emf-parsley-d91d5ba8b26871b0098dc77383f53e3a3d67da3a.zip
reduced size of anonymous content adapter
-rw-r--r--plugins/org.eclipse.emf.parsley.editors.common/src/org/eclipse/emf/parsley/editors/EmfAbstractEditor.java15
-rw-r--r--plugins/org.eclipse.emf.parsley.editors.common/src/org/eclipse/emf/parsley/internal/editors/util/ProblemIndicationEContentAdapter.java33
2 files changed, 36 insertions, 12 deletions
diff --git a/plugins/org.eclipse.emf.parsley.editors.common/src/org/eclipse/emf/parsley/editors/EmfAbstractEditor.java b/plugins/org.eclipse.emf.parsley.editors.common/src/org/eclipse/emf/parsley/editors/EmfAbstractEditor.java
index ff26ab5b5..4d22d3f54 100644
--- a/plugins/org.eclipse.emf.parsley.editors.common/src/org/eclipse/emf/parsley/editors/EmfAbstractEditor.java
+++ b/plugins/org.eclipse.emf.parsley.editors.common/src/org/eclipse/emf/parsley/editors/EmfAbstractEditor.java
@@ -66,6 +66,7 @@ import org.eclipse.emf.parsley.edit.ui.dnd.ViewerDragAndDropHelper;
import org.eclipse.emf.parsley.editors.listeners.ResourceDeltaVisitor;
import org.eclipse.emf.parsley.handlers.OutlineSelectionHandler;
import org.eclipse.emf.parsley.internal.editors.listeners.PartListenerAdapter;
+import org.eclipse.emf.parsley.internal.editors.util.ProblemIndicationEContentAdapter;
import org.eclipse.emf.parsley.listeners.AsyncCommandStackListenerClient;
import org.eclipse.emf.parsley.listeners.AsyncCommandStackListenerHelper;
import org.eclipse.emf.parsley.listeners.IEditorMouseListener;
@@ -258,9 +259,9 @@ public abstract class EmfAbstractEditor extends MultiPageEditorPart implements
* Adapter used to update the problem indication when resources are demanded
* loaded. <!-- begin-user-doc --> <!-- end-user-doc -->
*
- * @generated
+ * @generated NOT
*/
- protected EContentAdapter problemIndicationAdapter = new EContentAdapter() {
+ protected EContentAdapter problemIndicationAdapter = new ProblemIndicationEContentAdapter() {
@Override
public void notifyChanged(Notification notification) {
if (notification.getNotifier() instanceof Resource) {
@@ -276,16 +277,6 @@ public abstract class EmfAbstractEditor extends MultiPageEditorPart implements
super.notifyChanged(notification);
}
}
-
- @Override
- protected void setTarget(Resource target) {
- basicSetTarget(target);
- }
-
- @Override
- protected void unsetTarget(Resource target) {
- basicUnsetTarget(target);
- }
};
/**
diff --git a/plugins/org.eclipse.emf.parsley.editors.common/src/org/eclipse/emf/parsley/internal/editors/util/ProblemIndicationEContentAdapter.java b/plugins/org.eclipse.emf.parsley.editors.common/src/org/eclipse/emf/parsley/internal/editors/util/ProblemIndicationEContentAdapter.java
new file mode 100644
index 000000000..b83a0849b
--- /dev/null
+++ b/plugins/org.eclipse.emf.parsley.editors.common/src/org/eclipse/emf/parsley/internal/editors/util/ProblemIndicationEContentAdapter.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2015 RCP Vision (http://www.rcp-vision.com) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Lorenzo Bettini - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.parsley.internal.editors.util;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+
+/**
+ * Redefines a few methods.
+ *
+ * @author Lorenzo Bettini - initial API and implementation
+ *
+ */
+public class ProblemIndicationEContentAdapter extends EContentAdapter {
+
+ @Override
+ protected void setTarget(Resource target) {
+ basicSetTarget(target);
+ }
+
+ @Override
+ protected void unsetTarget(Resource target) {
+ basicUnsetTarget(target);
+ }
+}

Back to the top