コード例 #1
0
  public void testSourceOnSourcepath_ignored() throws Exception {
    NBSource source = createSampleSource();
    assertTrue(
        PathUtil.getInstance()
            .sourceOnSourcepath(
                IDEController.getInstance().getActiveProjectFromIDE(), source.getFileObject()));

    setIgnoredOnSourcepath((NBSource) source.getParent());
    assertFalse(
        PathUtil.getInstance()
            .sourceOnSourcepath(
                IDEController.getInstance().getActiveProjectFromIDE(), source.getFileObject()));
  }
コード例 #2
0
  public void testSourceOnSourcepath_notOnPath_localSource() throws Exception {
    NBSource source = createSampleSource();
    setSourcepathRoot(getRoot().mkdir("some_other_sourcepath_root").getFileOrNull());

    assertFalse(
        PathUtil.getInstance()
            .sourceOnSourcepath(
                IDEController.getInstance().getActiveProjectFromIDE(), source.getFileObject()));
  }
コード例 #3
0
  public void testNbInstallFolder() {
    File f = new File(PathUtil.getInstance().getNbInstallFolder());

    assertTrue(f.exists());

    if (RefactorItActions.isNetBeansFour()) {
      assertEquals("netbeans-4.0", f.getName());
    } else {
      assertEquals("NetBeans3.6", f.getName());
    }
  }
コード例 #4
0
  public void testNbConfigFile() {
    File f = new File(PathUtil.getInstance().getNbConfigFile());

    assertTrue(f.exists());

    if (RefactorItActions.isNetBeansFour()) {
      assertTrue(
          f.getAbsolutePath(),
          f.getAbsolutePath().endsWith(FileUtil.useSystemPS("/netbeans-4.0/etc/netbeans.conf")));
    } else {
      assertTrue(
          f.getAbsolutePath(),
          f.getAbsolutePath().endsWith(FileUtil.useSystemPS("/NetBeans3.6/bin/ide.cfg")));
    }
  }