Skip to content

Commit 80ddfb1

Browse files
committed
Use the BackgroundUpdateHighlightersUtil.setHighlightersToEditor API.
1 parent 90eee65 commit 80ddfb1

1 file changed

Lines changed: 3 additions & 17 deletions

File tree

src/lang-xquery/main/uk/co/reecedunn/intellij/plugin/xquery/lang/highlighter/xml/XQueryElemTagTreeHighlightingPass.kt

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,11 @@
1-
/*
2-
* Copyright (C) 2020 Reece H. Dunn
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
1+
// Copyright (C) 2020, 2025 Reece H. Dunn. SPDX-License-Identifier: Apache-2.0
162
package uk.co.reecedunn.intellij.plugin.xquery.lang.highlighter.xml
173

184
import com.intellij.application.options.editor.WebEditorOptions
195
import com.intellij.codeHighlighting.TextEditorHighlightingPass
6+
import com.intellij.codeInsight.daemon.impl.BackgroundUpdateHighlightersUtil.setHighlightersToEditor
207
import com.intellij.codeInsight.daemon.impl.HighlightInfo
218
import com.intellij.codeInsight.daemon.impl.HighlightInfoType
22-
import com.intellij.codeInsight.daemon.impl.UpdateHighlightersUtil.setHighlightersToSingleEditor
239
import com.intellij.openapi.editor.XmlHighlighterColors
2410
import com.intellij.lang.annotation.HighlightSeverity
2511
import com.intellij.openapi.editor.colors.TextAttributesKey
@@ -87,7 +73,7 @@ class XQueryElemTagTreeHighlightingPass(val file: PsiFile, val editor: EditorEx)
8773
}
8874

8975
override fun doApplyInformationToEditor() {
90-
setHighlightersToSingleEditor(myProject, editor, 0, file.textLength, highlights, colorsScheme, id)
76+
setHighlightersToEditor(myProject, file, document, 0, file.textLength, highlights, id)
9177

9278
clearLineMarkers()
9379
editor.putUserData(XQUERY_TAG_TREE_HIGHLIGHTERS_IN_EDITOR_KEY, lineMarkers)

0 commit comments

Comments
 (0)