Package com.intellij.openapi.roots

Examples of com.intellij.openapi.roots.CompilerModuleExtension


    final int length = modules.length;
    final VirtualFile[] vFiles = new VirtualFile[length];

    for (int i = 0; i < length; i++) {
      final Module module = modules[i];
      final CompilerModuleExtension extension = CompilerModuleExtension.getInstance(module);
      VirtualFile path = null;
      if (extension != null) {
        path = extension.getCompilerOutputPath();
      }
      if (path == null) {
        //throw new FindBugsPluginException("Make sure your module compiler output path configuration points to a existing directory in module (" + module.getName() + ")");
        path = getProjectOutputPath(module);
      }
View Full Code Here


  }


  @Nullable
  public static VirtualFile getCompilerOutputPath(final Module module) {
    final CompilerModuleExtension compilerModuleExtension = CompilerModuleExtension.getInstance(module);
    if (compilerModuleExtension != null) {
      return compilerModuleExtension.getCompilerOutputPath();
    }
    return null;
  }
View Full Code Here


  @Nullable
  public static VirtualFile getCompilerOutputPath(@NotNull final DataContext dataContext) {
    final Module module = getModule(dataContext);
    final CompilerModuleExtension compilerModuleExtension = CompilerModuleExtension.getInstance(module);
    if (compilerModuleExtension != null) {
      return compilerModuleExtension.getCompilerOutputPath();
    }
    return null;
    //return ModuleRootManager.getInstance(module).getCompilerOutputPath();
  }
View Full Code Here

  public static VirtualFile getCompilerOutputPath(@NotNull final VirtualFile virtualFile, @NotNull final Project project) {
    final Module module = findModuleForFile(virtualFile, project);
    if (module == null) {
      return null;
    }
    final CompilerModuleExtension compilerModuleExtension = CompilerModuleExtension.getInstance(module);
    if (compilerModuleExtension != null) {
      return compilerModuleExtension.getCompilerOutputPath();
    }
    return null;
    //return ModuleRootManager.getInstance(module).getCompilerOutputPath();
  }
View Full Code Here

      final VirtualFile virtualFile = psiFile.getVirtualFile();
      if (virtualFile == null) {
        LOGGER.warn("No virtual file for psi file: " + psiFile);
        return null;
      }
      final CompilerModuleExtension moduleExtension = CompilerModuleExtension.getInstance(module);
      if (moduleExtension == null) return null;
      String classPath;
      if (ProjectRootManager.getInstance(module.getProject()).getFileIndex().isInTestSourceContent(virtualFile)) {
        final VirtualFile pathForTests = moduleExtension.getCompilerOutputPathForTests();
        if (pathForTests == null) {
          LOGGER.warn("No compiler test output path for:" + virtualFile);
          return null;
        }
        classPath = pathForTests.getPath();
      } else {
        final VirtualFile compilerOutputPath = moduleExtension.getCompilerOutputPath();
        if (compilerOutputPath == null) {
          LOGGER.warn("No compiler output path for:" + virtualFile);
          return null;
        }
        classPath = compilerOutputPath.getPath();
View Full Code Here

        return result;
      }

      @Override
      public String getCompileOutputPath() {
        final CompilerModuleExtension moduleExtension = CompilerModuleExtension.getInstance(module);
        final String outputUrl = moduleExtension != null ? moduleExtension.getCompilerOutputUrl() : null;
        return VfsUtilCore.urlToPath(outputUrl);
      }

      @Override
      public void setErrorRoot(String root) {
View Full Code Here

    return super.doExecute(project, nekoRunningState, contentToReuse, env);
  }

  static String getOutputFilePath(Module module, HaxeModuleSettings settings) {
    FileDocumentManager.getInstance().saveAllDocuments();
    final CompilerModuleExtension model = CompilerModuleExtension.getInstance(module);
    assert model != null;
    return model.getCompilerOutputUrl() + "/release/" + settings.getOutputFileName();
  }
View Full Code Here

    return sdk == HaxeSdkType.getInstance();
  }

  @Override
  public void moduleCreated(@NotNull Module module) {
    final CompilerModuleExtension model = (CompilerModuleExtension)CompilerModuleExtension.getInstance(module).getModifiableModel(true);
    model.setCompilerOutputPath(model.getCompilerOutputUrl());
    model.inheritCompilerOutputPath(false);
    model.commit();
  }
View Full Code Here

    if (myCustomPathCheckBox.isSelected()) {
      myPathToFileTextField.setText(FileUtil.toSystemDependentName(customPathToFile));
    }
    else if (getSelectedModule() != null) {
      final HaxeModuleSettings settings = HaxeModuleSettings.getInstance(getSelectedModule());
      final CompilerModuleExtension model = CompilerModuleExtension.getInstance(getSelectedModule());
      assert model != null;
      final String url = model.getCompilerOutputUrl() + "/" + settings.getOutputFileName();
      myPathToFileTextField.setText(FileUtil.toSystemDependentName(VfsUtil.urlToPath(url)));
    }
    else {
      myPathToFileTextField.setText("");
    }
View Full Code Here

    }
    return result;
  }

  private static File getModuleOutputDir(@NotNull Module module) throws OsgiBuildException {
    CompilerModuleExtension extension = CompilerModuleExtension.getInstance(module);
    if (extension != null) {
      String url = extension.getCompilerOutputUrl();
      if (url != null) {
        return new File(VfsUtilCore.urlToPath(url));
      }
    }
    throw new OsgiBuildException("Unable to determine the compiler output path for the module '" + module.getName() + "'");
View Full Code Here

TOP

Related Classes of com.intellij.openapi.roots.CompilerModuleExtension

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.