本文整理匯總了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;
}