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


Java MavenProjectsManager.isIgnored方法代码示例

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


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

示例1: isAvailable

import org.jetbrains.idea.maven.project.MavenProjectsManager; //导入方法依赖的package包/类
@Override
protected boolean isAvailable(AnActionEvent e) {
  if (!super.isAvailable(e)) return false;

  final DataContext context = e.getDataContext();
  MavenProjectsManager projectsManager = MavenActionUtil.getProjectsManager(context);
  if(projectsManager == null) return false;
  List<MavenProject> projects = MavenActionUtil.getMavenProjects(context);

  if (projects == null || projects.isEmpty()) return false;

  int ignoredStatesCount = 0;
  int ignoredCount = 0;

  for (MavenProject each : projects) {
    if (projectsManager.getIgnoredState(each)) {
      ignoredStatesCount++;
    }
    if (projectsManager.isIgnored(each)) {
      ignoredCount++;
    }
  }

  return (ignoredCount == 0 || ignoredCount == projects.size()) &&
         (ignoredStatesCount == 0 || ignoredStatesCount == projects.size());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:ToggleIgnoredProjectsAction.java

示例2: isIgnoredInSettings

import org.jetbrains.idea.maven.project.MavenProjectsManager; //导入方法依赖的package包/类
private static boolean isIgnoredInSettings(@NotNull MavenProjectsManager projectsManager, List<MavenProject> projects) {
  return projectsManager.isIgnored(projects.get(0)) && !isIgnored(projectsManager, projects);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ToggleIgnoredProjectsAction.java

示例3: isIgnoredProject

import org.jetbrains.idea.maven.project.MavenProjectsManager; //导入方法依赖的package包/类
private static boolean isIgnoredProject(DataContext context) {
  final MavenProject project = MavenActionUtil.getMavenProject(context);
  if (project == null) return false;
  final MavenProjectsManager projectsManager = MavenActionUtil.getProjectsManager(context);
  return projectsManager != null && projectsManager.isIgnored(project);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:AssignShortcutAction.java

示例4: dumpModulesPaths

import org.jetbrains.idea.maven.project.MavenProjectsManager; //导入方法依赖的package包/类
private static File dumpModulesPaths(@NotNull Project project) throws IOException {
  ApplicationManager.getApplication().assertReadAccessAllowed();

  Properties res = new Properties();

  MavenProjectsManager manager = MavenProjectsManager.getInstance(project);

  for (Module module : ModuleManager.getInstance(project).getModules()) {
    if (manager.isMavenizedModule(module)) {
      MavenProject mavenProject = manager.findProject(module);
      if (mavenProject != null && !manager.isIgnored(mavenProject)) {
        res.setProperty(mavenProject.getMavenId().getGroupId()
                        + ':' + mavenProject.getMavenId().getArtifactId()
                        + ":pom"
                        + ':' + mavenProject.getMavenId().getVersion(),
                        mavenProject.getFile().getPath());

        res.setProperty(mavenProject.getMavenId().getGroupId()
                        + ':' + mavenProject.getMavenId().getArtifactId()
                        + ":test-jar"
                        + ':' + mavenProject.getMavenId().getVersion(),
                        mavenProject.getTestOutputDirectory());

        res.setProperty(mavenProject.getMavenId().getGroupId()
                        + ':' + mavenProject.getMavenId().getArtifactId()
                        + ':' + mavenProject.getPackaging()
                        + ':' + mavenProject.getMavenId().getVersion(),
                         mavenProject.getOutputDirectory());

      }
    }
  }

  File file = new File(PathManager.getSystemPath(), "Maven/idea-projects-state-" + project.getLocationHash() + ".properties");
  FileUtil.ensureExists(file.getParentFile());

  OutputStream out = new BufferedOutputStream(new FileOutputStream(file));
  try {
    res.store(out, null);
  }
  finally {
    out.close();
  }

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


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