Skip to content

Commit

Permalink
feat(variable): add all() method to retrieve all PsiContextVariables
Browse files Browse the repository at this point in the history
…#183

Adds a new method `all()` to the `PsiContextVariable` companion object, allowing retrieval of all entries as a list. Also includes an import for `Variable` in `ShireVariableViewPanel.kt`.
  • Loading branch information
phodal committed Jan 6, 2025
1 parent 82750d6 commit 3df12b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,7 @@ enum class PsiContextVariable(
fun from(variableName: String): PsiContextVariable? {
return entries.firstOrNull { it.variableName == variableName }
}

fun all(): List<PsiContextVariable> = entries
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.phodal.shirelang.editor

import cc.unitmesh.cf.core.context.variable.Variable
import com.intellij.ui.JBColor
import com.intellij.ui.components.JBLabel
import com.intellij.ui.components.JBPanel
Expand Down

0 comments on commit 3df12b6

Please # to comment.