Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2017-08-18 17:15:42 +0000
committerAnsgar Radermacher2017-08-18 17:15:42 +0000
commit51664ecfa6d4ab67269b2a4aff4dbd354507a782 (patch)
tree9c0f3a02472bffad22562eb551921fca2033759a
parent98e4fd8ff4e996597171ed488b441558498740cd (diff)
downloadorg.eclipse.papyrus-51664ecfa6d4ab67269b2a4aff4dbd354507a782.tar.gz
org.eclipse.papyrus-51664ecfa6d4ab67269b2a4aff4dbd354507a782.tar.xz
org.eclipse.papyrus-51664ecfa6d4ab67269b2a4aff4dbd354507a782.zip
Bug 519107 - [All diagrams] model opening is slow, if multiple diagrams are open
- Avoid NPE on dispose (if diagram has not been initialized yet) - Add bug-related entry in header Signed-off-by: Ansgar Radermacher <ansgar.radermacher@cea.fr>
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/UmlGmfDiagramEditor.java27
1 files changed, 25 insertions, 2 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/UmlGmfDiagramEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/UmlGmfDiagramEditor.java
index 3e5f77c9a24..f8f8b7815de 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/UmlGmfDiagramEditor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/UmlGmfDiagramEditor.java
@@ -1,6 +1,17 @@
-/**
+/*****************************************************************************
+ * Copyright (c) 2016, 2017 CEA LIST.
*
- */
+ * 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:
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ * Ansgar Radermacher (CEA) ansgar.radermacher@cea.fr - Bug 519107 (lazy diagram opening)
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.part;
import org.eclipse.core.commands.operations.IUndoContext;
@@ -122,6 +133,18 @@ public class UmlGmfDiagramEditor extends SynchronizableGmfDiagramEditor {
}
/**
+ * Avoid NPE, if viewer has not been initialized yet (method is called on dispose)
+ *
+ * @see org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor#persistViewerSettings()
+ */
+ @Override
+ public void persistViewerSettings() {
+ if (getDiagramEditPart() != null) {
+ super.persistViewerSettings();
+ }
+ }
+
+ /**
* Dispose services used in this part.
*
* @see org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor#dispose()

Back to the top