JFace TreeViewer right and left keystrokes go to incorrect column. [message #317594] |
Mon, 09 July 2007 16:58  |
Eclipse User |
|
|
|
I have created a TreeViewer with single cell editing capability. Single
cells can be selected, and the right/left/up/down arrows can be used to
navigate cells in the tree.
This all works fine until the order of the columns gets changed (by way of
a user dragging them around), then the right and left mouse key strokes
follow the original order that the columns were created in.
I would imagine that when you hit the right/left mouse key, either the
CellNavigationStrategy or the ViewerCell would know that the order of the
columns has changed, and refer to Tree.getColumnOrder() to find the
correct neighboring cell. However it does not, and finds the original
neighbor.
This causes the cell highlighting to jump all over the table when you hit
right/left, which is quite unexpected. Is this a bug, or am I missing
something.
Here is a brief snippet where I create the FocusCellManager and
ActivationStrategy.
TreeViewerFocusCellManager focusCellManager = new
TreeViewerFocusCellManager(viewer, new
FocusCellOwnerDrawHighlighter(viewer));
ColumnViewerEditorActivationStrategy actSupport = new
ColumnViewerEditorActivationStrategy(viewer) {
protected boolean isEditorActivationEvent(
ColumnViewerEditorActivationEvent event) {
if(getPropertiesConfiguration().isWriteEnabled()){
return event.eventType ==
ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTI ON ||
event.keyCode == SWT.F2;
}
return false;
}
};
TreeViewerEditor.create(viewer, focusCellManager, actSupport,
ColumnViewerEditor.KEYBOARD_ACTIVATION);
Thanks in advance for any help,
-Scott
|
|
|
Re: JFace TreeViewer right and left keystrokes go to incorrect column. [message #317598 is a reply to message #317594] |
Mon, 09 July 2007 17:47   |
Eclipse User |
|
|
|
A Bug please file a bug report to bugzilla and CC me. I'll see how this
can be fixed.
Tom
scott schrieb:
> I have created a TreeViewer with single cell editing capability. Single
> cells can be selected, and the right/left/up/down arrows can be used to
> navigate cells in the tree.
>
> This all works fine until the order of the columns gets changed (by way
> of a user dragging them around), then the right and left mouse key
> strokes follow the original order that the columns were created in.
>
> I would imagine that when you hit the right/left mouse key, either the
> CellNavigationStrategy or the ViewerCell would know that the order of
> the columns has changed, and refer to Tree.getColumnOrder() to find the
> correct neighboring cell. However it does not, and finds the original
> neighbor.
>
> This causes the cell highlighting to jump all over the table when you
> hit right/left, which is quite unexpected. Is this a bug, or am I
> missing something.
>
> Here is a brief snippet where I create the FocusCellManager and
> ActivationStrategy.
>
> TreeViewerFocusCellManager focusCellManager = new
> TreeViewerFocusCellManager(viewer, new
> FocusCellOwnerDrawHighlighter(viewer));
> ColumnViewerEditorActivationStrategy actSupport = new
> ColumnViewerEditorActivationStrategy(viewer) {
> protected boolean isEditorActivationEvent(
> ColumnViewerEditorActivationEvent event) {
> if(getPropertiesConfiguration().isWriteEnabled()){
> return event.eventType ==
> ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTI ON ||
> event.keyCode == SWT.F2;
> }
>
> return false;
> }
> };
> TreeViewerEditor.create(viewer, focusCellManager, actSupport,
> ColumnViewerEditor.KEYBOARD_ACTIVATION);
>
> Thanks in advance for any help,
> -Scott
>
>
|
|
|
Re: JFace TreeViewer right and left keystrokes go to incorrect column. [message #317599 is a reply to message #317598] |
Mon, 09 July 2007 18:44   |
Eclipse User |
|
|
|
Hi,
I filed a bug and added a possible patch. Because all this is internal
stuff you don't have access to I think you are lost sorry and have to
wait (or ship with a patched JFace) :-(
Tom
Tom Schindl schrieb:
> A Bug please file a bug report to bugzilla and CC me. I'll see how this
> can be fixed.
>
> Tom
>
> scott schrieb:
>> I have created a TreeViewer with single cell editing capability.
>> Single cells can be selected, and the right/left/up/down arrows can be
>> used to navigate cells in the tree.
>>
>> This all works fine until the order of the columns gets changed (by
>> way of a user dragging them around), then the right and left mouse key
>> strokes follow the original order that the columns were created in.
>>
>> I would imagine that when you hit the right/left mouse key, either the
>> CellNavigationStrategy or the ViewerCell would know that the order of
>> the columns has changed, and refer to Tree.getColumnOrder() to find
>> the correct neighboring cell. However it does not, and finds the
>> original neighbor.
>>
>> This causes the cell highlighting to jump all over the table when you
>> hit right/left, which is quite unexpected. Is this a bug, or am I
>> missing something.
>>
>> Here is a brief snippet where I create the FocusCellManager and
>> ActivationStrategy.
>>
>> TreeViewerFocusCellManager focusCellManager = new
>> TreeViewerFocusCellManager(viewer, new
>> FocusCellOwnerDrawHighlighter(viewer));
>> ColumnViewerEditorActivationStrategy actSupport = new
>> ColumnViewerEditorActivationStrategy(viewer) { protected
>> boolean isEditorActivationEvent( ColumnViewerEditorActivationEvent
>> event) {
>> if(getPropertiesConfiguration().isWriteEnabled()){
>> return event.eventType ==
>> ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTI ON ||
>> event.keyCode == SWT.F2;
>> }
>>
>> return false;
>> }
>> };
>> TreeViewerEditor.create(viewer, focusCellManager, actSupport,
>> ColumnViewerEditor.KEYBOARD_ACTIVATION);
>>
>> Thanks in advance for any help,
>> -Scott
>>
>>
|
|
|
|
|
|
Re: JFace TreeViewer right and left keystrokes go to incorrect column. [message #317649 is a reply to message #317614] |
Wed, 11 July 2007 06:34  |
Eclipse User |
|
|
|
Attach yourself to the bug [1] and express that you really think this
has to go into 3.3.1.
Tom
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=195908
Scott schrieb:
> Tom,
>
> Thanks for the quick response. It would be really nice if we could have
> this in 3.3.1. Our current plan is to switch to full selection
> highlighting until this is fixed, and we would really like to have the
> single cell editing back in.
>
> -Scott
>
--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
|
|
|
Powered by
FUDForum. Page generated in 0.05348 seconds