Example #1
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()));
  }
Example #2
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()));
  }