mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
[devkit] Themes code insight is fully available in dumb mode
GitOrigin-RevId: aa1b421e8347199d9848d1219130261985027994
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f9dd4f44b0
commit
d8c24d910e
@@ -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 org.jetbrains.idea.devkit.themes;
|
||||
|
||||
import com.intellij.codeInspection.ProblemHighlightType;
|
||||
@@ -8,11 +8,12 @@ import com.intellij.json.psi.JsonProperty;
|
||||
import com.intellij.lang.annotation.AnnotationHolder;
|
||||
import com.intellij.lang.annotation.Annotator;
|
||||
import com.intellij.lang.annotation.HighlightSeverity;
|
||||
import com.intellij.openapi.project.DumbAware;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
final class ThemeAnnotator implements Annotator {
|
||||
final class ThemeAnnotator implements Annotator, DumbAware {
|
||||
|
||||
@Override
|
||||
public void annotate(@NotNull PsiElement element, @NotNull AnnotationHolder holder) {
|
||||
|
||||
@@ -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 org.jetbrains.idea.devkit.themes;
|
||||
|
||||
import com.intellij.codeInsight.daemon.LineMarkerSettings;
|
||||
@@ -13,6 +13,7 @@ import com.intellij.openapi.actionSystem.CommonDataKeys;
|
||||
import com.intellij.openapi.command.WriteCommandAction;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.editor.markup.GutterIconRenderer;
|
||||
import com.intellij.openapi.project.DumbAware;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
@@ -34,7 +35,7 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
final class ThemeColorAnnotator implements Annotator {
|
||||
final class ThemeColorAnnotator implements Annotator, DumbAware {
|
||||
|
||||
private static final Pattern COLOR_HEX_PATTERN_RGB = Pattern.compile("^#([A-Fa-f0-9]{6})$");
|
||||
private static final Pattern COLOR_HEX_PATTERN_RGBA = Pattern.compile("^#([A-Fa-f0-9]{8})$");
|
||||
@@ -79,7 +80,7 @@ final class ThemeColorAnnotator implements Annotator {
|
||||
}
|
||||
|
||||
|
||||
private static final class MyRenderer extends GutterIconRenderer {
|
||||
private static final class MyRenderer extends GutterIconRenderer implements DumbAware {
|
||||
private static final int ICON_SIZE = 12;
|
||||
|
||||
private final String myColorText;
|
||||
|
||||
@@ -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 org.jetbrains.idea.devkit.themes;
|
||||
|
||||
import com.intellij.codeInsight.completion.*;
|
||||
@@ -9,6 +9,7 @@ import com.intellij.json.psi.JsonFile;
|
||||
import com.intellij.json.psi.JsonProperty;
|
||||
import com.intellij.json.psi.JsonReferenceExpression;
|
||||
import com.intellij.json.psi.JsonStringLiteral;
|
||||
import com.intellij.openapi.project.DumbAware;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
@@ -27,7 +28,7 @@ import java.util.function.Predicate;
|
||||
/**
|
||||
* Completion in IntelliJ theme files.
|
||||
*/
|
||||
final class ThemeJsonCompletionContributor extends CompletionContributor {
|
||||
final class ThemeJsonCompletionContributor extends CompletionContributor implements DumbAware {
|
||||
|
||||
@Override
|
||||
public void fillCompletionVariants(@NotNull CompletionParameters parameters, @NotNull CompletionResultSet result) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// 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 org.jetbrains.idea.devkit.themes;
|
||||
|
||||
import com.intellij.openapi.project.DumbAware;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.jetbrains.jsonSchema.extension.JsonSchemaFileProvider;
|
||||
@@ -13,7 +14,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
final class ThemeJsonSchemaProviderFactory implements JsonSchemaProviderFactory {
|
||||
final class ThemeJsonSchemaProviderFactory implements JsonSchemaProviderFactory, DumbAware {
|
||||
private static final @NonNls String THEME_SCHEMA = "/schemes/theme.schema.json";
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// 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 org.jetbrains.idea.devkit.themes.metadata
|
||||
|
||||
import com.intellij.openapi.project.DumbAware
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.vfs.VfsUtil
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
@@ -14,7 +15,7 @@ import java.util.*
|
||||
@NonNls
|
||||
internal const val THEME_METADATA_JSON_EXTENSION = "themeMetadata.json"
|
||||
|
||||
internal class ThemeMetadataJsonSchemaProviderFactory : JsonSchemaProviderFactory {
|
||||
internal class ThemeMetadataJsonSchemaProviderFactory : JsonSchemaProviderFactory, DumbAware {
|
||||
|
||||
override fun getProviders(project: Project): MutableList<JsonSchemaFileProvider> {
|
||||
return Collections.singletonList(object : JsonSchemaFileProvider {
|
||||
|
||||
Reference in New Issue
Block a user