Issuezilla Link Plugin for JSPWiki


It is painful to create links to NetBeans issuezilla as wiki links
 [ 123456]
It is lot of text that the user has to write down.


Issuezilla plugin usage is deprecated as netbeans use mediawiki:


A template named iz exists to replace the older one:


Where 123123 is valid NetBeans issue number. The result will look like link to the issue number 123123

Result: 123456

Test: Issue 123123

Source code

This is the code of the former Issuezilla Plugin.

package nbimport;
import com.ecyrd.jspwiki.plugin.WikiPlugin;
import com.ecyrd.jspwiki.WikiContext;
import java.util.Map;
public class IZ implements WikiPlugin {
    public String execute(WikiContext Context, Map ParameterMap) {
        String issueNumberString = "";
        int issueNumber = 0;
        String issueURL = "";
        String issueHyperLink = "";
        if (ParameterMap != null && ParameterMap.containsKey("num")) {
            try {
                issueNumberString = (String) ParameterMap.get("num");
                issueNumber = Integer.parseInt(issueNumberString); // check if it really is issue number - against HTML injection
                issueURL = "" + issueNumber;
                issueHyperLink = "<a class=\"external\" href='" + issueURL + "'>Issue " + issueNumber + "</a>";
            } catch (NumberFormatException e) {
                issueHyperLink = "<b>IZ usage:</b><br> <pre>[{IZNum=123123}]</pre><br> Where 123123 is valid NetBeans issue number.";
        } else {
            issueHyperLink = "<b>IZ usage:</b><br> <pre>[{IZNum=123123}]</pre><br> Where 123123 is valid NetBeans issue number.";
        return issueHyperLink;
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo