This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 220923
Collapse All | Expand All

(-)a/git/src/org/netbeans/modules/git/ui/blame/TooltipWindow.java (-30 / +33 lines)
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);
(-)a/mercurial/src/org/netbeans/modules/mercurial/ui/annotate/TooltipWindow.java (-28 / +33 lines)
Lines 270-295 Link Here
270
                        normalStyle);
270
                        normalStyle);
271
271
272
                // author
272
                // author
273
                String author = annotateLine.getAuthor();
273
                {
274
                StyledDocumentHyperlink l = linkerSupport.getLinker(AuthorLinker.class, 0);
274
                    String author = annotateLine.getAuthor();
275
                if(master.isKenai()) {
275
                    StyledDocumentHyperlink l = linkerSupport.getLinker(AuthorLinker.class, 0);
276
                    KenaiUser kenaiUser = master.getKenaiUser(author);
276
                    if (master.isKenai()) {
277
                    if(kenaiUser != null) {
277
                        KenaiUser kenaiUser = master.getKenaiUser(author);
278
                        l = new AuthorLinker(
278
                        if (kenaiUser != null) {
279
                                kenaiUser,
279
                            l = new AuthorLinker(
280
                                authorStyle,
280
                                    kenaiUser,
281
                                doc,
281
                                    authorStyle,
282
                                author,
282
                                    doc,
283
                                KenaiUser.getChatLink(
283
                                    author,
284
                                    KenaiUser.getChatLink(
284
                                    master.getCurrentFileObject(),
285
                                    master.getCurrentFileObject(),
285
                                    annotateLine.getLineNum()));
286
                                    annotateLine.getLineNum()));
286
                        linkerSupport.add(l, 0);
287
                            linkerSupport.add(l, 0);
288
                        }
287
                    }
289
                    }
288
                }
290
                    if (l != null) {
289
                if(l != null) {
291
                        l.insertString(doc, authorStyle);
290
                    l.insertString(doc, authorStyle);
292
                    } else {
291
                } else {
293
                        doc.insertString(doc.getLength(), author, normalStyle);
292
                    doc.insertString(doc.getLength(), author, normalStyle);
294
                    }
293
                }
295
                }
294
296
295
                // date
297
                // date
Lines 298-317 Link Here
298
                doc.insertString(doc.getLength(), "\n", normalStyle);
300
                doc.insertString(doc.getLength(), "\n", normalStyle);
299
301
300
                // commit msg
302
                // commit msg
301
                String commitMessage = annotateLine.getCommitMessage();
303
                {
302
                List<VCSHyperlinkProvider> providers = Mercurial.getInstance().getHyperlinkProviders();
304
                    StyledDocumentHyperlink l = null;
303
                for (VCSHyperlinkProvider hp : providers) {
305
                    String commitMessage = annotateLine.getCommitMessage();
304
                    l = IssueLinker.create(hp, hyperlinkStyle, master.getRepositoryRoot(), doc, commitMessage);
306
                    List<VCSHyperlinkProvider> providers = Mercurial.getInstance().getHyperlinkProviders();
307
                    for (VCSHyperlinkProvider hp : providers) {
308
                        l = IssueLinker.create(hp, hyperlinkStyle, master.getRepositoryRoot(), doc, commitMessage);
309
                        if (l != null) {
310
                            linkerSupport.add(l, 0);
311
                            break;
312
                        }
313
                    }
305
                    if (l != null) {
314
                    if (l != null) {
306
                        linkerSupport.add(l, 0);
315
                        l.insertString(doc, normalStyle);
307
                        break;
316
                    } else {
317
                        doc.insertString(doc.getLength(), commitMessage, normalStyle);
308
                    }
318
                    }
309
                }
319
                }
310
                if(l != null) {
311
                    l.insertString(doc, normalStyle);
312
                } else {
313
                    doc.insertString(doc.getLength(), commitMessage, normalStyle);
314
                }
315
320
316
                textPane.setDocument(doc);
321
                textPane.setDocument(doc);
317
                textPane.setEditable(false);
322
                textPane.setEditable(false);
(-)a/subversion/src/org/netbeans/modules/subversion/ui/blame/TooltipWindow.java (-29 / +34 lines)
Lines 264-289 Link Here
264
                doc.insertString(doc.getLength(), annotateLine.getRevision() + " - ", normalStyle);
264
                doc.insertString(doc.getLength(), annotateLine.getRevision() + " - ", normalStyle);
265
                
265
                
266
                // author
266
                // author
267
                String author = annotateLine.getAuthor();
267
                {
268
                StyledDocumentHyperlink l = linkerSupport.getLinker(AuthorLinker.class, 0);
268
                    String author = annotateLine.getAuthor();
269
                if(master.isKenai()) {
269
                    StyledDocumentHyperlink l = linkerSupport.getLinker(AuthorLinker.class, 0);
270
                    KenaiUser kenaiUser = master.getKenaiUser(author);
270
                    if (master.isKenai()) {
271
                    if(kenaiUser != null) {
271
                        KenaiUser kenaiUser = master.getKenaiUser(author);
272
                        l = new AuthorLinker(
272
                        if (kenaiUser != null) {
273
                                kenaiUser,
273
                            l = new AuthorLinker(
274
                                authorStyle,
274
                                    kenaiUser,
275
                                doc,
275
                                    authorStyle,
276
                                author, 
276
                                    doc,
277
                                KenaiUser.getChatLink(
277
                                    author,
278
                                    KenaiUser.getChatLink(
278
                                    master.getCurrentFileObject(),
279
                                    master.getCurrentFileObject(),
279
                                    annotateLine.getLineNum()));
280
                                    annotateLine.getLineNum()));
280
                        linkerSupport.add(l, 0);
281
                            linkerSupport.add(l, 0);
281
                    }                    
282
                        }
282
                }
283
                    }
283
                if(l != null) {
284
                    if (l != null) {
284
                    l.insertString(doc, authorStyle);
285
                        l.insertString(doc, authorStyle);
285
                } else {
286
                    } else {
286
                    doc.insertString(doc.getLength(), author, normalStyle);
287
                        doc.insertString(doc.getLength(), author, normalStyle);
288
                    }
287
                }
289
                }
288
290
289
                // date
291
                // date
Lines 292-311 Link Here
292
                doc.insertString(doc.getLength(), "\n", normalStyle);
294
                doc.insertString(doc.getLength(), "\n", normalStyle);
293
                
295
                
294
                // commit msg
296
                // commit msg
295
                String commitMessage = annotateLine.getCommitMessage();
297
                {
296
                List<VCSHyperlinkProvider> providers = Subversion.getInstance().getHyperlinkProviders();
298
                    StyledDocumentHyperlink l = null;
297
                for (VCSHyperlinkProvider hp : providers) {
299
                    String commitMessage = annotateLine.getCommitMessage();
298
                    l = IssueLinker.create(hp, hyperlinkStyle, master.getFile(), doc, commitMessage);
300
                    List<VCSHyperlinkProvider> providers = Subversion.getInstance().getHyperlinkProviders();
301
                    for (VCSHyperlinkProvider hp : providers) {
302
                        l = IssueLinker.create(hp, hyperlinkStyle, master.getFile(), doc, commitMessage);
303
                        if (l != null) {
304
                            linkerSupport.add(l, 0);
305
                            break;
306
                        }
307
                    }
299
                    if (l != null) {
308
                    if (l != null) {
300
                        linkerSupport.add(l, 0);
309
                        l.insertString(doc, normalStyle);
301
                        break;
310
                    } else {
311
                        doc.insertString(doc.getLength(), commitMessage, normalStyle);
302
                    }
312
                    }
303
                }
313
                }
304
                if(l != null) {
305
                    l.insertString(doc, normalStyle);
306
                } else {
307
                    doc.insertString(doc.getLength(), commitMessage, normalStyle);
308
                }
309
                
314
                
310
                textPane.setDocument(doc);
315
                textPane.setDocument(doc);
311
                textPane.setEditable(false);
316
                textPane.setEditable(false);

Return to bug 220923