mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
update presentation for dumping features action
GitOrigin-RevId: 89e6ac11c36f190d76ce2005a8c31e5b2fb4a151
This commit is contained in:
committed by
intellij-monorepo-bot
parent
86035a3cbf
commit
72259e1a5b
@@ -28,8 +28,10 @@
|
||||
|
||||
<actions>
|
||||
<action id="DumpMLCompletionFeatures"
|
||||
class="com.intellij.completion.actions.MLCompletionFeaturesUtil$CopyFeaturesToClipboard">
|
||||
class="com.intellij.completion.actions.MLCompletionFeaturesUtil$CopyFeaturesToClipboard"
|
||||
text="Copy ML Completion Features To Clipboard">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="ctrl shift alt 0"/>
|
||||
<add-to-group group-id="MaintenanceGroup" anchor="before" relative-to-action="DumpLookupElementWeights"/>
|
||||
</action>
|
||||
</actions>
|
||||
|
||||
|
||||
+5
@@ -42,6 +42,11 @@ object MLCompletionFeaturesUtil {
|
||||
private val gson: Gson = GsonBuilder().setPrettyPrinting().create()
|
||||
}
|
||||
|
||||
override fun update(e: AnActionEvent) {
|
||||
val editor = e.getData(CommonDataKeys.EDITOR)
|
||||
e.presentation.isEnabled = editor != null && LookupManager.getActiveLookup(editor) != null
|
||||
}
|
||||
|
||||
override fun actionPerformed(e: AnActionEvent) {
|
||||
val editor = e.getData(CommonDataKeys.EDITOR)
|
||||
val lookup = LookupManager.getActiveLookup(editor) as? LookupImpl ?: return
|
||||
|
||||
Reference in New Issue
Block a user