generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): add CodeStructVariableProvider for code struct generation #…
…14 - Added CodeStructVariableProvider interface to resolve variables needed for code struct generation. - Updated auto-test.md to use targetTestFileName instead of targetClassName.
- Loading branch information
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
core/src/main/kotlin/com/phodal/shirecore/provider/CodeStructVariableProvider.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 com.phodal.shirecore.provider | ||
|
||
import com.intellij.lang.Language | ||
import com.intellij.lang.LanguageExtension | ||
|
||
/** | ||
* Resolve variables for code struct generation. | ||
* This is used to provide the variables that are used in the code struct generation. | ||
* | ||
* - currentClass | ||
* - relatedClasses | ||
* - similarTestCase | ||
* - imports | ||
* - isNewFile | ||
* - targetTestFileName | ||
*/ | ||
interface CodeStructVariableProvider { | ||
companion object { | ||
private val languageExtension: LanguageExtension<CodeStructVariableProvider> = | ||
LanguageExtension("com.phodal.shireCodeStructVariableProvider") | ||
|
||
fun provide(language: Language): CodeStructVariableProvider? { | ||
return languageExtension.forLanguage(language) | ||
} | ||
} | ||
} |
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
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