From ff68e84b8afdc736da15a8ecc7cf194d1a4b2926 Mon Sep 17 00:00:00 2001 From: Jaime Wren Date: Tue, 19 Aug 2025 01:29:30 -0700 Subject: [PATCH] Remove Dart in HTML syntax highlighting support --- third_party/CHANGELOG.md | 2 +- .../lang/dart/DartScriptContentProvider.java | 22 --------------- .../src/main/resources/META-INF/plugin.xml | 3 --- .../dart/ide/DartSurroundWithInHtmlTest.java | 27 ------------------- .../surroundWith/html/IfElse1.after.html | 13 --------- .../testData/surroundWith/html/IfElse1.html | 9 ------- 6 files changed, 1 insertion(+), 75 deletions(-) delete mode 100644 third_party/src/main/java/com/jetbrains/lang/dart/DartScriptContentProvider.java delete mode 100644 third_party/src/test/java/com/jetbrains/lang/dart/ide/DartSurroundWithInHtmlTest.java delete mode 100644 third_party/src/test/testData/surroundWith/html/IfElse1.after.html delete mode 100644 third_party/src/test/testData/surroundWith/html/IfElse1.html diff --git a/third_party/CHANGELOG.md b/third_party/CHANGELOG.md index 651da7597..5e0dea531 100644 --- a/third_party/CHANGELOG.md +++ b/third_party/CHANGELOG.md @@ -6,7 +6,7 @@ - "Scope analysis to the current package" feature from the Dart problem view - Code Coverage support, all references to com.intellij.coverage.* -- Dart embedded in HTML support +- Dart embedded and syntax highlighting in HTML support ### Changed diff --git a/third_party/src/main/java/com/jetbrains/lang/dart/DartScriptContentProvider.java b/third_party/src/main/java/com/jetbrains/lang/dart/DartScriptContentProvider.java deleted file mode 100644 index e4d681851..000000000 --- a/third_party/src/main/java/com/jetbrains/lang/dart/DartScriptContentProvider.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -package com.jetbrains.lang.dart; - -import com.intellij.lang.HtmlScriptContentProvider; -import com.intellij.lexer.Lexer; -import com.intellij.openapi.fileTypes.SyntaxHighlighter; -import com.intellij.openapi.fileTypes.SyntaxHighlighterFactory; -import com.intellij.psi.tree.IElementType; -import org.jetbrains.annotations.Nullable; - -public final class DartScriptContentProvider implements HtmlScriptContentProvider { - @Override - public IElementType getScriptElementType() { - return DartTokenTypesSets.EMBEDDED_CONTENT; - } - - @Override - public @Nullable Lexer getHighlightingLexer() { - SyntaxHighlighter syntaxHighlighter = SyntaxHighlighterFactory.getSyntaxHighlighter(DartFileType.INSTANCE, null, null); - return syntaxHighlighter != null ? syntaxHighlighter.getHighlightingLexer() : null; - } -} diff --git a/third_party/src/main/resources/META-INF/plugin.xml b/third_party/src/main/resources/META-INF/plugin.xml index 9f12bf062..c7945bf59 100644 --- a/third_party/src/main/resources/META-INF/plugin.xml +++ b/third_party/src/main/resources/META-INF/plugin.xml @@ -60,7 +60,6 @@ - @@ -246,8 +245,6 @@ - - - - - - diff --git a/third_party/src/test/testData/surroundWith/html/IfElse1.html b/third_party/src/test/testData/surroundWith/html/IfElse1.html deleted file mode 100644 index f1b50ccbc..000000000 --- a/third_party/src/test/testData/surroundWith/html/IfElse1.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - -