当前位置: 首页>>代码示例>>Java>>正文


Java CompilerPaths.getModuleOutputPath方法代码示例

本文整理汇总了Java中com.intellij.openapi.compiler.CompilerPaths.getModuleOutputPath方法的典型用法代码示例。如果您正苦于以下问题:Java CompilerPaths.getModuleOutputPath方法的具体用法?Java CompilerPaths.getModuleOutputPath怎么用?Java CompilerPaths.getModuleOutputPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.compiler.CompilerPaths的用法示例。


在下文中一共展示了CompilerPaths.getModuleOutputPath方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getFullClassPath

import com.intellij.openapi.compiler.CompilerPaths; //导入方法依赖的package包/类
public static String getFullClassPath(Module m){


        String cp = "";

        String moduleOutputPath = CompilerPaths.getModuleOutputPath(m,false);
        if(moduleOutputPath != null && new File(moduleOutputPath).exists()) {
            cp += moduleOutputPath;
        }

        for(VirtualFile vf : OrderEnumerator.orderEntries(m).recursively().getClassesRoots()){
            String entry = new File(vf.getPath()).getAbsolutePath();
            if(entry.endsWith("!/")){ //not sure why it happens in the returned paths
                entry = entry.substring(0,entry.length()-2);
            }
            if(entry.endsWith("!")){
                entry = entry.substring(0,entry.length()-1);
            }

            if(entry.endsWith("zip")){
                //for some reasons, Java src.zip can end up on dependencies...
                continue;
            }

            if(! new File(entry).exists()){
                continue;
            }

            if(cp==null || cp.isEmpty()){
                cp = entry;
            } else {
                cp += File.pathSeparator + entry;
            }
        }
        return cp;
    }
 
开发者ID:EvoSuite,项目名称:evosuite,代码行数:37,代码来源:Utils.java

示例2: addCommandLineOptions

import com.intellij.openapi.compiler.CompilerPaths; //导入方法依赖的package包/类
public static void addCommandLineOptions(@NotNull ModuleChunk chunk,
                                         @NonNls List<String> commandLine,
                                         @NotNull String outputPath,
                                         @NotNull Sdk jdk,
                                         boolean isAnnotationProcessingMode) throws IOException {

  LanguageLevel languageLevel = chunk.getLanguageLevel();
  CompilerUtil.addSourceCommandLineSwitch(jdk, languageLevel, commandLine);

  commandLine.add("-verbose");

  final String bootCp = chunk.getCompilationBootClasspath();

  final String classPath = chunk.getCompilationClasspath();
  commandLine.add("-bootclasspath");
  addClassPathValue(commandLine, bootCp);

  commandLine.add("-classpath");
  addClassPathValue(commandLine, classPath);

  if (isAnnotationProcessingMode) {
    commandLine.add("-s");
    commandLine.add(outputPath.replace('/', File.separatorChar));
    final String moduleOutputPath = CompilerPaths.getModuleOutputPath(chunk.getModules()[0], false);
    if (moduleOutputPath != null) {
      commandLine.add("-d");
      commandLine.add(moduleOutputPath.replace('/', File.separatorChar));
    }
  }
  else {
    commandLine.add("-d");
    commandLine.add(outputPath.replace('/', File.separatorChar));
  }
}
 
开发者ID:diy1,项目名称:error-prone-aspirator,代码行数:35,代码来源:ErrorProneIdeaCompiler.java

示例3: getModuleOutputPath

import com.intellij.openapi.compiler.CompilerPaths; //导入方法依赖的package包/类
private static String getModuleOutputPath(PageObjectRunConfig runConfig) {
    Module module = runConfig.getConfigurationModule().getModule();
    return FILE_PROTOCOL + CompilerPaths.getModuleOutputPath(module, false);
}
 
开发者ID:bjorm,项目名称:PageObjectEvaluator,代码行数:5,代码来源:EvaluationConfig.java

示例4: addCommandLineOptions

import com.intellij.openapi.compiler.CompilerPaths; //导入方法依赖的package包/类
public static void addCommandLineOptions(ModuleChunk chunk, @NonNls List<String> commandLine, String outputPath, Sdk jdk,
                                         boolean version1_0,
                                         boolean version1_1,
                                         List<File> tempFiles, boolean addSourcePath, boolean useTempFile,
                                         boolean isAnnotationProcessingMode) throws IOException {

  LanguageLevel languageLevel = chunk.getLanguageLevel();
  CompilerUtil.addSourceCommandLineSwitch(jdk, languageLevel, commandLine);
  CompilerUtil.addTargetCommandLineSwitch(chunk, commandLine);

  commandLine.add("-verbose");

  final String cp = chunk.getCompilationClasspath();
  final String bootCp = chunk.getCompilationBootClasspath();

  final String classPath;
  if (version1_0 || version1_1) {
    classPath = bootCp + File.pathSeparator + cp;
  }
  else {
    classPath = cp;
    commandLine.add("-bootclasspath");
    addClassPathValue(jdk, false, commandLine, bootCp, "javac_bootcp", tempFiles, useTempFile);
  }

  commandLine.add("-classpath");
  addClassPathValue(jdk, version1_0, commandLine, classPath, "javac_cp", tempFiles, useTempFile);

  if (!version1_1 && !version1_0 && addSourcePath) {
    commandLine.add("-sourcepath");
    // this way we tell the compiler that the sourcepath is "empty". However, javac thinks that sourcepath is 'new File("")'
    // this may cause problems if we have java code in IDEA working directory
    if (isAnnotationProcessingMode) {
      final int currentSourcesMode = chunk.getSourcesFilter();
      commandLine.add(chunk.getSourcePath(currentSourcesMode == ModuleChunk.TEST_SOURCES? ModuleChunk.ALL_SOURCES : currentSourcesMode));
    }
    else {
      commandLine.add("\"\"");
    }
  }

  if (isAnnotationProcessingMode) {
    commandLine.add("-s");
    commandLine.add(outputPath.replace('/', File.separatorChar));
    final String moduleOutputPath = CompilerPaths.getModuleOutputPath(chunk.getModules()[0], false);
    if (moduleOutputPath != null) {
      commandLine.add("-d");
      commandLine.add(moduleOutputPath.replace('/', File.separatorChar));
    }
  }
  else {
    commandLine.add("-d");
    commandLine.add(outputPath.replace('/', File.separatorChar));
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:56,代码来源:JavacCompiler.java

示例5: appendOutputPath

import com.intellij.openapi.compiler.CompilerPaths; //导入方法依赖的package包/类
private static void appendOutputPath(Module module, PathsList compileClasspath, final boolean forTestClasses) {
  String output = CompilerPaths.getModuleOutputPath(module, forTestClasses);
  if (output != null) {
    compileClasspath.add(FileUtil.toSystemDependentName(output));
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:7,代码来源:GroovyCompilerBase.java


注:本文中的com.intellij.openapi.compiler.CompilerPaths.getModuleOutputPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。