Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2013-02-05 12:22:51 +0000
committercletavernie2013-02-05 12:22:51 +0000
commit5ebcfe36a2093a9c9322d47225d6f5e0212305b1 (patch)
treefbcd8a5eb30cf24ef8fb7c95715513f62576d03a
parent2cfc736105162ec4136dd8d7996255376b7f6d07 (diff)
downloadorg.eclipse.papyrus-5ebcfe36a2093a9c9322d47225d6f5e0212305b1.tar.gz
org.eclipse.papyrus-5ebcfe36a2093a9c9322d47225d6f5e0212305b1.tar.xz
org.eclipse.papyrus-5ebcfe36a2093a9c9322d47225d6f5e0212305b1.zip
399382: UMLEditor subclass not compatible with UML2 Kepler M5
https://bugs.eclipse.org/bugs/show_bug.cgi?id=399382 Merged uml.diagram.emftree from the cdo_kepler branch (r9978 -> r9979)
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/META-INF/MANIFEST.MF2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/src/org/eclipse/papyrus/uml/diagram/emftree/UMLEditor.java20
2 files changed, 18 insertions, 4 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/META-INF/MANIFEST.MF
index b8a4d23b3f2..4e1df9a5e9e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="0.10.0",
- org.eclipse.uml2.uml.editor;bundle-version="3.0.0",
+ org.eclipse.uml2.uml.editor;bundle-version="4.1.0",
org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.emf.transaction;bundle-version="1.4.0",
org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/src/org/eclipse/papyrus/uml/diagram/emftree/UMLEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/src/org/eclipse/papyrus/uml/diagram/emftree/UMLEditor.java
index e78ca24bcbe..2731052198d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/src/org/eclipse/papyrus/uml/diagram/emftree/UMLEditor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/src/org/eclipse/papyrus/uml/diagram/emftree/UMLEditor.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
+ * Copyright (c) 2008, 2013 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,11 +9,13 @@
*
* Contributors:
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - Adapt to EMF codegen changes for bug 331055
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.emftree;
import java.util.EventObject;
+import java.util.Iterator;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.common.command.Command;
@@ -37,6 +39,7 @@ import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.ide.IGotoMarker;
import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.PropertySheetPage;
/**
* This is an example of a EMF UML model editor. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -95,8 +98,19 @@ public class UMLEditor extends org.eclipse.uml2.uml.editor.presentation.UMLEdito
if(mostRecentCommand != null) {
setSelectionToViewer(mostRecentCommand.getAffectedObjects());
}
- if(propertySheetPage != null && !propertySheetPage.getControl().isDisposed()) {
- propertySheetPage.refresh();
+
+ for (Iterator<PropertySheetPage> i = propertySheetPages
+ .iterator(); i.hasNext();) {
+
+ PropertySheetPage propertySheetPage = i.next();
+
+ if ((propertySheetPage.getControl() == null)
+ || propertySheetPage.getControl().isDisposed()) {
+
+ i.remove();
+ } else {
+ propertySheetPage.refresh();
+ }
}
}
});

Back to the top