mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-CR-13656 AntIntrospector.java: ContainerUtil.isEmpty() used; AntExplorer: better linebreaks
This commit is contained in:
@@ -18,6 +18,7 @@ package com.intellij.lang.ant;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.util.Alarm;
|
||||
import com.intellij.util.ReflectionUtil;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.apache.tools.ant.IntrospectionHelper;
|
||||
import org.apache.tools.ant.TaskContainer;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
@@ -90,7 +91,7 @@ public final class AntIntrospector {
|
||||
|
||||
public Set<String> getExtensionPointTypes() {
|
||||
final List<Method> methods = invokeMethod("getExtensionPoints", true);
|
||||
if (methods == null || methods.isEmpty()) {
|
||||
if (ContainerUtil.isEmpty(methods)) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
return methods.stream().map(Method::getParameterTypes).flatMap(Arrays::stream).map(Class::getName).collect(Collectors.toSet());
|
||||
|
||||
@@ -345,9 +345,11 @@ public class AntExplorer extends SimpleToolWindowPanel implements DataProvider,
|
||||
}
|
||||
|
||||
private static AntBuildTarget[] getTargetObjectsFromPaths(TreePath[] paths) {
|
||||
return Arrays.stream(paths).map(path -> ((DefaultMutableTreeNode)path.getLastPathComponent()).getUserObject())
|
||||
return Arrays.stream(paths)
|
||||
.map(path -> ((DefaultMutableTreeNode)path.getLastPathComponent()).getUserObject())
|
||||
.filter(userObject -> userObject instanceof AntTargetNodeDescriptor)
|
||||
.map(userObject -> ((AntTargetNodeDescriptor)userObject).getTarget()).toArray(AntBuildTarget[]::new);
|
||||
.map(userObject -> ((AntTargetNodeDescriptor)userObject).getTarget())
|
||||
.toArray(AntBuildTarget[]::new);
|
||||
}
|
||||
|
||||
public boolean isBuildFileSelected() {
|
||||
|
||||
Reference in New Issue
Block a user