mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 10:20:15 +07:00
IJPL-148294 extract vcs functionality from java plugin to separate modules (so, for example, SH tests can be executed without VCS)
GitOrigin-RevId: f19565ca367bc668cefaafde0dc2209c5b2c3eba
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0590da61da
commit
9e23996158
2
.idea/modules.xml
generated
2
.idea/modules.xml
generated
@@ -805,6 +805,8 @@
|
||||
<module fileurl="file://$PROJECT_DIR$/uast/uast-java-ide/intellij.java.uast.ide.iml" filepath="$PROJECT_DIR$/uast/uast-java-ide/intellij.java.uast.ide.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/java/idea-ui/intellij.java.ui.iml" filepath="$PROJECT_DIR$/java/idea-ui/intellij.java.ui.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/java/idea-ui/intellij.java.ui.tests.iml" filepath="$PROJECT_DIR$/java/idea-ui/intellij.java.ui.tests.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/java/unscramble/intellij.java.unscramble.iml" filepath="$PROJECT_DIR$/java/unscramble/intellij.java.unscramble.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/java/vcs/intellij.java.vcs.iml" filepath="$PROJECT_DIR$/java/vcs/intellij.java.vcs.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/javaFX/intellij.javaFX.iml" filepath="$PROJECT_DIR$/plugins/javaFX/intellij.javaFX.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/javaFX/common-javaFX-plugin/intellij.javaFX.common.iml" filepath="$PROJECT_DIR$/plugins/javaFX/common-javaFX-plugin/intellij.javaFX.common.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/javaFX/javaFX-CE/intellij.javaFX.community.iml" filepath="$PROJECT_DIR$/plugins/javaFX/javaFX-CE/intellij.javaFX.community.iml" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.debugger.impl;
|
||||
|
||||
import com.intellij.debugger.*;
|
||||
@@ -12,6 +12,7 @@ import com.intellij.debugger.jdi.ThreadReferenceProxyImpl;
|
||||
import com.intellij.debugger.ui.breakpoints.Breakpoint;
|
||||
import com.intellij.debugger.ui.breakpoints.BreakpointWithHighlighter;
|
||||
import com.intellij.debugger.ui.breakpoints.LineBreakpoint;
|
||||
import com.intellij.diagnostic.ThreadDumper;
|
||||
import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.execution.configurations.RemoteConnection;
|
||||
import com.intellij.execution.configurations.RemoteState;
|
||||
@@ -40,7 +41,6 @@ import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.impl.search.JavaVersionBasedScope;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.reference.SoftReference;
|
||||
import com.intellij.unscramble.ThreadState;
|
||||
import com.intellij.util.Alarm;
|
||||
import com.intellij.util.TimeoutUtil;
|
||||
import com.intellij.util.concurrency.ThreadingAssertions;
|
||||
@@ -549,7 +549,7 @@ public final class DebuggerSession implements AbstractDebuggerSession {
|
||||
}
|
||||
else {
|
||||
// heuristics: try to pre-select EventDispatchThread
|
||||
currentThread = ContainerUtil.find(allThreads, thread -> ThreadState.isEDT(thread.name()));
|
||||
currentThread = ContainerUtil.find(allThreads, thread -> ThreadDumper.isEDT(thread.name()));
|
||||
if (currentThread == null) {
|
||||
// heuristics: try to pre-select the main thread
|
||||
currentThread = ContainerUtil.find(allThreads, thread -> "main".equals(thread.name()));
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
<orderEntry type="module" module-name="intellij.jsp.spi" />
|
||||
<orderEntry type="module" module-name="intellij.java.execution" />
|
||||
<orderEntry type="module" module-name="intellij.xml.dom.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.vcs.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.icons" />
|
||||
<orderEntry type="module" module-name="intellij.java.psi.impl" exported="" />
|
||||
<orderEntry type="module" module-name="intellij.java.frontback.impl" exported="" />
|
||||
|
||||
@@ -1239,7 +1239,6 @@
|
||||
order="before moveJavaFileOrDir"/>
|
||||
<refactoring.copyHandler implementation="com.intellij.refactoring.copy.CopyClassesHandler" order="before copyFilesOrDirectories"/>
|
||||
<saveFileAsTemplateHandler implementation="com.intellij.ide.fileTemplates.SaveJavaAsTemplateHandler"/>
|
||||
<exceptionFilter implementation="com.intellij.openapi.vcs.contentAnnotation.VcsContentAnnotationExceptionFilterFactory"/>
|
||||
<packageDependencies.visitor language="JAVA" implementationClass="com.intellij.packageDependencies.JavaDependencyVisitorFactory"/>
|
||||
<pathMacroFilter implementation="com.intellij.execution.configuration.JavaRunConfigurationPathMacroFilter"/>
|
||||
<bookmarkProvider implementation="com.intellij.ide.bookmark.providers.PackageBookmarkProvider"/>
|
||||
|
||||
@@ -88,5 +88,6 @@
|
||||
<orderEntry type="module" module-name="intellij.junit.java.tests" scope="TEST" />
|
||||
<orderEntry type="module" module-name="intellij.platform.util.coroutines" scope="TEST" />
|
||||
<orderEntry type="module" module-name="intellij.platform.navbar.testFramework" scope="TEST" />
|
||||
<orderEntry type="module" module-name="intellij.java.unscramble" scope="TEST" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -35,6 +35,8 @@
|
||||
<module name="intellij.java.structuralSearch"/>
|
||||
<module name="intellij.java.featuresTrainer"/>
|
||||
<module name="intellij.java.performancePlugin"/>
|
||||
<module name="intellij.java.unscramble"/>
|
||||
<module name="intellij.java.vcs"/>
|
||||
</content>
|
||||
|
||||
<depends optional="true" config-file="intellij.java.remoteServers.impl.xml">com.intellij.modules.remoteServers</depends>
|
||||
|
||||
20
java/unscramble/intellij.java.unscramble.iml
Normal file
20
java/unscramble/intellij.java.unscramble.iml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="intellij.platform.execution" />
|
||||
<orderEntry type="module" module-name="intellij.platform.util.ui" />
|
||||
<orderEntry type="module" module-name="intellij.platform.ide" />
|
||||
<orderEntry type="module" module-name="intellij.java" />
|
||||
<orderEntry type="module" module-name="intellij.platform.vcs.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.lang.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.core.ui" />
|
||||
<orderEntry type="module" module-name="intellij.java.impl" />
|
||||
</component>
|
||||
</module>
|
||||
11
java/unscramble/resources/intellij.java.unscramble.xml
Normal file
11
java/unscramble/resources/intellij.java.unscramble.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<idea-plugin>
|
||||
<dependencies>
|
||||
<module name="intellij.platform.vcs.impl"/>
|
||||
</dependencies>
|
||||
|
||||
<actions resource-bundle="messages.ActionsBundle">
|
||||
<action id="Unscramble" class="com.intellij.unscramble.UnscrambleAction" overrides="true">
|
||||
<override-text place="EditorPopup"/>
|
||||
</action>
|
||||
</actions>
|
||||
</idea-plugin>
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2016 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.
|
||||
*/
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.unscramble;
|
||||
|
||||
import com.intellij.diagnostic.IdeErrorsDialog;
|
||||
@@ -27,10 +13,7 @@ import com.intellij.openapi.project.DumbAware;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Konstantin Bulenkov
|
||||
*/
|
||||
public final class UnscrambleAction extends AnAction implements DumbAware {
|
||||
final class UnscrambleAction extends AnAction implements DumbAware {
|
||||
static {
|
||||
ApplicationManager.getApplication().getMessageBus().connect().subscribe(ApplicationActivationListener.TOPIC, new UnscrambleListener());
|
||||
}
|
||||
@@ -40,14 +40,12 @@ import java.io.StringReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.intellij.util.containers.ContainerUtil.ar;
|
||||
|
||||
public class UnscrambleDialog extends DialogWrapper {
|
||||
private static final @NonNls String PROPERTY_LOG_FILE_HISTORY_URLS = "UNSCRAMBLE_LOG_FILE_URL";
|
||||
private static final @NonNls String PROPERTY_LOG_FILE_LAST_URL = "UNSCRAMBLE_LOG_FILE_LAST_URL";
|
||||
private static final @NonNls String PROPERTY_UNSCRAMBLER_NAME_USED = "UNSCRAMBLER_NAME_USED";
|
||||
private static final Condition<ThreadState> DEADLOCK_CONDITION = state -> state.isDeadlocked();
|
||||
private static final String[] IMPORTANT_THREAD_DUMP_WORDS = ar("tid", "nid", "wait", "parking", "prio", "os_prio", "java");
|
||||
private static final String[] IMPORTANT_THREAD_DUMP_WORDS = ContainerUtil.ar("tid", "nid", "wait", "parking", "prio", "os_prio", "java");
|
||||
|
||||
private final Project myProject;
|
||||
private JPanel myEditorPanel;
|
||||
@@ -275,7 +273,7 @@ public class UnscrambleDialog extends DialogWrapper {
|
||||
private final class NormalizeTextAction extends AbstractAction {
|
||||
NormalizeTextAction(){
|
||||
putValue(NAME, JavaBundle.message("unscramble.normalize.button"));
|
||||
putValue(DEFAULT_ACTION, Boolean.FALSE);
|
||||
putValue(DialogWrapper.DEFAULT_ACTION, Boolean.FALSE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -360,7 +358,7 @@ public class UnscrambleDialog extends DialogWrapper {
|
||||
DumbService.getInstance(myProject).withAlternativeResolveEnabled(() -> {
|
||||
if (performUnscramble()) {
|
||||
myLogFile.addCurrentTextToHistory();
|
||||
close(OK_EXIT_CODE);
|
||||
close(DialogWrapper.OK_EXIT_CODE);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.unscramble;
|
||||
|
||||
import com.intellij.openapi.application.ClipboardAnalyzeListener;
|
||||
19
java/vcs/intellij.java.vcs.iml
Normal file
19
java/vcs/intellij.java.vcs.iml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="intellij.java.execution" />
|
||||
<orderEntry type="module" module-name="intellij.platform.core" />
|
||||
<orderEntry type="module" module-name="intellij.platform.execution" />
|
||||
<orderEntry type="module" module-name="intellij.platform.lang" />
|
||||
<orderEntry type="module" module-name="intellij.platform.vcs" />
|
||||
<orderEntry type="module" module-name="intellij.platform.uast" />
|
||||
<orderEntry type="module" module-name="intellij.platform.vcs.impl" />
|
||||
</component>
|
||||
</module>
|
||||
9
java/vcs/resources/intellij.java.vcs.xml
Normal file
9
java/vcs/resources/intellij.java.vcs.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<idea-plugin>
|
||||
<dependencies>
|
||||
<module name="intellij.platform.vcs.impl"/>
|
||||
</dependencies>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<exceptionFilter implementation="com.intellij.openapi.vcs.contentAnnotation.VcsContentAnnotationExceptionFilterFactory"/>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
@@ -38,7 +38,7 @@ import org.jetbrains.uast.UastContextKt;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class VcsContentAnnotationExceptionFilter implements Filter, FilterMixin {
|
||||
final class VcsContentAnnotationExceptionFilter implements Filter, FilterMixin {
|
||||
private final Project myProject;
|
||||
private static final Logger LOG = Logger.getInstance(VcsContentAnnotationExceptionFilter.class);
|
||||
private final VcsContentAnnotationSettings mySettings;
|
||||
@@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public final class VcsContentAnnotationExceptionFilterFactory implements ExceptionFilterFactory {
|
||||
final class VcsContentAnnotationExceptionFilterFactory implements ExceptionFilterFactory {
|
||||
@Override
|
||||
public @NotNull Filter create(@NotNull GlobalSearchScope searchScope) {
|
||||
return new VcsContentAnnotationExceptionFilter(Objects.requireNonNull(searchScope.getProject()), searchScope);
|
||||
@@ -1,4 +1,4 @@
|
||||
// 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.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.openapi.vcs.configurable;
|
||||
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -9,7 +9,7 @@ import org.jetbrains.annotations.Nls;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class VcsContentAnnotationConfigurable extends VcsCheckBoxWithSpinnerConfigurable {
|
||||
public final class VcsContentAnnotationConfigurable extends VcsCheckBoxWithSpinnerConfigurable {
|
||||
public VcsContentAnnotationConfigurable(Project project) {
|
||||
super(project, VcsBundle.message("settings.checkbox.show.changed.in.last"), VcsBundle.message("settings.checkbox.measure.days"));
|
||||
}
|
||||
|
||||
@@ -58,5 +58,6 @@
|
||||
<orderEntry type="module" module-name="intellij.platform.workspace.jps" />
|
||||
<orderEntry type="module" module-name="intellij.platform.backend.workspace" />
|
||||
<orderEntry type="module" module-name="intellij.tools.ide.metrics.benchmark" scope="TEST" />
|
||||
<orderEntry type="module" module-name="intellij.java.unscramble" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -21,6 +21,7 @@
|
||||
<dependencies>
|
||||
<plugin id="com.intellij.properties"/>
|
||||
<plugin id="com.intellij.java"/>
|
||||
<module name="intellij.java.unscramble"/>
|
||||
</dependencies>
|
||||
|
||||
<depends optional="true" config-file="groovy-copyright.xml">com.intellij.copyright</depends>
|
||||
|
||||
@@ -10,6 +10,5 @@
|
||||
<orderEntry type="module" module-name="intellij.sh" />
|
||||
<orderEntry type="module" module-name="intellij.spellchecker" scope="TEST" />
|
||||
<orderEntry type="module" module-name="intellij.platform.testFramework" scope="TEST" />
|
||||
<orderEntry type="module" module-name="intellij.idea.community.customization" scope="TEST" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -315,10 +315,6 @@
|
||||
<add-to-group group-id="CodeMenu" anchor="last"/>
|
||||
</action>
|
||||
|
||||
<action id="Unscramble" class="com.intellij.unscramble.UnscrambleAction" overrides="true">
|
||||
<override-text place="EditorPopup"/>
|
||||
</action>
|
||||
|
||||
<group id="RefactoringMenu1">
|
||||
<action id="ChangeTypeSignature" class="com.intellij.refactoring.typeMigration.actions.ChangeTypeSignatureAction"/>
|
||||
<action id="MakeStatic" class="com.intellij.refactoring.actions.MakeStaticAction"/>
|
||||
|
||||
Reference in New Issue
Block a user