本文整理汇总了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());
}
示例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);
}
示例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);
}
示例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;
}