Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Cell Editing (Table) -- no cell-editor visible?
Cell Editing (Table) -- no cell-editor visible? [message #487884] Thu, 24 September 2009 16:44 Go to next message
Paul E. Keyser is currently offline Paul E. Keyser
Messages: 878
Registered: July 2009
Senior Member
R3.4.1, WinXP

The latest message in this group on cell-editing that I could find is
over a year old ... so maybe I am barking up the wrong tree?

I am trying to create cell-editors in a TableViewer. I started by using
the old pre-3.3 API, which seems no longer to work ... I had something
like Snippet-009 -- the ICellModifier methods canModify() and getValue()
are called, with correct behavior, but the cell-editor never appears ...
(I tried both TextCellEditor and DialogCellEditor). I do have the
column-properties set; I do have SWT.FULL_SELECTION set.

(Is it possible that the problem arises b/c I am using
TableColumnLayout? or b/c the Table is the child of a Composite which is
itself the child of a *Group*?)

Then I tried looking at the snippet that would explain how to use the
new 3.3+ API, i.e., Snippet-034 (which, BTW, has incorrect javadoc at
the top!).

That's easy enough to implement and get to compile, but -- again -- the
cell-editor never appears. The three EditingSupport methods canEdit(),
getValue(), and getCellEditor() are called. I've tried both the
DialogCellEditor and the TextCellEditor, again.

Any ideas?

thanks,
Paul
Re: Cell Editing (Table) -- no cell-editor visible? [message #487895 is a reply to message #487884] Thu, 24 September 2009 18:00 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5403
Registered: July 2009
Senior Member
Hi,

Both version should work pre and post 3.3! Ist the snippet working or not?

Tom


Paul E. Keyser schrieb:
> R3.4.1, WinXP
>
> The latest message in this group on cell-editing that I could find is
> over a year old ... so maybe I am barking up the wrong tree?
>
> I am trying to create cell-editors in a TableViewer. I started by using
> the old pre-3.3 API, which seems no longer to work ... I had something
> like Snippet-009 -- the ICellModifier methods canModify() and getValue()
> are called, with correct behavior, but the cell-editor never appears ...
> (I tried both TextCellEditor and DialogCellEditor). I do have the
> column-properties set; I do have SWT.FULL_SELECTION set.
>
> (Is it possible that the problem arises b/c I am using
> TableColumnLayout? or b/c the Table is the child of a Composite which is
> itself the child of a *Group*?)
>
> Then I tried looking at the snippet that would explain how to use the
> new 3.3+ API, i.e., Snippet-034 (which, BTW, has incorrect javadoc at
> the top!).
>
> That's easy enough to implement and get to compile, but -- again -- the
> cell-editor never appears. The three EditingSupport methods canEdit(),
> getValue(), and getCellEditor() are called. I've tried both the
> DialogCellEditor and the TextCellEditor, again.
>
> Any ideas?
>
> thanks,
> Paul
>
Re: Cell Editing (Table) -- no cell-editor visible? [message #488083 is a reply to message #487895] Fri, 25 September 2009 14:02 Go to previous messageGo to next message
Paul E. Keyser is currently offline Paul E. Keyser
Messages: 878
Registered: July 2009
Senior Member
Tom Schindl wrote:
> Hi,
>
> Both version should work pre and post 3.3! Ist the snippet working or not?
>
> Tom
>
Cell-editing certainly works in Eclipse on my machine (in the
refactoring wizard that edits method-parameters, e.g.), so I would
expect the snippets would run. I will try that at some point, but since
my problem is "why doesn't cell-editing work in my particular context?"
-- I am not sure what I would learn by running the snippets.

BTW -- where is the code for that wizard? Maybe I could copy that code ...

Anyway, further testing has proven that the two guesses I made (that the
problem had to do either with the grand-parent being a Group or with
parent having TableColumnLayout) were both false, since both old and new
cell-editing API's fail with or without those two (the Group, the
TableColumnLayout) being in place.

One oddity that may be a clue: with the old API, every click on the
editable column calls canModify() and getValue(); but with the new API,
only the *first* click on the editable column calls canEdit(),
getValue(), and getCellEditor().

-Paul
Re: Cell Editing (Table) -- no cell-editor visible? [message #488487 is a reply to message #488083] Mon, 28 September 2009 20:59 Go to previous message
Paul E. Keyser is currently offline Paul E. Keyser
Messages: 878
Registered: July 2009
Senior Member
Paul E. Keyser wrote:

>> Hi,
>>
>> Both version should work pre and post 3.3! Ist the snippet working or
>> not?
>>
>> Tom
>>
....
>
> One oddity that may be a clue: with the old API, every click on the
> editable column calls canModify() and getValue(); but with the new API,
> only the *first* click on the editable column calls canEdit(),
> getValue(), and getCellEditor().
>

Poking around a bit further, I found my error with the new API -- I made
the mistake of creating the CellEditor instances with no parent (the
snippet is of course correct, but when I wrote my own code, the
auto-complete led me into the default c'tor ...) Now I have working
new-style cell-editors.

thanks,
Paul
Previous Topic:Galileo Update Not Working - Eclipse IDE for Java EE Developers 1.2.1.20090918-0703
Next Topic:BooleanCellEditor or CheckboxCellEditor in JFace Snippet 056?
Goto Forum:
  


Current Time: Wed Oct 22 04:55:08 GMT 2014

Powered by FUDForum. Page generated in 0.01920 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software