Compilation error after 468b91c6d538.
authorJesse Glick <jglick@netbeans.org>
Fri, 15 Jul 2011 09:25:02 -0400
changeset 17521b0e36239fcb5
parent 17517 ac9c634ac976
child 17522 8c7f9a8e07bb
Compilation error after 468b91c6d538.
hudsonfindbugs/manifest.mf
hudsonfindbugs/src/org/netbeans/modules/hudsonfindbugs/NBMFindBugsQueryProvider.java
     1.1 --- a/hudsonfindbugs/manifest.mf	Mon Jul 11 14:06:33 2011 -0400
     1.2 +++ b/hudsonfindbugs/manifest.mf	Fri Jul 15 09:25:02 2011 -0400
     1.3 @@ -2,5 +2,5 @@
     1.4  OpenIDE-Module: org.netbeans.modules.hudsonfindbugs
     1.5  OpenIDE-Module-Layer: org/netbeans/modules/hudsonfindbugs/layer.xml
     1.6  OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/hudsonfindbugs/Bundle.properties
     1.7 -OpenIDE-Module-Specification-Version: 1.8
     1.8 +OpenIDE-Module-Specification-Version: 1.9
     1.9  
     2.1 --- a/hudsonfindbugs/src/org/netbeans/modules/hudsonfindbugs/NBMFindBugsQueryProvider.java	Mon Jul 11 14:06:33 2011 -0400
     2.2 +++ b/hudsonfindbugs/src/org/netbeans/modules/hudsonfindbugs/NBMFindBugsQueryProvider.java	Fri Jul 15 09:25:02 2011 -0400
     2.3 @@ -46,6 +46,7 @@
     2.4  import org.netbeans.api.project.Project;
     2.5  import org.netbeans.modules.apisupport.project.spi.NbModuleProvider;
     2.6  import org.netbeans.modules.hudsonfindbugs.spi.FindBugsQueryImplementation;
     2.7 +import org.openide.filesystems.FileUtil;
     2.8  import org.openide.util.Exceptions;
     2.9  
    2.10  /**
    2.11 @@ -68,12 +69,11 @@
    2.12      public URL getFindBugsUrl(Project project, boolean remote) {
    2.13          URL url = null;
    2.14          NbModuleProvider prov = project.getLookup().lookup(NbModuleProvider.class);
    2.15 -        if (prov != null && prov.getModuleType() == NbModuleProvider.NETBEANS_ORG) {
    2.16 +        if (prov != null) {
    2.17              if (!remote) {
    2.18 -                File file = prov.getActivePlatformLocation();
    2.19 -                File parent = file.getParentFile();
    2.20 -                if (parent != null) {
    2.21 -                    File findbugsFile = new File(parent, "build" + File.separator + "findbugs" + File.separator
    2.22 +                File nbbuild = new File(FileUtil.toFile(project.getProjectDirectory()).getParentFile(), "nbbuild");
    2.23 +                if (nbbuild.isDirectory()) {
    2.24 +                    File findbugsFile = new File(nbbuild, "build" + File.separator + "findbugs" + File.separator
    2.25                              + prov.getCodeNameBase().replace('.', '-') + ".xml");
    2.26                      if (findbugsFile.exists() && findbugsFile.isFile() && findbugsFile.canRead()) {
    2.27                          try {