mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 11:50:54 +07:00
IJPL-167274 Add extension point for disabling essential analysis mode restart per project
(cherry picked from commit 35e52cb683d3d990ba74494dea8a537199942d35) IJ-CR-149829 GitOrigin-RevId: 64f6b75247d7f2e0889c998bfb730ac0d9fa5993
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6558ffdac9
commit
f4cf3566bf
@@ -2249,6 +2249,10 @@ f:com.intellij.codeInsight.daemon.impl.ErrorStripeUpdateManager
|
||||
- f:repaintErrorStripePanel(com.intellij.openapi.editor.Editor,com.intellij.psi.PsiFile):V
|
||||
f:com.intellij.codeInsight.daemon.impl.ErrorStripeUpdateManager$Companion
|
||||
- f:getInstance(com.intellij.openapi.project.Project):com.intellij.codeInsight.daemon.impl.ErrorStripeUpdateManager
|
||||
com.intellij.codeInsight.daemon.impl.EssentialHighlightingRestarterDisablement
|
||||
- sf:EP_NAME:com.intellij.openapi.extensions.ExtensionPointName
|
||||
- s:isEssentialHighlightingRestarterDisabledForProject(com.intellij.openapi.project.Project):Z
|
||||
- a:shouldBeDisabledForProject(com.intellij.openapi.project.Project):Z
|
||||
c:com.intellij.codeInsight.daemon.impl.GotoNextErrorHandler
|
||||
- com.intellij.codeInsight.CodeInsightActionHandler
|
||||
- <init>(Z):V
|
||||
|
||||
@@ -32,7 +32,8 @@ public final class EssentialHighlightingRestarter implements SaveAndSyncHandlerL
|
||||
|
||||
@Override
|
||||
public void beforeSave(@NotNull SaveAndSyncHandler.SaveTask task, boolean forceExecuteImmediately) {
|
||||
if (!Registry.is("highlighting.essential.should.restart.in.full.mode.on.save.all")) {
|
||||
if (!Registry.is("highlighting.essential.should.restart.in.full.mode.on.save.all")
|
||||
|| EssentialHighlightingRestarterDisablement.isEssentialHighlightingRestarterDisabledForProject(myProject)) {
|
||||
return;
|
||||
}
|
||||
boolean hasFilesWithEssentialHighlightingConfigured =
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// 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.codeInsight.daemon.impl;
|
||||
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.openapi.project.Project;
|
||||
|
||||
/**
|
||||
* Disables essential highlighting restart on save on a project basis
|
||||
*/
|
||||
public interface EssentialHighlightingRestarterDisablement {
|
||||
|
||||
ExtensionPointName<EssentialHighlightingRestarterDisablement> EP_NAME = ExtensionPointName.create("com.intellij.daemon.essentialHighlightingRestarterDisablement");
|
||||
|
||||
boolean shouldBeDisabledForProject(Project project);
|
||||
|
||||
static boolean isEssentialHighlightingRestarterDisabledForProject(Project project) {
|
||||
return EP_NAME.getExtensionList().stream()
|
||||
.map(extension -> extension.shouldBeDisabledForProject(project))
|
||||
.reduce(Boolean::logicalOr)
|
||||
.orElse(false);
|
||||
}
|
||||
}
|
||||
@@ -65,6 +65,7 @@
|
||||
</extensionPoint>
|
||||
|
||||
<extensionPoint name="daemon.highlightInfoFilter" interface="com.intellij.codeInsight.daemon.impl.HighlightInfoFilter" dynamic="true"/>
|
||||
<extensionPoint name="daemon.essentialHighlightingRestarterDisablement" interface="com.intellij.codeInsight.daemon.impl.EssentialHighlightingRestarterDisablement" dynamic="true"/>
|
||||
<extensionPoint name="daemon.tooltipActionProvider" interface="com.intellij.codeInsight.daemon.impl.tooltips.TooltipActionProvider" dynamic="true"/>
|
||||
<extensionPoint name="daemon.intentionActionFilter" interface="com.intellij.codeInsight.daemon.impl.IntentionActionFilter" dynamic="true"/>
|
||||
<extensionPoint name="daemon.externalAnnotatorsFilter" interface="com.intellij.lang.ExternalAnnotatorsFilter" dynamic="true"/>
|
||||
|
||||
Reference in New Issue
Block a user