Skip to content

Commit

Permalink
feat(provider): add GitQLDataProvider and update ShireQLDataProvider …
Browse files Browse the repository at this point in the history
…interface #41

Add a new GitQLDataProvider class in the git provider package. This class implements the ShireQLDataProvider interface, which has been updated to include a nullable return type for the lookupGitData method. The GitQLDataProvider is registered in the plugin.xml file as a shireQLDataProvider extension.
  • Loading branch information
phodal committed Jul 30, 2024
1 parent 1c87cf9 commit 5af617e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ enum class ShireQLDataType(val dataKey: String) {
}

interface ShireQLDataProvider {
fun lookupGitData(myProject: Project, dataTypes: List<ShireQLDataType>): Map<ShireQLDataType, Any>
fun lookupGitData(myProject: Project, dataTypes: List<ShireQLDataType>): Map<ShireQLDataType, Any?>

fun lookup(myProject: Project, variableType: String): List<ShireVcsCommit>? {
return null
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.phodal.shirelang.git.provider

import com.intellij.openapi.project.Project
import com.phodal.shirecore.provider.shire.ShireQLDataProvider
import com.phodal.shirecore.provider.shire.ShireQLDataType

class GitQLDataProvider : ShireQLDataProvider {
override fun lookupGitData(myProject: Project, dataTypes: List<ShireQLDataType>): Map<ShireQLDataType, Any?> {
TODO("Not yet implemented")
}
}
2 changes: 2 additions & 0 deletions toolsets/git/src/main/resources/com.phodal.shirelang.git.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
<shireToolchainVariableProvider implementation="com.phodal.shirelang.git.provider.GitToolchainVariableProvider"/>

<shireActionLocationEditor implementation="com.phodal.shirelang.git.provider.GitActionLocationEditor"/>

<shireQLDataProvider implementation="com.phodal.shirelang.git.provider.GitQLDataProvider"/>
</extensions>
</idea-plugin>

0 comments on commit 5af617e

Please sign in to comment.