mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 11:53:49 +07:00
prefer jdk collections
GitOrigin-RevId: 9acc775503ce119cff6b273c09ce53cebc72e35f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d5c0240b2e
commit
677ac976ba
@@ -5,23 +5,19 @@ import com.intellij.ide.util.treeView.AbstractTreeNode;
|
||||
import com.intellij.ide.util.treeView.smartTree.*;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.util.PlatformIcons;
|
||||
import gnu.trove.THashMap;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
public class PropertiesGrouper implements Grouper{
|
||||
public final class PropertiesGrouper implements Grouper {
|
||||
@NonNls public static final String ID = "SHOW_PROPERTIES";
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public Collection<Group> group(@NotNull AbstractTreeNode<?> parent, @NotNull Collection<TreeElement> children) {
|
||||
if (parent.getValue() instanceof PropertyGroup) return Collections.emptyList();
|
||||
Map<Group,Group> result = new THashMap<>();
|
||||
Map<Group,Group> result = new HashMap<>();
|
||||
for (TreeElement o : children) {
|
||||
if (o instanceof JavaClassTreeElementBase) {
|
||||
PsiElement element = ((JavaClassTreeElementBase)o).getElement();
|
||||
|
||||
@@ -10,16 +10,16 @@ import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiMethod;
|
||||
import com.intellij.psi.PsiModifier;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import gnu.trove.THashMap;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class SuperTypesGrouper implements Grouper{
|
||||
public final class SuperTypesGrouper implements Grouper{
|
||||
public static final Key<WeakReference<PsiMethod>> SUPER_METHOD_KEY = Key.create("StructureTreeBuilder.SUPER_METHOD_KEY");
|
||||
@NonNls public static final String ID = "SHOW_INTERFACES";
|
||||
|
||||
@@ -27,7 +27,7 @@ public class SuperTypesGrouper implements Grouper{
|
||||
@NotNull
|
||||
public Collection<Group> group(@NotNull AbstractTreeNode<?> parent, @NotNull Collection<TreeElement> children) {
|
||||
if (isParentGrouped(parent)) return Collections.emptyList();
|
||||
Map<Group, SuperTypeGroup> groups = new THashMap<>();
|
||||
Map<Group, SuperTypeGroup> groups = new HashMap<>();
|
||||
|
||||
for (TreeElement child : children) {
|
||||
if (child instanceof PsiMethodTreeElement) {
|
||||
|
||||
Reference in New Issue
Block a user