|
Lines 51-56
Link Here
|
| 51 |
|
51 |
|
| 52 |
private ITextViewer textViewer; |
52 |
private ITextViewer textViewer; |
| 53 |
|
53 |
|
|
|
54 |
private String oldToolTip; |
| 55 |
|
| 54 |
/** |
56 |
/** |
| 55 |
* @see DefaultHyperlinkPresenter#DefaultHyperlinkPresenter(IPreferenceStore) |
57 |
* @see DefaultHyperlinkPresenter#DefaultHyperlinkPresenter(IPreferenceStore) |
| 56 |
*/ |
58 |
*/ |
|
Lines 97-104
Link Here
|
| 97 |
|
99 |
|
| 98 |
@Override |
100 |
@Override |
| 99 |
public void showHyperlinks(IHyperlink[] hyperlinks) { |
101 |
public void showHyperlinks(IHyperlink[] hyperlinks) { |
|
|
102 |
showHyperlinks(hyperlinks, false); |
| 103 |
} |
| 104 |
|
| 105 |
@Override |
| 106 |
public void showHyperlinks(IHyperlink[] hyperlinks, boolean takesFocusWhenVisible) { |
| 100 |
if (hyperlinks.length > 1) { |
107 |
if (hyperlinks.length > 1) { |
| 101 |
super.showHyperlinks(hyperlinks); |
108 |
super.showHyperlinks(hyperlinks, takesFocusWhenVisible); |
| 102 |
} else { |
109 |
} else { |
| 103 |
activeRegion = null; |
110 |
activeRegion = null; |
| 104 |
if (hyperlinks.length > 0 && hyperlinks[0] instanceof TaskHyperlink) { |
111 |
if (hyperlinks.length > 0 && hyperlinks[0] instanceof TaskHyperlink) { |
|
Lines 118-123
Link Here
|
| 118 |
activeRegion = hyperlink.getHyperlinkRegion(); |
125 |
activeRegion = hyperlink.getHyperlinkRegion(); |
| 119 |
if (textViewer != null && textViewer.getTextWidget() != null |
126 |
if (textViewer != null && textViewer.getTextWidget() != null |
| 120 |
&& !textViewer.getTextWidget().isDisposed()) { |
127 |
&& !textViewer.getTextWidget().isDisposed()) { |
|
|
128 |
oldToolTip = textViewer.getTextWidget().getToolTipText(); |
| 121 |
if (task == null) { |
129 |
if (task == null) { |
| 122 |
String taskLabel = TasksUiInternal.getTaskPrefix(hyperlink.getRepository() |
130 |
String taskLabel = TasksUiInternal.getTaskPrefix(hyperlink.getRepository() |
| 123 |
.getConnectorKind()); |
131 |
.getConnectorKind()); |
|
Lines 132-138
Link Here
|
| 132 |
} |
140 |
} |
| 133 |
} |
141 |
} |
| 134 |
} |
142 |
} |
| 135 |
super.showHyperlinks(hyperlinks); |
143 |
super.showHyperlinks(hyperlinks, takesFocusWhenVisible); |
| 136 |
} |
144 |
} |
| 137 |
} |
145 |
} |
| 138 |
|
146 |
|
|
Lines 140-146
Link Here
|
| 140 |
public void hideHyperlinks() { |
148 |
public void hideHyperlinks() { |
| 141 |
if (currentTaskHyperlink != null) { |
149 |
if (currentTaskHyperlink != null) { |
| 142 |
if (textViewer != null && textViewer.getTextWidget() != null && !textViewer.getTextWidget().isDisposed()) { |
150 |
if (textViewer != null && textViewer.getTextWidget() != null && !textViewer.getTextWidget().isDisposed()) { |
| 143 |
textViewer.getTextWidget().setToolTipText(null); |
151 |
textViewer.getTextWidget().setToolTipText(oldToolTip); |
| 144 |
} |
152 |
} |
| 145 |
currentTaskHyperlink = null; |
153 |
currentTaskHyperlink = null; |
| 146 |
currentTask = null; |
154 |
currentTask = null; |