Skip to content

Commit

Permalink
feat(json-text-provider): add new extension point and provider class …
Browse files Browse the repository at this point in the history
…for JSON text editing support. #183
  • Loading branch information
phodal committed May 11, 2024
1 parent d145593 commit 24a4923
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugin/src/main/resources/META-INF/plugin.xml
Expand Up @@ -31,6 +31,7 @@
<module name="cc.unitmesh.cpp"/>
<module name="cc.unitmesh.scala"/>
<!-- <module name="cc.unitmesh.csharp"/>-->
<module name="cc.unitmesh.local"/>

<!-- extension modules -->
<module name="cc.unitmesh.database"/>
Expand Down
4 changes: 4 additions & 0 deletions src/222/main/resources/META-INF/autodev-core.xml
Expand Up @@ -173,6 +173,10 @@
<extensionPoint qualifiedName="cc.unitmesh.customDevInsCompletionProvider"
interface="cc.unitmesh.devti.provider.devins.DevInsCompletionProvider"
dynamic="true"/>

<extensionPoint qualifiedName="cc.unitmesh.jsonTextProvider"
interface="cc.unitmesh.devti.provider.JsonTextProvider"
dynamic="true"/>
</extensionPoints>

<applicationListeners>
Expand Down
4 changes: 4 additions & 0 deletions src/233/main/resources/META-INF/autodev-core.xml
Expand Up @@ -174,6 +174,10 @@
<extensionPoint qualifiedName="cc.unitmesh.customDevInsCompletionProvider"
interface="cc.unitmesh.devti.provider.devins.DevInsSymbolProvider"
dynamic="true"/>

<extensionPoint qualifiedName="cc.unitmesh.jsonTextProvider"
interface="cc.unitmesh.devti.provider.JsonTextProvider"
dynamic="true"/>
</extensionPoints>

<applicationListeners>
Expand Down
@@ -0,0 +1,18 @@
package cc.unitmesh.devti.provider

import cc.unitmesh.devti.provider.devins.DevInsSymbolProvider
import com.intellij.openapi.extensions.ExtensionPointName
import java.awt.Component

interface JsonTextProvider {
fun createComponent() : Component;

companion object {
private val EP_NAME: ExtensionPointName<DevInsSymbolProvider> =
ExtensionPointName("cc.unitmesh.jsonTextProvider")

fun all(): List<DevInsSymbolProvider> {
return EP_NAME.extensionList
}
}
}

0 comments on commit 24a4923

Please sign in to comment.