Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2016-07-06 09:31:14 +0000
committerGerrit Code Review @ Eclipse.org2016-08-04 18:37:36 +0000
commit4e7b6f2aeb5d3138bc0ed7e26e645b354f2f653e (patch)
tree5ce9875ebdb9fc549df5669f04b572f2f9e2388e /plugins/infra
parent1de8a09c355ba2a4ef37f547c9f33692a2e21ebc (diff)
downloadorg.eclipse.papyrus-4e7b6f2aeb5d3138bc0ed7e26e645b354f2f653e.tar.gz
org.eclipse.papyrus-4e7b6f2aeb5d3138bc0ed7e26e645b354f2f653e.tar.xz
org.eclipse.papyrus-4e7b6f2aeb5d3138bc0ed7e26e645b354f2f653e.zip
Bug 497327: [Table] Paste in not possible when no cells, rows or columns
are selected https://bugs.eclipse.org/bugs/show_bug.cgi?id=497327 - The paste action must be enabled when no selection is done. This maybe did not work with table selection modification. N.B: This patch don't correct Bug 497328 - [Table] Popup menu have some disabled items when first click outside of the table. Change-Id: I3c2823fc3e4576fd6de22b4f7aa22d96c5e819f4 Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@all4tec.net>
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PastePropertyTester.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PastePropertyTester.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PastePropertyTester.java
index dd72a13bcdb..803ca04a04f 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PastePropertyTester.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PastePropertyTester.java
@@ -67,11 +67,16 @@ public class PastePropertyTester extends PropertyTester {
// - rows when only rows are selected (and no single cells selected)
// - columns when only columns are selected (and no single cells selected)
result = false;
- if (TypeSelectionEnum.CELL.equals(typeSelection) && TypeSelectionEnum.CELL.equals(typeSelectionFromWrapper)) {
- result = tableSelectionWrapper.getFullySelectedColumns().isEmpty()
- && tableSelectionWrapper.getFullySelectedRows().isEmpty()
- && !tableSelectionWrapper.getSelectedCells().isEmpty()
- && tableSelectionWrapper.isContinuousCells();
+
+ if (TypeSelectionEnum.CELL.equals(typeSelection)) {
+ if(TypeSelectionEnum.NONE.equals(typeSelectionFromWrapper)){
+ result = true;
+ }else if(TypeSelectionEnum.CELL.equals(typeSelectionFromWrapper)){
+ result = tableSelectionWrapper.getFullySelectedColumns().isEmpty()
+ && tableSelectionWrapper.getFullySelectedRows().isEmpty()
+ && !tableSelectionWrapper.getSelectedCells().isEmpty()
+ && tableSelectionWrapper.isContinuousCells();
+ }
} else if (TypeSelectionEnum.ROW.equals(typeSelection) && TypeSelectionEnum.ROW.equals(typeSelectionFromWrapper)) {
result = tableSelectionWrapper.getFullySelectedColumns().isEmpty()
&& !tableSelectionWrapper.getFullySelectedRows().isEmpty()

Back to the top