Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Gabel2016-07-07 07:17:09 +0000
committervincent lorenzo2016-07-07 15:28:49 +0000
commit367ab9a3ccaee8df6caba293875d27197d836b34 (patch)
treef2b0ba3c3668c77617e12a2d49a6ee1c4dc5f7bf /plugins/infra/nattable
parente3d745ff1daeff18af0c10c14e9f7f241fc5ef1a (diff)
downloadorg.eclipse.papyrus-367ab9a3ccaee8df6caba293875d27197d836b34.tar.gz
org.eclipse.papyrus-367ab9a3ccaee8df6caba293875d27197d836b34.tar.xz
org.eclipse.papyrus-367ab9a3ccaee8df6caba293875d27197d836b34.zip
Bug 497452: [Table] Spurious NPEs when dropping an illegal reference
Change-Id: I5054389071d146e65674a8cbc7e3341003151549 Signed-off-by: Sebastien Gabel <sebastien.gabel@esterel-technologies.com>
Diffstat (limited to 'plugins/infra/nattable')
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java
index 846a78d9cbb..10d6833a2c3 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2016 CEA LIST, Esterel Technologies SAS and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -10,6 +10,7 @@
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
* Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 476618
+ * Alain Le Guennec (Esterel Technologies SAS) - Bug 497452
*
*****************************************************************************/
package org.eclipse.papyrus.infra.emf.nattable.manager.cell;
@@ -193,7 +194,7 @@ public class EMFFeatureValueCellManager extends AbstractCellManager {
final AbstractEditCommandRequest request = new SetRequest(domain, elementToEdit, featureToEdit, newValue);
final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(elementToEdit);
final ICommand cmd = provider.getEditCommand(request);
- ICommand returnedCommand = cmd;
+ ICommand returnedCommand = (cmd != null) ? cmd : org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;;
if (cmd.canExecute() && featureToEdit instanceof EReference) {
boolean shouldOpenDialog = false;
final EReference editedReference = (EReference) featureToEdit;

Back to the top