generated from JetBrains/intellij-platform-plugin-template
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/main/kotlin/cc/unitmesh/devti/editor/LLMInlayManager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package cc.unitmesh.devti.editor | ||
|
||
import com.intellij.openapi.Disposable | ||
import com.intellij.openapi.application.ApplicationManager | ||
import com.intellij.openapi.editor.Editor | ||
import com.intellij.openapi.project.Project | ||
import com.intellij.util.concurrency.annotations.RequiresEdt | ||
|
||
interface LLMInlayManager : Disposable { | ||
override fun dispose() {} | ||
|
||
@RequiresEdt | ||
fun isAvailable(editor: Editor): Boolean | ||
|
||
@RequiresEdt | ||
fun applyCompletion(project: Project, editor: Editor) | ||
|
||
@RequiresEdt | ||
fun disposeInlays(editor: Editor) | ||
|
||
companion object { | ||
fun getInstance(): LLMInlayManager { | ||
return ApplicationManager.getApplication().getService(LLMInlayManager::class.java) | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/kotlin/cc/unitmesh/devti/editor/LLMInlayManagerImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cc.unitmesh.devti.editor | ||
|
||
import com.intellij.openapi.editor.Editor | ||
import com.intellij.openapi.project.Project | ||
|
||
class LLMInlayManagerImpl : LLMInlayManager { | ||
override fun isAvailable(editor: Editor): Boolean { | ||
return false | ||
} | ||
|
||
override fun applyCompletion(project: Project, editor: Editor) { | ||
return | ||
} | ||
|
||
override fun disposeInlays(editor: Editor) { | ||
return | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters