mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-211555 Freeze on completion in XML file
do not process xincludes in ExtensionDomExtender GitOrigin-RevId: d631dcd52d5bf500b61960473e16237008ad02a3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0b14159f9f
commit
f9664fc455
@@ -84,9 +84,7 @@ public class CompilerManagerImpl extends CompilerManager {
|
||||
}
|
||||
|
||||
for (InspectionValidator validator : InspectionValidator.EP_NAME.getExtensionList(project)) {
|
||||
addCompiler(
|
||||
new InspectionValidatorWrapper(this, InspectionManager.getInstance(project), InspectionProjectProfileManager.getInstance(project),
|
||||
PsiDocumentManager.getInstance(project), PsiManager.getInstance(project), validator));
|
||||
addCompiler(new InspectionValidatorWrapper(this, InspectionManager.getInstance(project), InspectionProjectProfileManager.getInstance(project), PsiDocumentManager.getInstance(project), PsiManager.getInstance(project), validator));
|
||||
}
|
||||
addCompilableFileType(StdFileTypes.JAVA);
|
||||
|
||||
@@ -158,10 +156,15 @@ public class CompilerManagerImpl extends CompilerManager {
|
||||
@Override
|
||||
@NotNull
|
||||
public <T extends Compiler> T[] getCompilers(@NotNull Class<T> compilerClass) {
|
||||
return getCompilers(compilerClass, CompilerFilter.ALL);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private <T extends Compiler> T[] getCompilers(@NotNull Class<T> compilerClass, CompilerFilter filter) {
|
||||
final List<T> compilers = new ArrayList<>(myCompilers.size());
|
||||
for (final Compiler item : myCompilers) {
|
||||
T concreteCompiler = ObjectUtils.tryCast(item, compilerClass);
|
||||
if (concreteCompiler != null) {
|
||||
if (concreteCompiler != null && filter.acceptCompiler(concreteCompiler)) {
|
||||
compilers.add(concreteCompiler);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2019 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-2018 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.compiler.backwardRefs;
|
||||
|
||||
import com.intellij.ProjectTopics;
|
||||
@@ -37,7 +37,10 @@ import gnu.trove.THashSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
@@ -47,10 +50,8 @@ public class DirtyScopeHolder extends UserDataHolderBase implements BulkFileList
|
||||
private final PsiDocumentManager myPsiDocManager;
|
||||
private final Object myLock = new Object();
|
||||
|
||||
private final Set<Module> myVFSChangedModules = new HashSet<>(); // guarded by myLock
|
||||
|
||||
private final Set<Module> myChangedModulesDuringCompilation = new HashSet<>(); // guarded by myLock
|
||||
|
||||
private final Set<Module> myVFSChangedModules = ContainerUtil.newHashSet(); // guarded by myLock
|
||||
private final Set<Module> myChangedModulesDuringCompilation = ContainerUtil.newHashSet(); // guarded by myLock
|
||||
private final List<ExcludeEntryDescription> myExcludedDescriptions = new SmartList<>(); // guarded by myLock
|
||||
private boolean myCompilationPhase; // guarded by myLock
|
||||
private volatile GlobalSearchScope myExcludedFilesScope; // calculated outside myLock
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2019 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-2017 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.compiler.impl;
|
||||
|
||||
import com.intellij.openapi.compiler.CompileContext;
|
||||
@@ -12,11 +12,11 @@ import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.newvfs.RefreshQueue;
|
||||
import com.intellij.util.PathUtil;
|
||||
import com.intellij.util.ThrowableRunnable;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
|
||||
/**
|
||||
* @author Jeka
|
||||
@@ -50,7 +50,7 @@ public class CompilerUtil {
|
||||
*/
|
||||
public static void refreshOutputRoots(@NotNull Collection<String> outputRoots) {
|
||||
LocalFileSystem fs = LocalFileSystem.getInstance();
|
||||
Collection<VirtualFile> toRefresh = new HashSet<>();
|
||||
Collection<VirtualFile> toRefresh = ContainerUtil.newHashSet();
|
||||
|
||||
for (String outputRoot : outputRoots) {
|
||||
FileAttributes attributes = FileSystemUtil.getAttributes(FileUtil.toSystemDependentName(outputRoot));
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
// Copyright 2000-2019 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-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.compiler.impl;
|
||||
|
||||
import com.intellij.util.containers.EmptyIterator;
|
||||
@@ -14,7 +28,7 @@ import java.util.Stack;
|
||||
* @author Eugene Zhuravlev
|
||||
*/
|
||||
public class TreeBasedMap<T> {
|
||||
private Node<T> myRoot = new Node<>();
|
||||
private Node<T> myRoot = new Node<T>();
|
||||
private final StringInterner myInterner;
|
||||
private final char mySeparator;
|
||||
private int mySize = 0;
|
||||
@@ -82,10 +96,10 @@ public class TreeBasedMap<T> {
|
||||
@NotNull
|
||||
private Node<T> addChild(final StringInterner table, final String text, final int nameStartIndex, final int nameEndIndex) {
|
||||
if (myChildren == null) {
|
||||
myChildren = new HashMap<>(3, 0.95f);
|
||||
myChildren = new HashMap<String, Node<T>>(3, 0.95f);
|
||||
}
|
||||
|
||||
Node<T> newChild = new Node<>();
|
||||
Node<T> newChild = new Node<T>();
|
||||
final String key = table.intern(text.substring(nameStartIndex, nameEndIndex));
|
||||
myChildren.put(key, newChild);
|
||||
|
||||
@@ -132,7 +146,7 @@ public class TreeBasedMap<T> {
|
||||
}
|
||||
|
||||
public void removeAll() {
|
||||
myRoot = new Node<>();
|
||||
myRoot = new Node<T>();
|
||||
}
|
||||
|
||||
public Iterator<String> getKeysIterator() {
|
||||
@@ -141,7 +155,7 @@ public class TreeBasedMap<T> {
|
||||
|
||||
|
||||
private class KeysIterator implements Iterator<String> {
|
||||
private final Stack<PathElement<T>> myCurrentNodePath = new Stack<>();
|
||||
private final Stack<PathElement<T>> myCurrentNodePath = new Stack<PathElement<T>>();
|
||||
private final StringBuilder myCurrentName = new StringBuilder();
|
||||
|
||||
KeysIterator() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2019 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-2018 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.compiler.options;
|
||||
|
||||
import com.intellij.codeInsight.NullableNotNullDialog;
|
||||
@@ -129,7 +129,7 @@ public class CompilerUIConfigurable implements SearchableConfigurable, Configura
|
||||
}
|
||||
}
|
||||
|
||||
Map<Setting, Collection<JComponent>> controls = new HashMap<>();
|
||||
Map<Setting, Collection<JComponent>> controls = ContainerUtilRt.newHashMap();
|
||||
controls.put(Setting.RESOURCE_PATTERNS, ContainerUtilRt.newArrayList(myResourcePatternsLabel, myResourcePatternsField, myPatternLegendLabel));
|
||||
controls.put(Setting.CLEAR_OUTPUT_DIR_ON_REBUILD, Collections.singleton(myCbClearOutputDirectory));
|
||||
controls.put(Setting.ADD_NOT_NULL_ASSERTIONS, Collections.singleton(myAssertNotNullPanel));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2019 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-2018 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.compiler.server;
|
||||
|
||||
import com.intellij.ide.highlighter.JavaFileType;
|
||||
@@ -91,7 +91,7 @@ public abstract class DefaultMessageHandler implements BuilderMessageHandler {
|
||||
final boolean isRemoved = task.getIsFieldRemoved();
|
||||
boolean canceled = false;
|
||||
final Ref<Boolean> isSuccess = Ref.create(Boolean.TRUE);
|
||||
final Set<String> affectedPaths = Collections.synchronizedSet(new HashSet<>()); // PsiSearchHelper runs multiple threads
|
||||
final Set<String> affectedPaths = Collections.synchronizedSet(new HashSet<String>()); // PsiSearchHelper runs multiple threads
|
||||
final long searchStart = System.currentTimeMillis();
|
||||
try {
|
||||
if (myConstantSearchTime > CONSTANT_SEARCH_TIME_LIMIT) {
|
||||
|
||||
+8
-4
@@ -14,13 +14,17 @@ import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.util.PathUtil;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.io.URLUtil;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.*;
|
||||
import java.util.Enumeration;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.jar.JarFile;
|
||||
|
||||
/**
|
||||
@@ -52,7 +56,7 @@ public class BuildProcessClasspathManager {
|
||||
}
|
||||
|
||||
private static List<String> computeCompileServerPluginsClasspath() {
|
||||
final List<String> classpath = new ArrayList<>();
|
||||
final List<String> classpath = ContainerUtil.newArrayList();
|
||||
|
||||
for (CompileServerPlugin serverPlugin : CompileServerPlugin.EP_NAME.getExtensions()) {
|
||||
final PluginId pluginId = serverPlugin.getPluginDescriptor().getPluginId();
|
||||
@@ -144,7 +148,7 @@ public class BuildProcessClasspathManager {
|
||||
}
|
||||
|
||||
private static List<String> getDynamicClasspath(Project project) {
|
||||
final List<String> classpath = new ArrayList<>();
|
||||
final List<String> classpath = ContainerUtil.newArrayList();
|
||||
for (BuildProcessParametersProvider provider : BuildProcessParametersProvider.EP_NAME.getExtensionList(project)) {
|
||||
classpath.addAll(provider.getClassPath());
|
||||
}
|
||||
@@ -152,7 +156,7 @@ public class BuildProcessClasspathManager {
|
||||
}
|
||||
|
||||
public static List<String> getLauncherClasspath(Project project) {
|
||||
final List<String> classpath = new ArrayList<>();
|
||||
final List<String> classpath = ContainerUtil.newArrayList();
|
||||
for (BuildProcessParametersProvider provider : BuildProcessParametersProvider.EP_NAME.getExtensionList(project)) {
|
||||
classpath.addAll(provider.getLauncherClassPath());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user