diff options
author | Sebastien Gabel | 2016-07-07 07:17:09 +0000 |
---|---|---|
committer | vincent lorenzo | 2016-07-07 15:28:49 +0000 |
commit | 367ab9a3ccaee8df6caba293875d27197d836b34 (patch) | |
tree | f2b0ba3c3668c77617e12a2d49a6ee1c4dc5f7bf /plugins/infra/nattable | |
parent | e3d745ff1daeff18af0c10c14e9f7f241fc5ef1a (diff) | |
download | org.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.java | 5 |
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; |