Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2013-02-04 09:58:19 +0000
committervlorenzo2013-02-04 09:58:19 +0000
commita4bb2c6e0ffff2c80928ca04bb4879ad00610667 (patch)
tree46a7f8ef68135716dcb06778a3d559ebf0c68c1e
parent897733959c45b227d9bfe38315752128eb6bee2f (diff)
downloadorg.eclipse.papyrus-a4bb2c6e0ffff2c80928ca04bb4879ad00610667.tar.gz
org.eclipse.papyrus-a4bb2c6e0ffff2c80928ca04bb4879ad00610667.tar.xz
org.eclipse.papyrus-a4bb2c6e0ffff2c80928ca04bb4879ad00610667.zip
399737: [Table Editor] Cell can no more be edited if previous edition was cancelled before validation
https://bugs.eclipse.org/bugs/show_bug.cgi?id=399737
-rw-r--r--plugins/uml/table/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/BooleanCellEditor.java2
-rw-r--r--plugins/uml/table/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/IntCellEditor.java28
-rw-r--r--plugins/uml/table/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/StringMultiCellEditor.java10
3 files changed, 17 insertions, 23 deletions
diff --git a/plugins/uml/table/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/BooleanCellEditor.java b/plugins/uml/table/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/BooleanCellEditor.java
index 3306b5ead52..3731a1921a8 100644
--- a/plugins/uml/table/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/BooleanCellEditor.java
+++ b/plugins/uml/table/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/BooleanCellEditor.java
@@ -44,7 +44,6 @@ public class BooleanCellEditor implements IModelCellEditor {
* {@inheritDoc}
*/
public Control activateCell(final Composite parent, final Object originalValue, final IModelCellEditHandler editHandler, final EStructuralFeature feature, final EObject source) {
- if(this.composite == null) {
ICompositeEditorFactory<Boolean> compositeEditorFactory = ICompositeEditorFactoriesRegistry.INSTANCE.getCompositeEditorFactory(Boolean.class);
this.composite = compositeEditorFactory.createCompositeEditor(parent, SWT.NONE);
if(originalValue != null) {
@@ -60,7 +59,6 @@ public class BooleanCellEditor implements IModelCellEditor {
editHandler.commit();
}
});
- }
return this.composite;
}
diff --git a/plugins/uml/table/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/IntCellEditor.java b/plugins/uml/table/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/IntCellEditor.java
index 519275af887..93579c68e73 100644
--- a/plugins/uml/table/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/IntCellEditor.java
+++ b/plugins/uml/table/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/IntCellEditor.java
@@ -30,23 +30,21 @@ public class IntCellEditor implements IModelCellEditor {
* {@inheritDoc}
*/
public Control activateCell(final Composite parent, final Object originalValue, final IModelCellEditHandler editHandler, final EStructuralFeature feature, final EObject source) {
- if(this.composite == null) {
- ICompositeEditorFactory<Integer> compositeEditorFactory = ICompositeEditorFactoriesRegistry.INSTANCE.getCompositeEditorFactory(Integer.class);
- this.composite = compositeEditorFactory.createCompositeEditor(parent, SWT.NONE);
- if(originalValue != null) {
- if(originalValue instanceof Integer) {
- this.composite.setValue((Integer)originalValue);
- } else {
- Activator.log.info("An instance of Integer was expected"); //$NON-NLS-1$
- }
+ ICompositeEditorFactory<Integer> compositeEditorFactory = ICompositeEditorFactoriesRegistry.INSTANCE.getCompositeEditorFactory(Integer.class);
+ this.composite = compositeEditorFactory.createCompositeEditor(parent, SWT.NONE);
+ if(originalValue != null) {
+ if(originalValue instanceof Integer) {
+ this.composite.setValue((Integer)originalValue);
+ } else {
+ Activator.log.info("An instance of Integer was expected"); //$NON-NLS-1$
}
- this.composite.addCommitListener(new IListener() {
-
- public void handleEvent() {
- editHandler.commit();
- }
- });
}
+ this.composite.addCommitListener(new IListener() {
+
+ public void handleEvent() {
+ editHandler.commit();
+ }
+ });
return this.composite;
}
diff --git a/plugins/uml/table/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/StringMultiCellEditor.java b/plugins/uml/table/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/StringMultiCellEditor.java
index 63624e01ffd..2653a9766d6 100644
--- a/plugins/uml/table/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/StringMultiCellEditor.java
+++ b/plugins/uml/table/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/StringMultiCellEditor.java
@@ -44,7 +44,6 @@ public class StringMultiCellEditor implements IModelCellEditor {
* {@inheritDoc}
*/
public Control activateCell(final Composite parent, final Object originalValue, final IModelCellEditHandler editHandler, final EStructuralFeature feature, final EObject source) {
- if(this.composite == null) {
ICompositeEditorFactory<String> compositeEditorFactory = ICompositeEditorFactoriesRegistry.INSTANCE.getCompositeEditorFactory(String.class);
this.composite = compositeEditorFactory.createCompositeEditor(parent, SWT.NONE);
if(originalValue != null) {
@@ -56,11 +55,10 @@ public class StringMultiCellEditor implements IModelCellEditor {
}
this.composite.addCommitListener(new IListener() {
- public void handleEvent() {
- editHandler.commit();
- }
- });
- }
+ public void handleEvent() {
+ editHandler.commit();
+ }
+ });
return this.composite;
}

Back to the top