NetBeans Plugins at Kenai | #3
Moving ahead, we will now focus on how to file bugs/tasks/enhancements, etc. using JIRA Issue Tracker being used for my project.
Brief Overview
There are currently 5 issues filed for this project, two being TASK and remaining three being BUGS. I have recently blogged about 2 bugs I encountered. Now, I will share with you more details about the bug, how did I resolve one of them for RHN v1.2. Also, I have been able to solve 2 issues for the previous release, i.e. RHN v1.1.

Bug Reports
Interested readers may look at the colorful representation of the diff taken of OpenThreadImpl.java file. This patch resolves one of the bugs filed recently.

As you may see, one of the issues has been fixed, while others remain unresolved. The bug I have fixed was caused due to code refactoring done recently for version 1.1 of the module. The following diff clearly shows how the bug was resolved by the addition of one if-statement.
--- OpenThreadImpl.java (revision 80) +++ OpenThreadImpl.java (revision 79) @@ -245,9 +245,9 @@ * This basically checks that the identifier present in the hyperlink, * if the file exists in relative path, then is it open or not? * If not, then opens it, also takes care of the anchors presence, in the - * <code>newIdentifier</code>. + * <code>splitIdentifier</code>. * - * @param newIdentifier + * @param splitIdentifier */ private void verifyHyperlinkStatus(String newIdentifier) { try { @@ -278,10 +278,8 @@ if (hyperLink.length <= 1) { anchorName = null; } - if (panes != null) { - setPosition(panes[0].getDocument()); - setEditorFlag(false); - } + setPosition(panes[0].getDocument()); + setEditorFlag(false); } }); if (editorFlag == false) {
As you can see, I have added check for panes. If its not null, then invoke setPosition method and set editorFlag to false. The code snippet actually looks like this;
JEditorPane[] panes = editor.getOpenedPanes();
if (hyperLink.length <= 1) {
anchorName = null;
}
if (panes != null) {
setPosition(panes[0].getDocument());
setEditorFlag(false);
}
This code checks whether there’s any opened TopComponent having the same displayName() as that of file, where user has to navigate to. If so, then switch to that editor tab.
Blog Series (Contd…)
This is the 3rd part of the blog series initiated at http://nbguru.wordpress.com/

[...] there are two posts. One of the them, continues the series I started here with the following [...]
Blog Series and PrayogShala « N, Varun
July 1, 2009 at 4:48 pm