com.intellij.openapi.project.Project.save()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中com.intellij.openapi.project.Project.save()方法的一些代码示例,展示了Project.save()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.save()方法的具体详情如下:
包路径:com.intellij.openapi.project.Project
类名称:Project
方法名:save

Project.save介绍

暂无

代码示例

代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin

@NotNull
private static EditorNotificationPanel createPanel(@NotNull Project project, @NotNull Module module) {
 EditorNotificationPanel panel = new EditorNotificationPanel();
 panel.setText("'" + module.getName() + "' is not Go Module, some code insight might not work here");
 panel.createActionLabel("Change module type to Go and reload project", () -> {
  int message = Messages.showOkCancelDialog(project, "Updating module type requires project reload. Proceed?", "Update Module Type",
                       "Reload project", "Cancel", null);
  if (message == Messages.YES) {
   module.setOption(Module.ELEMENT_TYPE, GoModuleType.getInstance().getId());
   project.save();
   EditorNotifications.getInstance(project).updateAllNotifications();
   ProjectManager.getInstance().reloadProject(project);
  }
 });
 panel.createActionLabel("Don't show again for this module", () -> {
  Set<String> ignoredModules = getIgnoredModules(project);
  ignoredModules.add(module.getName());
  PropertiesComponent.getInstance(project).setValue(DONT_ASK_TO_CHANGE_MODULE_TYPE_KEY, StringUtil.join(ignoredModules, ","));
  EditorNotifications.getInstance(project).updateAllNotifications();
 });
 return panel;
}

代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij

@Override
 public void run() {
  project.save();
 }
},

代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij

private static void uploadProjectToGoogleCloud(
  @NotNull final Project project, @Nullable final VirtualFile file) {
 BasicAction.saveAll();
 project.save();

相关文章