本文整理汇总了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;
}
示例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);
}
}
}
}
}
示例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;
}
示例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;
}
示例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());
}
示例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());
}
示例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;
}
}
示例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;
}
示例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();
}
示例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());
}
示例12: getAppEngineSystemDir
import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
public static File getAppEngineSystemDir() {
return new File(PathManager.getSystemPath(), "GoogleAppEngine");
}
示例13: getTestLogDir
import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
public static String getTestLogDir() {
return PathManager.getSystemPath() + "/" + LOG_DIR;
}
示例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;
}
示例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;
}