Skip to content

Commit

Permalink
Adding implementation for EssentialHighlightingRestarterDisablement
Browse files Browse the repository at this point in the history
  • Loading branch information
sellophane committed Dec 13, 2024
1 parent bb32225 commit 38abebf
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ intellij_plugin_library(
"intellij-ue-2023.3": [],
"intellij-2024.1": [],
"intellij-ue-2024.1": [],
"intellij-2024.2": [],
"intellij-ue-2024.2": [],
"intellij-2024.3": ["src/META-INF/blaze-base-243.xml"],
"intellij-ue-2024.3": ["src/META-INF/blaze-base-243.xml"],
"clion-2022.3": [],
"clion-2023.1": [],
"clion-2023.2": [],
Expand Down
20 changes: 20 additions & 0 deletions base/src/META-INF/blaze-base-243.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!--
~ Copyright 2024 The Bazel Authors. All rights reserved.
~
~ 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.
-->
<idea-plugin>
<extensions defaultExtensionNs="com.intellij">
<daemon.essentialHighlightingRestarterDisablement implementation="com.google.idea.blaze.base.qsync.QuerySyncEssentialHighlightingRestarterDisablement"/>
</extensions>
</idea-plugin>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.google.idea.blaze.base.qsync;

import com.google.idea.blaze.base.settings.Blaze;
import com.google.idea.blaze.base.settings.BlazeImportSettings;
import com.intellij.codeInsight.daemon.EssentialHighlightingRestarterDisablement;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.NotNull;

public class QuerySyncEssentialHighlightingRestarterDisablement implements EssentialHighlightingRestarterDisablement {

@Override
public boolean shouldBeDisabledForProject(@NotNull Project project) {
return Blaze.getProjectType(project) == BlazeImportSettings.ProjectType.QUERY_SYNC;
}
}

0 comments on commit 38abebf

Please sign in to comment.