From 88d60e0b961d88df6cdb85d27fb21392bc2c85f4 Mon Sep 17 00:00:00 2001 From: Simon Barner <barner@fortiss.org> Date: Mon, 20 Nov 2017 15:46:37 +0000 Subject: [PATCH] Make CheckBoxEditingSupport applicable for TreeViewers. TODO: Rename package (see #3176) refs 3176 --- .../base/ui/tablecell/CheckBoxEditingSupport.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/tablecell/CheckBoxEditingSupport.java b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/tablecell/CheckBoxEditingSupport.java index fc3ce7147..ae740ce78 100644 --- a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/tablecell/CheckBoxEditingSupport.java +++ b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/tablecell/CheckBoxEditingSupport.java @@ -21,7 +21,6 @@ import org.eclipse.jface.viewers.CellEditor; import org.eclipse.jface.viewers.CheckboxCellEditor; import org.eclipse.jface.viewers.ColumnViewer; import org.eclipse.jface.viewers.EditingSupport; -import org.eclipse.jface.viewers.TableViewer; /** * {@link EditingSupport} for checkbox cells. @@ -29,19 +28,17 @@ import org.eclipse.jface.viewers.TableViewer; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating GREEN Hash: 0E48EDEDD7575A54341D6BE6926F0792 + * @ConQAT.Rating YELLOW Hash: 2EC9E3CC10AF755346867DAECA167352 */ public abstract class CheckBoxEditingSupport extends EditingSupport { - /** - * Stores the shared cell editor. - */ + /** Stores the shared cell editor. */ private CellEditor cellEditor; /** Constructor */ public CheckBoxEditingSupport(ColumnViewer viewer) { super(viewer); - cellEditor = new CheckboxCellEditor(((TableViewer)viewer).getTable()); + cellEditor = new CheckboxCellEditor(viewer.getControl().getParent()); } /** {@inheritDoc} */ -- GitLab