Lines 260-265
Link Here
|
260 |
|
260 |
|
261 |
private class TooltipContentPanel extends JComponent { |
261 |
private class TooltipContentPanel extends JComponent { |
262 |
|
262 |
|
|
|
263 |
private int authorLinkerId=0; |
264 |
private int commitMessageLinkerId=1; |
263 |
public TooltipContentPanel(JTextComponent parentPane) { |
265 |
public TooltipContentPanel(JTextComponent parentPane) { |
264 |
try { |
266 |
try { |
265 |
textPane = new JTextPane(); |
267 |
textPane = new JTextPane(); |
Lines 281-287
Link Here
|
281 |
|
283 |
|
282 |
// author |
284 |
// author |
283 |
String author = annotateLine.getAuthor().toString(); |
285 |
String author = annotateLine.getAuthor().toString(); |
284 |
StyledDocumentHyperlink l = linkerSupport.getLinker(AuthorLinker.class, 0); |
286 |
StyledDocumentHyperlink l = linkerSupport.getLinker(AuthorLinker.class, authorLinkerId); |
285 |
if(master.isKenai()) { |
287 |
if(master.isKenai()) { |
286 |
KenaiUser kenaiUser = master.getKenaiUser(author); |
288 |
KenaiUser kenaiUser = master.getKenaiUser(author); |
287 |
if(kenaiUser != null) { |
289 |
if(kenaiUser != null) { |
Lines 293-299
Link Here
|
293 |
KenaiUser.getChatLink( |
295 |
KenaiUser.getChatLink( |
294 |
master.getCurrentFileObject(), |
296 |
master.getCurrentFileObject(), |
295 |
annotateLine.getLineNum())); |
297 |
annotateLine.getLineNum())); |
296 |
linkerSupport.add(l, 0); |
298 |
linkerSupport.add(l, authorLinkerId); |
297 |
} |
299 |
} |
298 |
} |
300 |
} |
299 |
if(l != null) { |
301 |
if(l != null) { |
Lines 310-324
Link Here
|
310 |
// commit msg |
312 |
// commit msg |
311 |
String commitMessage = annotateLine.getRevisionInfo().getFullMessage(); |
313 |
String commitMessage = annotateLine.getRevisionInfo().getFullMessage(); |
312 |
List<VCSHyperlinkProvider> providers = Git.getInstance().getHyperlinkProviders(); |
314 |
List<VCSHyperlinkProvider> providers = Git.getInstance().getHyperlinkProviders(); |
|
|
315 |
IssueLinker issueLinker = null; |
313 |
for (VCSHyperlinkProvider hp : providers) { |
316 |
for (VCSHyperlinkProvider hp : providers) { |
314 |
l = IssueLinker.create(hp, hyperlinkStyle, master.getRepositoryRoot(), doc, commitMessage); |
317 |
issueLinker = IssueLinker.create(hp, hyperlinkStyle, master.getRepositoryRoot(), doc, commitMessage); |
315 |
if (l != null) { |
318 |
if (issueLinker != null) { |
316 |
linkerSupport.add(l, 0); |
319 |
linkerSupport.add(issueLinker, commitMessageLinkerId); |
317 |
break; |
320 |
break; |
318 |
} |
321 |
} |
319 |
} |
322 |
} |
320 |
if(l != null) { |
323 |
if (issueLinker != null) { |
321 |
l.insertString(doc, normalStyle); |
324 |
issueLinker.insertString(doc, normalStyle); |
322 |
} else { |
325 |
} else { |
323 |
doc.insertString(doc.getLength(), commitMessage, normalStyle); |
326 |
doc.insertString(doc.getLength(), commitMessage, normalStyle); |
324 |
} |
327 |
} |