Bug 166604 - Show task info when hovering a hyperlink
Summary: Show task info when hovering a hyperlink
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 0.9   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.0   Edit
Assignee: Eugene Kuleshov CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2006-12-02 18:09 EST by Willian Mitsuda CLA
Modified: 2008-11-04 21:29 EST (History)
2 users (show)

See Also:


Attachments
simple tooltip for task hyperlinks (3.88 KB, patch)
2007-07-17 18:34 EDT, Eugene Kuleshov CLA
no flags Details | Diff
mylyn/context/zip (2.21 KB, application/octet-stream)
2007-07-17 18:34 EDT, Eugene Kuleshov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Willian Mitsuda CLA 2006-12-02 18:09:59 EST
On the web interface, when you hover some bug hyperlink, like bug#152065, the browser shows a tooltip with the bug description.

The bug editor (and other places where there is bug hyperlink detection) should have similar functionality.

Additionally, since we have a custom tooltip, it can show not only the bug id/description, but other task info, if available.

If the task info is not available locally, it can be downloaded on background and presented to the user.
Comment 1 Eugene Kuleshov CLA 2006-12-02 19:50:41 EST
+1
Comment 2 Mik Kersten CLA 2006-12-02 21:57:50 EST
Rob: I thought we used to have this?
Comment 3 Robert Elves CLA 2006-12-05 11:39:14 EST
We do, for the dependson, blocks hyerlinks. We just need to add this functionality to the BugzillaHyperlink I imagine. Although I'm not certain if the IHyperlink interface supports a tooltip... though it should.
'
Comment 4 Willian Mitsuda CLA 2006-12-05 12:13:06 EST
In addition, I'd like to have more rich information than what exists today for depends on/blocks hyperlinks.

I suggest a pattern like:

${bug-status} - ${id}: ${description}
Reported by: ${reporter}
Assigned to: ${assignee}

These are the most important information to me. Of course we can add more if needed.
Comment 5 Eugene Kuleshov CLA 2006-12-05 15:41:44 EST
Why not show the whole attrs section? :-)
Comment 6 Willian Mitsuda CLA 2006-12-05 16:12:26 EST
(In reply to comment #5)
> Why not show the whole attrs section? :-)
> 

Good idea :)

I don't know about you, but at least for me, these are the fields I have more interest when examining a bug (don't ask me why...).
Comment 7 Eugene Kuleshov CLA 2006-12-05 17:55:40 EST
In addition to those I also look at date when bug was opened, its priority and the target milestone.
Comment 8 Eugene Kuleshov CLA 2007-07-17 18:34:01 EDT
Created attachment 74006 [details]
simple tooltip for task hyperlinks

This patch adds simple tooltip for hyperlinks in all Task Editors shown in textviewers configured trough RepositoryViewerConfig. 

The change include small but necessary API addition. I had to add TaskHyperlink.getRepository() accessor for repository field already captured in this class, so repository can be accessed from the hyperlink presenter.

I'll post some additional thoughts on the next comment.
Comment 9 Eugene Kuleshov CLA 2007-07-17 18:34:03 EDT
Created attachment 74007 [details]
mylyn/context/zip
Comment 10 Eugene Kuleshov CLA 2007-07-17 18:51:13 EDT
Attached patch is a bit of a hack (it is simply setting tooltip on cursorControl when hyperlink is activated), but it seem does the trick for all controls created with TaskFormPage.addTextEditor(...) and TaskFormPage.addTextViewer(..), that include description and comments in all editors and task/subtask hyperlinks in jira attributes section. So, all these places would show tooltip with task summary. JIRA connector would particularly benefit from that because it has much more advanced task linking mechanisms and can't use 2 row UI like in Bugzilla editor.

Bugzilla task editor is using 2 rows to show dependent and blocking bugs. That part of the UI could be also changed to directly use text viewers, so it would be more compact and will have nice hyperlinks. I heard an argument that hyperlinks in text viewers is an usability issue because they doesn't allow to select text with the mouse, however, hyperlink detector can be temporarily deactivated by holding Ctrl, so selection would work.

It may make sense to use getInformationControlCreator(sourceViewer).createInformationControl(shell) for showing hyperlink tooltip, but I couldn't figure out how to properly set coordinates for the created control.

Another place for improvement is to decouple task tooltip widget used in task list, so we could have common tooltip for all hyperlinks.
Comment 11 Steffen Pingel CLA 2007-07-17 22:09:58 EDT
The effect is kind of cool and the tooltip can be quite useful but I wonder if it should be shown with a short delay. On my system it is displayed as soon as the mouse moves over a link.

Minor nit: TaskHyperlink.getRepository() is missing @since tag.
Comment 12 Steffen Pingel CLA 2007-07-18 15:06:33 EDT
I got this exception with the patch applied (I don't know what triggered it though):

-- Error Log --
Date: Wed Jul 18 14:28:14 EDT 2007
Message: Unhandled event loop exception
Severity: Error
Plugin ID: org.eclipse.ui
Stack Trace:
java.lang.NullPointerException
at org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryViewerConfig$1.hideHyperlinks(RepositoryViewerConfig.java:134)
at org.eclipse.jface.text.hyperlink.HyperlinkManager.deactivate(HyperlinkManager.java:229)
at org.eclipse.jface.text.hyperlink.HyperlinkManager.focusLost(HyperlinkManager.java:499)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:136)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1125)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1106)
at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:3045)
at org.eclipse.swt.widgets.Control.gtk_event_after(Control.java:2453)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1481)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4234)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3973)
at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:5593)
at org.eclipse.swt.widgets.Display.eventProc(Display.java:1192)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1487)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2969)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
Comment 13 Eugene Kuleshov CLA 2007-07-23 20:40:58 EDT
Besides the NPE discovered by Steffen (which is simple to fix), is there anything else preventing from taking this patch?
Comment 14 Robert Elves CLA 2007-07-24 00:46:09 EDT
 (In reply to comment #13)
> Besides the NPE discovered by Steffen (which is simple to fix), is there
> anything else preventing from taking this patch?
Sorry Eugene, I'm behind here.  This is very very cool. Patch applied.
Comment 15 Robert Elves CLA 2007-07-24 00:55:42 EDT
Marking resolved.
Comment 16 Eugene Kuleshov CLA 2007-07-24 00:58:08 EDT
Great! Thanks Rob. Now you can probably get rid of those task hyperlinks in the bugzilla editor. ;-)