Skip to content

Commit

Permalink
High priority of OpenDsComponentInDemoAppIntention
Browse files Browse the repository at this point in the history
  • Loading branch information
popovanton0 committed Dec 6, 2023
1 parent 49e113c commit 6b201ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ You can read more about it [here](https://www.jetbrains.com/help/idea/managing-p
}
}
```
Now, press <kbd>⌘</kbd>+<kbd>S</kbd> (or <kbd>Ctrl</kbd>+<kbd>S</kbd>) to save the config.json and plugin will pick up
Now, press <kbd>⌘</kbd> + <kbd>S</kbd> (or <kbd>Ctrl</kbd> + <kbd>S</kbd>) to save the config.json and plugin will pick up
new changes.

## Boom 💥
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.android.ddmlib.IDevice
import com.android.ddmlib.MultiLineReceiver
import com.android.ddmlib.NullOutputReceiver
import com.intellij.codeInsight.intention.IntentionAction
import com.intellij.codeInsight.intention.PriorityAction
import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction
import com.intellij.codeInsight.intention.preview.IntentionPreviewInfo
import com.intellij.notification.NotificationGroup
Expand Down Expand Up @@ -54,9 +55,10 @@ import kotlin.io.path.div
* page in demo app.
*/
@Suppress("IntentionDescriptionNotFoundInspection")
internal class OpenDsComponentInDemoAppIntention : PsiElementBaseIntentionAction(), IntentionAction {
internal class OpenDsComponentInDemoAppIntention : PsiElementBaseIntentionAction(), IntentionAction, PriorityAction {
override fun getFamilyName(): String = "Kelp intentions"
override fun generatePreview(project: Project, editor: Editor, file: PsiFile) = IntentionPreviewInfo.EMPTY!!
override fun getPriority(): PriorityAction.Priority = PriorityAction.Priority.HIGH

override fun isAvailable(project: Project, editor: Editor?, element: PsiElement): Boolean {
val config = project.kelpConfig()?.demoApp ?: return false
Expand Down

0 comments on commit 6b201ed

Please sign in to comment.