From 1dc5e4936515280c8981ba542a38360f7268d3b7 Mon Sep 17 00:00:00 2001 From: Alexander Doroshko Date: Mon, 8 Jun 2020 19:09:36 +0300 Subject: [PATCH] WEB-45876 CSS plugin(bundled) requires restart on disable (ourDefaultStyleLanguage, ourInlineStyleElementType) GitOrigin-RevId: 50435c475d83de4ea8eb487671b49d455918d43c --- platform/platform-resources/src/brokenPlugins.txt | 4 +++- .../src/com/intellij/lexer/BaseHtmlLexer.java | 11 +++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/platform/platform-resources/src/brokenPlugins.txt b/platform/platform-resources/src/brokenPlugins.txt index 72e815e41029..2e349c689b5b 100644 --- a/platform/platform-resources/src/brokenPlugins.txt +++ b/platform/platform-resources/src/brokenPlugins.txt @@ -166,4 +166,6 @@ CodeHistoryMining "0.1 beta" "0.1.1 beta" "0.1.2 beta" "0.1.3 beta" "0.1.4 beta" ru.crazycoder.plugins.tabdir 1.6.6 1.6.1 1.6 com.jetbrains.php.composer.resolve 1.0 "ev3dev C/C++" "0.7.2 (51324)" -javaFMI 1.0.0 \ No newline at end of file +javaFMI 1.0.0 +fistache.framework.id 1.1.3 +dev.blachut.svelte.lang 0.12.1 \ No newline at end of file diff --git a/xml/xml-psi-impl/src/com/intellij/lexer/BaseHtmlLexer.java b/xml/xml-psi-impl/src/com/intellij/lexer/BaseHtmlLexer.java index 2da189bd6253..5cbb8cb82fc3 100644 --- a/xml/xml-psi-impl/src/com/intellij/lexer/BaseHtmlLexer.java +++ b/xml/xml-psi-impl/src/com/intellij/lexer/BaseHtmlLexer.java @@ -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-2020 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.lexer; import com.intellij.codeInsight.completion.CompletionUtilCore; @@ -34,8 +34,6 @@ public abstract class BaseHtmlLexer extends DelegateLexer { private static final int SEEN_STYLE_SCRIPT_SHIFT = 10; private static final int SEEN_STYLE_SCRIPT_MASK = 0x7 << SEEN_STYLE_SCRIPT_SHIFT; protected static final int BASE_STATE_SHIFT = 13; - @Nullable - protected static final Language ourDefaultStyleLanguage = Language.findLanguageByID("CSS"); protected boolean seenTag; protected boolean seenAttribute; @@ -187,8 +185,9 @@ public abstract class BaseHtmlLexer extends DelegateLexer { @Nullable protected Language getStyleLanguage() { - if (ourDefaultStyleLanguage != null && styleType != null && !"text/css".equals(styleType)) { - for (Language language : ourDefaultStyleLanguage.getDialects()) { + Language cssLanguage = Language.findLanguageByID("CSS"); + if (cssLanguage != null && styleType != null && !"text/css".equals(styleType)) { + for (Language language : cssLanguage.getDialects()) { for (String mimeType : language.getMimeTypes()) { if (styleType.equals(mimeType)) { return language; @@ -196,7 +195,7 @@ public abstract class BaseHtmlLexer extends DelegateLexer { } } } - return ourDefaultStyleLanguage; + return cssLanguage; } @Nullable