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


Java PathManager.getConfigPath方法代码示例

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


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

示例1: doGetSettingsFilePath

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
@NotNull
private static String doGetSettingsFilePath(boolean customLocation) {
  final String vmOptionsFile = System.getProperty("jb.vmOptionsFile");
  if (!StringUtil.isEmptyOrSpaces(vmOptionsFile)) {
    return vmOptionsFile;
  }

  if (SystemInfo.isMac) {
    if (customLocation) {
      return PathManager.getConfigPath() + "/idea.vmoptions";
    }
    else {
      return PathManager.getBinPath() + "/idea.vmoptions";
    }
  }

  final String productName = ApplicationNamesInfo.getInstance().getProductName().toLowerCase(Locale.US);
  final String platformSuffix = SystemInfo.is64Bit ? "64" : "";
  final String osSuffix = SystemInfo.isWindows ? ".exe" : "";
  return PathManager.getBinPath() + File.separatorChar + productName + platformSuffix + osSuffix + ".vmoptions";
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:VMOptions.java

示例2: copyFiles

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
private void copyFiles(ArrayList<File> files) {
    String configPath = PathManager.getConfigPath();
    createFolder(configPath + "/codestyles");

    for(File file : files) {
        try {
            copyFile(file, new File(configPath + "/codestyles/" + file.getName()));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
 
开发者ID:DanielMartinus,项目名称:IntelliJ-codestyle-sync,代码行数:13,代码来源:CodeStyleManager.java

示例3: PyStudyInitialConfigurator

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
/**
 * @noinspection UnusedParameters
 */
public PyStudyInitialConfigurator(MessageBus bus,
                                  CodeInsightSettings codeInsightSettings,
                                  final PropertiesComponent propertiesComponent,
                                  FileTypeManager fileTypeManager,
                                  final ProjectManagerEx projectManager) {
  if (!propertiesComponent.getBoolean(CONFIGURED_V40)) {
    final File courses = new File(PathManager.getConfigPath(), "courses");
    FileUtil.delete(courses);
    propertiesComponent.setValue(CONFIGURED_V40, "true");
  }
}
 
开发者ID:medvector,项目名称:educational-plugin,代码行数:15,代码来源:PyStudyInitialConfigurator.java

示例4: getMapDirectory

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
private static File getMapDirectory() {
  File dir = new File(PathManager.getConfigPath() + File.separator + "migration");

  if (!dir.exists()){
    if (!dir.mkdir()){
      LOG.error("cannot create directory: " + dir.getAbsolutePath());
      return null;
    }

    for (int i = 0; i < DEFAULT_MAPS.length; i++) {
      String defaultTemplate = DEFAULT_MAPS[i];
      URL url = MigrationMapSet.class.getResource(defaultTemplate);
      LOG.assertTrue(url != null);
      String fileName = defaultTemplate.substring(defaultTemplate.lastIndexOf("/") + 1);
      File targetFile = new File(dir, fileName);

      try {
        FileOutputStream outputStream = new FileOutputStream(targetFile);
        InputStream inputStream = url.openStream();

        try {
          FileUtil.copy(inputStream, outputStream);
        }
        finally {
          outputStream.close();
          inputStream.close();
        }
      }
      catch (Exception e) {
        LOG.error(e);
      }
    }
  }

  return dir;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:37,代码来源:MigrationMapSet.java

示例5: getDefaultUserDataPath

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
private static String getDefaultUserDataPath() {
  File dir = new File(PathManager.getConfigPath(), "chrome-user-data");
  try {
    return FileUtil.toSystemIndependentName(dir.getCanonicalPath());
  }
  catch (IOException e) {
    return FileUtil.toSystemIndependentName(dir.getAbsolutePath());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ChromeSettingsConfigurable.java

示例6: lockSystemFolders

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
private synchronized static boolean lockSystemFolders(String[] args) {
  if (ourLock != null) {
    throw new AssertionError();
  }

  ourLock = new SocketLock(PathManager.getConfigPath(), PathManager.getSystemPath());

  SocketLock.ActivateStatus status;
  try {
    status = ourLock.lock(args);
  }
  catch (Exception e) {
    Main.showMessage("Cannot Lock System Folders", e);
    return false;
  }

  if (status == SocketLock.ActivateStatus.NO_INSTANCE) {
    ShutDownTracker.getInstance().registerShutdownTask(new Runnable() {
      @Override
      public void run() {
        ourLock.dispose();
      }
    });
    return true;
  }
  else if (Main.isHeadless() || status == SocketLock.ActivateStatus.CANNOT_ACTIVATE) {
    String message = "Only one instance of " + ApplicationNamesInfo.getInstance().getFullProductName() + " can be run at a time.";
    Main.showMessage("Too Many Instances", message, true);
  }

  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:StartupUtil.java

示例7: getArchiveFile

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
private File getArchiveFile(String postfix) {
  File tasksFolder = new File(PathManager.getConfigPath(), TASKS_FOLDER);
  if (!tasksFolder.exists()) {
    //noinspection ResultOfMethodCallIgnored
    tasksFolder.mkdirs();
  }
  String projectName = FileUtil.sanitizeFileName(myProject.getName());
  return new File(tasksFolder, projectName + postfix);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:WorkingContextManager.java

示例8: getCustomTemplatesPath

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
@NotNull
static String getCustomTemplatesPath() {
  return PathManager.getConfigPath() + "/projectTemplates";
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ArchivedTemplatesFactory.java

示例9: saveDisabledPlugins

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
public static void saveDisabledPlugins(@NotNull Collection<String> ids, boolean append) throws IOException {
  File plugins = new File(PathManager.getConfigPath(), DISABLED_PLUGINS_FILENAME);
  savePluginsList(ids, append, plugins);
  ourDisabledPlugins = null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:PluginManagerCore.java

示例10: actionPerformed

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
@Override
public void actionPerformed(AnActionEvent event) {
    String configPath = PathManager.getConfigPath();

    VirtualFile file = LocalFileSystem.getInstance().findFileByPath(configPath);

    Project project = event.getData(PlatformDataKeys.PROJECT);






    new ExampleCopyResourcesFolderForm(project);
}
 
开发者ID:alvaromarco,项目名称:CleanArchitecturePlugin,代码行数:16,代码来源:ExampleCopyResourcesFolder.java

示例11: ExampleCopyResourcesFolderForm

import com.intellij.openapi.application.PathManager; //导入方法依赖的package包/类
public ExampleCopyResourcesFolderForm(Project project) {
    super("ExampleCopyResourcesFolderForm");

    this.project = project;



    String configPath = PathManager.getConfigPath();


    VirtualFile file = LocalFileSystem.getInstance().findFileByPath(configPath);

    VirtualFile templatesFolder = null; // folder with templates in android (dest)

    for (VirtualFile children : file.getChildren()) {
        if (children.getName().equals("fileTemplates")) {
            templatesFolder = children;
            break;
        }
    }

    if (templatesFolder != null) { // Copy templates files in template folder

    }





}
 
开发者ID:alvaromarco,项目名称:CleanArchitecturePlugin,代码行数:31,代码来源:ExampleCopyResourcesFolderForm.java


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