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


Java PathManager.getSystemPath方法代码示例

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


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

示例1: doCreateDeploymentRuntime

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
@Override
protected CloudDeploymentRuntime doCreateDeploymentRuntime(ArtifactDeploymentSource artifactSource,
                                                           File artifactFile,
                                                           CloudMultiSourceServerRuntimeInstance serverRuntime,
                                                           DeploymentTask<? extends CloudDeploymentNameConfiguration> deploymentTask,
                                                           DeploymentLogManager logManager) throws ServerRuntimeException {
  RepositoryDeploymentConfiguration config = (RepositoryDeploymentConfiguration)deploymentTask.getConfiguration();

  String repositoryPath = config.getRepositoryPath();
  File repositoryRootFile;
  if (StringUtil.isEmpty(repositoryPath)) {
    File repositoryParentFolder = new File(PathManager.getSystemPath(), "cloud-git-artifact-deploy");
    repositoryRootFile = FileUtil.findSequentNonexistentFile(repositoryParentFolder, artifactFile.getName(), "");
  }
  else {
    repositoryRootFile = new File(repositoryPath);
  }

  if (!FileUtil.createDirectory(repositoryRootFile)) {
    throw new ServerRuntimeException("Unable to create deploy folder: " + repositoryRootFile);
  }
  config.setRepositoryPath(repositoryRootFile.getAbsolutePath());
  return doCreateDeploymentRuntime(artifactSource, artifactFile, serverRuntime, deploymentTask, logManager, repositoryRootFile);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:RepositoryArtifactDeploymentRuntimeProviderBase.java

示例2: handleSpacesInPath

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
@Nullable
private static String handleSpacesInPath(String agentPath) {
  if (agentPath.contains(" ")) {
    final File dir = new File(PathManager.getSystemPath(), "groovyHotSwap");
    if (dir.getAbsolutePath().contains(" ")) {
      LOG.info("Groovy hot-swap not used since the agent path contains spaces: " + agentPath + "\n" +
               "One can move the agent to a directory with no spaces in path and specify its path in <IDEA dist>/bin/idea.properties as " + GROOVY_HOTSWAP_AGENT_PATH + "=<path>");
      return null;
    }

    final File toFile = new File(dir, "gragent.jar");
    try {
      FileUtil.copy(new File(agentPath), toFile);
      return toFile.getPath();
    }
    catch (IOException e) {
      LOG.info(e);
    }
  }
  return agentPath;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:GroovyHotSwapper.java

示例3: copyIDEALicense

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
public static void copyIDEALicense(final String sandboxHome) {
  File sandboxSystemPath = new File(sandboxHome, "system");
  File systemPath = new File(PathManager.getSystemPath());
  File[] runningIdeaLicenses = systemPath.listFiles(new PatternFilenameFilter("idea\\d+\\.key"));
  if (runningIdeaLicenses != null) {
    for (File license : runningIdeaLicenses) {
      File devIdeaLicense = new File(sandboxSystemPath, license.getName());
      if (!devIdeaLicense.exists()) {
        try {
          FileUtil.copy(license, devIdeaLicense);
        }
        catch (IOException e) {
          LOG.error(e);
        }
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:IdeaLicenseHelper.java

示例4: getStorageDirectory

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
@NotNull
private File getStorageDirectory() {
  String dirName = myProject.getName() + "."+Integer.toHexString(myProject.getPresentableUrl().hashCode());
  File dir = new File(PathManager.getSystemPath(), "refs/" + dirName);
  FileUtil.createDirectory(dir);
  return dir;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:RefResolveServiceImpl.java

示例5: saveCommitMessage

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
protected File saveCommitMessage() throws VcsException {
  File systemDir = new File(PathManager.getSystemPath());
  File tempFile = new File(systemDir, TEMP_FILE_NAME);
  try {
    FileUtil.writeToFile(tempFile, myMessage.getBytes(myCharset));
  }
  catch (IOException e) {
    throw new VcsException("Couldn't prepare commit message", e);
  }
  return tempFile;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:HgCommitTypeCommand.java

示例6: readDataFileProviderAttribute

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
public static CoverageFileProvider readDataFileProviderAttribute(Element element) {
  final String sourceProvider = element.getAttributeValue(SOURCE_PROVIDER);
  final String relativePath = FileUtil.toSystemDependentName(element.getAttributeValue(FILE_PATH));
  final File file = new File(relativePath);
  return new DefaultCoverageFileProvider(file.exists() ? file
                                                       : new File(PathManager.getSystemPath(), relativePath),
                                          sourceProvider != null ? sourceProvider
                                                                 : DefaultCoverageFileProvider.class.getName());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:BaseCoverageSuite.java

示例7: test

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
public void test() throws Exception {
  File locatorFile = new File(PathManager.getSystemPath() + "/" + ApplicationEx.LOCATOR_FILE_NAME);
  assertTrue("doesn't exist: " + locatorFile.getPath(), locatorFile.exists());
  assertTrue("can't read: " + locatorFile.getPath(), locatorFile.canRead());

  String home = FileUtil.loadFile(locatorFile, CharsetToolkit.UTF8_CHARSET);
  assertTrue(home, StringUtil.isNotEmpty(home));

  assertEquals(home, PathManager.getHomePath());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:LocatorTest.java

示例8: getCacheDir

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
@NotNull
public static File getCacheDir(@NotNull String userName, @NotNull String repositoryName) {
  File generatorsDir = new File(PathManager.getSystemPath(), "projectGenerators");
  String dirName = formatGithubRepositoryName(userName, repositoryName);
  File dir = new File(generatorsDir, dirName);
  try {
    return dir.getCanonicalFile();
  } catch (IOException e) {
    return dir;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:GithubDownloadUtil.java

示例9: createCoverageFile

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
@Nullable
@NonNls
protected String createCoverageFile() {
  if (myCoverageRunner == null) {
    return null;
  }

  @NonNls final String coverageRootPath = PathManager.getSystemPath() + File.separator + "coverage";
  final String path = coverageRootPath + File.separator + myProject.getName() + coverageFileNameSeparator()
                      + FileUtil.sanitizeFileName(myConfiguration.getName()) + ".coverage";

  new File(coverageRootPath).mkdirs();
  return path;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:CoverageEnabledConfiguration.java

示例10: baseTestDiscoveryPathForProject

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
@NotNull
public static String baseTestDiscoveryPathForProject(Project project) {
  return PathManager.getSystemPath() + File.separator + "testDiscovery" + File.separator + project.getName() + "." + project.getLocationHash();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:TestDiscoveryExtension.java

示例11: getStoreDirectory

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
private static File getStoreDirectory(ClientLibraryDescription description) {
  return new File(PathManager.getSystemPath(), "remote-server-libraries/" + description.getId());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ClientLibraryManagerImpl.java

示例12: getAppEngineSystemDir

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
public static File getAppEngineSystemDir() {
  return new File(PathManager.getSystemPath(), "GoogleAppEngine");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:AppEngineUtil.java

示例13: getTestLogDir

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
public static String getTestLogDir() {
  return PathManager.getSystemPath() + "/" + LOG_DIR;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:TestLoggerFactory.java

示例14: getJarsDir

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
@NotNull
private static String getJarsDir() {
  String dir = System.getProperty("jars_dir");
  return dir == null ? PathManager.getSystemPath() + File.separatorChar + JARS_FOLDER : dir;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:JarHandler.java

示例15: getCacheBasePath

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
public File getCacheBasePath() {
  File file = new File(PathManager.getSystemPath(), VCS_CACHE_PATH);
  file = new File(file, myProject.getLocationHash());
  return file;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:CachesHolder.java


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