[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [stellation-res] #34471 Comment HoverText: Patch Posted
|
At 05:46 AM 3/14/2003, Jonathan Gossage wrote:
> -----Original Message-----
> Sent: Thursday, March 13, 2003 7:37 PM
> To: stellation-res@xxxxxxxxxxxxxxx
> Subject: Re: [stellation-res] #34471 Comment HoverText: Patch Posted
>
<snip>
> Currently, comment text is clipped if it exceeds the allotted
> screen space.
> Some means for displaying the full comment text should be added.
> Possibilities include:
> * Right-clicking and/or single-clicking over a comment field to open a
> multi-line text display.
> * Adding a small button on the right side of each comment field; clicking
> the button would open the multi-line text display on the
> associated comment.
>
> Please let me know which alternative you would prefer, or suggest a
> different approach.
Why not use the same technique that Eclipse uses when displaying Javadoc in
the editor? F2 brings up the multi-line text display.
That's a good idea which I'm going to use, but which launched me on a bit
of a detour.
(I'm making good progress now.)
First, I reviewied the Eclipse key binding mechanism to check the global
usage for F2. It's assigned to "Show Tooltip Text", which suggested I could
use the Tooltip mechanism to display multi-line text, rather than rolling
my own solution.
Several experiments proved this didn't work; looking into the Editor code
related to Javadoc was educational, but clearly not the right way to go (the
Java editor has very rich capabilities for managing and presenting
"Information" (code assist, Javadoc popup, error indications..... way more
than is needed for our purposes).
Moving along - I decided to try using the 'DefaultInformationControl' for
presenting multiline comments, rather than a dialog as such. That led back
into the "why doesn't hovertext always work on GTK2?" swamp. However, this
time I made more progress.
The proximate cause appears to be the use of the SWT.ON_TOP widget style
flag, which causes a control to always be above (higher Z order) than other
widgets for which that flag is cleared. With that flag set, making a
DefaultInformationControl visible causes keyboard and mouse button events to
(apparently) be directed "elsewhere" (not to the DI control, not to an
underlying or adjacent SWT widget, just ..... "somewhere else"). I could
find no way to set the focus to either the ON_TOP widget or any other
Eclipse UI component.
However, clearing the SWT.ON_TOP flag on the StyledText widget within the DI
control makes the DI control behave as it should (at least in this usage
context).
I'm now modifying my original hovertext comment code to:
* Use a TableTree control rather than a Tree control
* Present revision- and branch-related data appropriately
* Use an F2 key event (and possibly a single mouse click as well) to pop up the
DI control immediately. (Hovering will still pop up the DI control
after the
hover delay elapses, although I can defeat this if others object).
I'll post another note when the patch is ready for testing.
0 Jim
--------------------------------------------------------------------
Jim Wright, IBM T.J. Watson Research Center
*** The Stellation project: Advanced SCM for Collaboration
*** http://www.eclipse.org/stellation
*** Work Email: jwright@xxxxxxxxxxxxxx ------- Personal Email:
jim.wright@xxxxxxx