Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2015-05-27 05:29:04 -0400
committerCamille Letavernier2015-05-27 05:29:04 -0400
commitde50dad6422b3bec79c629c94eb69e34dd432f0b (patch)
tree0f58d9404f01a6e13db041d78d84e830e56943f7
parent2e45db7f9004008b3965bbf33cfcde649aec0f8f (diff)
downloadorg.eclipse.papyrus-de50dad6422b3bec79c629c94eb69e34dd432f0b.tar.gz
org.eclipse.papyrus-de50dad6422b3bec79c629c94eb69e34dd432f0b.tar.xz
org.eclipse.papyrus-de50dad6422b3bec79c629c94eb69e34dd432f0b.zip
468451: [Properties View] NullPointerException in
EMFGraphicalContentProvider.dispose (480) https://bugs.eclipse.org/bugs/show_bug.cgi?id=468451 Change-Id: Ie7bbfa26167d72c6001f5ca34795cbef402d4011 Signed-off-by: Camille Letavernier <camille.letavernier@cea.fr>
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFGraphicalContentProvider.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFGraphicalContentProvider.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFGraphicalContentProvider.java
index dd53f49bad5..aa0761772e3 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFGraphicalContentProvider.java
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFGraphicalContentProvider.java
@@ -128,6 +128,7 @@ public class EMFGraphicalContentProvider extends EncapsulatedContentProvider imp
editor.addCommitListener(new ICommitListener() {
+ @Override
public void commit(AbstractEditor editor) {
String filterPattern = (String) ((StringEditor) editor).getValue();
((PatternViewerFilter) patternFilter).setPattern(filterPattern);
@@ -230,6 +231,7 @@ public class EMFGraphicalContentProvider extends EncapsulatedContentProvider imp
/**
* {@inheritDoc}
*/
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection = (IStructuredSelection) historyViewer.getSelection();
Object selectedObject = selection.getFirstElement();
@@ -429,6 +431,7 @@ public class EMFGraphicalContentProvider extends EncapsulatedContentProvider imp
}
}
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
selectedObject = ((IStructuredSelection) event.getSelection()).getFirstElement();
updateDetailLabel();
@@ -477,6 +480,8 @@ public class EMFGraphicalContentProvider extends EncapsulatedContentProvider imp
@Override
public void dispose() {
super.dispose();
- viewer.removeSelectionChangedListener(this);
+ if (viewer != null) {
+ viewer.removeSelectionChangedListener(this);
+ }
}
}

Back to the top