Lines 280-328
Link Here
|
280 |
normalStyle); |
280 |
normalStyle); |
281 |
|
281 |
|
282 |
// author |
282 |
// author |
283 |
String author = annotateLine.getAuthor().toString(); |
283 |
{ |
284 |
StyledDocumentHyperlink l = linkerSupport.getLinker(AuthorLinker.class, 0); |
284 |
String author = annotateLine.getAuthor().toString(); |
285 |
if(master.isKenai()) { |
285 |
StyledDocumentHyperlink l = linkerSupport.getLinker(AuthorLinker.class, 0); |
286 |
KenaiUser kenaiUser = master.getKenaiUser(author); |
286 |
if (master.isKenai()) { |
287 |
if(kenaiUser != null) { |
287 |
KenaiUser kenaiUser = master.getKenaiUser(author); |
288 |
l = new AuthorLinker( |
288 |
if (kenaiUser != null) { |
289 |
kenaiUser, |
289 |
l = new AuthorLinker( |
290 |
authorStyle, |
290 |
kenaiUser, |
291 |
doc, |
291 |
authorStyle, |
292 |
author, |
292 |
doc, |
293 |
KenaiUser.getChatLink( |
293 |
author, |
|
|
294 |
KenaiUser.getChatLink( |
294 |
master.getCurrentFileObject(), |
295 |
master.getCurrentFileObject(), |
295 |
annotateLine.getLineNum())); |
296 |
annotateLine.getLineNum())); |
296 |
linkerSupport.add(l, 0); |
297 |
linkerSupport.add(l, 0); |
|
|
298 |
} |
299 |
} |
300 |
if (l != null) { |
301 |
l.insertString(doc, authorStyle); |
302 |
} else { |
303 |
doc.insertString(doc.getLength(), author, normalStyle); |
297 |
} |
304 |
} |
298 |
} |
305 |
} |
299 |
if(l != null) { |
|
|
300 |
l.insertString(doc, authorStyle); |
301 |
} else { |
302 |
doc.insertString(doc.getLength(), author, normalStyle); |
303 |
} |
304 |
|
305 |
// date |
306 |
// date |
306 |
doc.insertString(doc.getLength(), " ", normalStyle); |
307 |
doc.insertString(doc.getLength(), " ", normalStyle); |
307 |
doc.insertString(doc.getLength(), DateFormat.getDateInstance().format(new Date(annotateLine.getRevisionInfo().getCommitTime())), normalStyle); |
308 |
doc.insertString(doc.getLength(), DateFormat.getDateInstance().format(new Date(annotateLine.getRevisionInfo().getCommitTime())), normalStyle); |
308 |
doc.insertString(doc.getLength(), "\n", normalStyle); |
309 |
doc.insertString(doc.getLength(), "\n", normalStyle); |
309 |
|
310 |
|
310 |
// commit msg |
311 |
// commit msg |
311 |
String commitMessage = annotateLine.getRevisionInfo().getFullMessage(); |
312 |
{ |
312 |
List<VCSHyperlinkProvider> providers = Git.getInstance().getHyperlinkProviders(); |
313 |
StyledDocumentHyperlink l = null; |
313 |
for (VCSHyperlinkProvider hp : providers) { |
314 |
String commitMessage = annotateLine.getRevisionInfo().getFullMessage(); |
314 |
l = IssueLinker.create(hp, hyperlinkStyle, master.getRepositoryRoot(), doc, commitMessage); |
315 |
List<VCSHyperlinkProvider> providers = Git.getInstance().getHyperlinkProviders(); |
|
|
316 |
for (VCSHyperlinkProvider hp : providers) { |
317 |
l = IssueLinker.create(hp, hyperlinkStyle, master.getRepositoryRoot(), doc, commitMessage); |
318 |
if (l != null) { |
319 |
linkerSupport.add(l, 0); |
320 |
break; |
321 |
} |
322 |
} |
315 |
if (l != null) { |
323 |
if (l != null) { |
316 |
linkerSupport.add(l, 0); |
324 |
l.insertString(doc, normalStyle); |
317 |
break; |
325 |
} else { |
|
|
326 |
doc.insertString(doc.getLength(), commitMessage, normalStyle); |
318 |
} |
327 |
} |
319 |
} |
328 |
} |
320 |
if(l != null) { |
|
|
321 |
l.insertString(doc, normalStyle); |
322 |
} else { |
323 |
doc.insertString(doc.getLength(), commitMessage, normalStyle); |
324 |
} |
325 |
|
326 |
textPane.setDocument(doc); |
329 |
textPane.setDocument(doc); |
327 |
textPane.setEditable(false); |
330 |
textPane.setEditable(false); |
328 |
Color color = new Color(233, 241, 255); |
331 |
Color color = new Color(233, 241, 255); |