Skip to content

Commit

Permalink
IntelliJ 2023.2 compatibility API for InjectedLanguageManager.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhdunn committed Jul 19, 2023
1 parent ec80957 commit bf04e85
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (C) 2023 Reece H. Dunn. SPDX-License-Identifier: Apache-2.0
package com.intellij.compat.lang.injection

import com.intellij.psi.FileViewProvider

abstract class InjectedLanguageManager : com.intellij.lang.injection.InjectedLanguageManager() {
abstract fun isInjectedViewProvider(viewProvider: FileViewProvider): Boolean
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright (C) 2023 Reece H. Dunn. SPDX-License-Identifier: Apache-2.0
package com.intellij.compat.lang.injection

typealias InjectedLanguageManager = com.intellij.lang.injection.InjectedLanguageManager
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package uk.co.reecedunn.intellij.plugin.core.tests.injecton

import com.intellij.compat.lang.injection.InjectedLanguageManager
import com.intellij.injected.editor.DocumentWindow
import com.intellij.lang.injection.InjectedLanguageManager
import com.intellij.lang.injection.MultiHostInjector
import com.intellij.openapi.Disposable
import com.intellij.openapi.editor.Document
Expand Down Expand Up @@ -66,6 +66,10 @@ class MockInjectedLanguageManager : InjectedLanguageManager() {

override fun isInjectedFragment(injectedFile: PsiFile): Boolean = TODO()

override fun isInjectedViewProvider(viewProvider: FileViewProvider): Boolean {
TODO("Not yet implemented")
}

override fun intersectWithAllEditableFragments(
injectedPsi: PsiFile,
rangeToEdit: TextRange
Expand Down

0 comments on commit bf04e85

Please sign in to comment.