mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJP-961 allow slow operations in the common cases for the time being
GitOrigin-RevId: 34c4d3a16e01eb560fc9ae284a8e65cedfb9c54c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4a3ef63f04
commit
20be9891bc
+6
-1
@@ -1,10 +1,11 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.ide.structureView.impl.java;
|
||||
|
||||
import com.intellij.ide.structureView.StructureViewTreeElement;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.impl.PsiImplUtil;
|
||||
import com.intellij.psi.impl.light.LightElement;
|
||||
import com.intellij.util.SlowOperations;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.*;
|
||||
@@ -58,6 +59,10 @@ public class JavaClassTreeElement extends JavaClassTreeElementBase<PsiClass> {
|
||||
}
|
||||
|
||||
static LinkedHashSet<PsiElement> getOwnChildren(@NotNull PsiClass aClass) {
|
||||
return SlowOperations.allowSlowOperations(() -> doGetOwnChildren(aClass));
|
||||
}
|
||||
|
||||
private static @NotNull LinkedHashSet<PsiElement> doGetOwnChildren(@NotNull PsiClass aClass) {
|
||||
LinkedHashSet<PsiElement> members = new LinkedHashSet<>();
|
||||
addPhysicalElements(aClass.getFields(), members, aClass);
|
||||
addPhysicalElements(aClass.getMethods(), members, aClass);
|
||||
|
||||
Reference in New Issue
Block a user