mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
get rid of getPsiRoots() usages since they are indeterminate
This commit is contained in:
+3
-1
@@ -34,6 +34,8 @@ import gnu.trove.TIntProcedure;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ven
|
||||
*/
|
||||
@@ -104,7 +106,7 @@ public class AddOnDemandStaticImportAction extends PsiElementBaseIntentionAction
|
||||
}
|
||||
importList.add(importStaticStatement);
|
||||
|
||||
PsiFile[] roots = file.getPsiRoots();
|
||||
List<PsiFile> roots = file.getViewProvider().getAllFiles();
|
||||
for (final PsiFile root : roots) {
|
||||
PsiElement copy = root.copy();
|
||||
final PsiManager manager = root.getManager();
|
||||
|
||||
@@ -696,7 +696,7 @@ public class ImportHelper{
|
||||
PsiFile context) {
|
||||
String packageName = file.getPackageName();
|
||||
|
||||
final PsiElement[] roots = file.getPsiRoots();
|
||||
final List<PsiFile> roots = file.getViewProvider().getAllFiles();
|
||||
for (PsiElement root : roots) {
|
||||
addNamesToImport(names, comments, root, packageName, context);
|
||||
}
|
||||
|
||||
+1
-1
@@ -153,7 +153,7 @@ public class JavaCodeStyleManagerImpl extends JavaCodeStyleManager {
|
||||
}
|
||||
else {
|
||||
redundants = allImports;
|
||||
final PsiElement[] roots = file.getPsiRoots();
|
||||
final List<PsiFile> roots = file.getViewProvider().getAllFiles();
|
||||
for (PsiElement root : roots) {
|
||||
root.accept(new JavaRecursiveElementWalkingVisitor() {
|
||||
@Override public void visitReferenceElement(PsiJavaCodeReferenceElement reference) {
|
||||
|
||||
Reference in New Issue
Block a user