-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from tangcent/merge-easy-api
Merge easy api
- Loading branch information
Showing
7 changed files
with
37 additions
and
26 deletions.
There are no files selected for viewing
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
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
7 changes: 7 additions & 0 deletions
7
idea-plugin/src/main/kotlin/com/itangcent/idea/plugin/rule/RuleComputorKit.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 |
---|---|---|
@@ -1,10 +1,17 @@ | ||
package com.itangcent.idea.plugin.rule | ||
|
||
import com.itangcent.intellij.config.rule.RuleComputer | ||
import com.itangcent.intellij.config.rule.RuleContext | ||
import com.itangcent.intellij.config.rule.RuleKey | ||
import com.itangcent.intellij.config.rule.RuleParser | ||
import com.itangcent.intellij.jvm.element.ExplicitElement | ||
|
||
|
||
fun <T> RuleComputer.computer(ruleKey: RuleKey<T>, explicitElement: ExplicitElement<*>): T? { | ||
return this.computer(ruleKey, explicitElement, explicitElement.psi()) | ||
} | ||
|
||
|
||
fun RuleParser.contextOf(context: ExplicitElement<*>): RuleContext { | ||
return this.contextOf(context, context.psi()) | ||
} |
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