Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » JFace TreeViewer right and left keystrokes go to incorrect column.
JFace TreeViewer right and left keystrokes go to incorrect column. [message #317594] Mon, 09 July 2007 16:58 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #317600 is a reply to message #317599] Mon, 09 July 2007 19:00 Go to previous messageGo to next message
Eclipse UserFriend
https://bugs.eclipse.org/bugs/show_bug.cgi?id=195908

Tom Schindl schrieb:
> 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
>
Re: JFace TreeViewer right and left keystrokes go to incorrect column. [message #317614 is a reply to message #317600] Tue, 10 July 2007 08:53 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: JFace TreeViewer right and left keystrokes go to incorrect column. [message #317615 is a reply to message #317614] Tue, 10 July 2007 09:20 Go to previous messageGo to next message
Eclipse UserFriend
Hi Scott,

I can promise to get this into 3.3.1 but I'll try my best. In the end
it's the component's leads decision and not mine although if I'm really
satisfied with it I'll try to get it in.

As a first step we'll integrate it into 3.4M1 and see whether something
different get broken. I assembled the patch last night within a few
minutes and haven't thought thoroughly about it.

It's sad that we haven't spotted this in 3.3 RC cycles but I simply
never thought about this kind of thing :-(.

I can understand that you like this single cell editing stuff :-)

Tom

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
>
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 Go to previous message
Eclipse UserFriend
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
------------------------------------------------------------ --------
Previous Topic:How to display checkbox as well as plain text in a table column?
Next Topic:Event context
Goto Forum:
  


Current Time: Sun Jul 27 06:23:45 EDT 2025

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

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

Back to the top