0

This question is about how I could add a multi-selection ComboBoxCellEditor, or a multiple BooleanCellEditor to a cell in a TableViewer. The main aim is to have a multi selection in a cell.

I am using the snippets at http://wiki.eclipse.org/index.php/JFaceSnippets and http://www.eclipse.org/swt/snippets/, and I now have a fairly good Table using TableView with all editing supports, label providers, content providers. Inside the cells I now have a TextCellEditor or a ComboBoxCellEditor.

The thing is: I want a multiple selection, and I don't know how.

  1. The code of org.eclipse.nebula.widgets.nattable.edit.editor.ComboBoxCellEditor seems to have multipleselection, but I am having always a java.lang.NoClassDefFoundError while trying to use the external Nebula classes

  2. The JFace snippet Snippet061FakedNativeCellEditor provides me with only one checkbox, and adapting this code to my code is difficult.

Many thanks.

flavio.donze
  • 7,432
  • 9
  • 58
  • 91
J A
  • 1
  • 3

1 Answers1

0
  1. You're not adding those nebula JARs/Projects to your buildpath/runtime.

  2. You'll have to extend your own CellEditor. Inside it, you can create basically anything you want, as long as it's a Control. I'm pretty sure you can sneak more than one widget in the createControl protected method of CellEditor.

Georgian
  • 8,795
  • 8
  • 46
  • 87
  • Hi GGrec: (1): It surely is a missing class path in runtime, I have to use an inclusion of bundle inside my manifest file, since .classpath is not enough (i'm developing an Eclipse plugin) – J A Nov 15 '13 at 11:33
  • Hi GGrec: (2) Your hint about `createControl` is excellent, but if I want to have an array of Button (for multiple selection effect), how can I return this Button[] as a Control ? – J A Nov 15 '13 at 11:45
  • @JA Keep in mind that a `Composite` is a `Control` too. So basically you may set any composite as control. :-) – Georgian Nov 15 '13 at 16:31