Can't add item into IDEA 14.x watches/variables menu

Trying to add menu item to debug windows in IntelliJ IDEA Community Edition 14.0.3

 
<action id="CopyAsJson.Copy" class="com.riabchenko.idea.JSONCopyAction" text="Copy as JSON"
        description="Copies JSON representation of instance in Variables or Watches debug views">
    <add-to-group group-id="Debugger.FramePanelPopup" relative-to-action="Debugger.CopyValue" anchor="after" />
    <add-to-group group-id="Debugger.EvaluationDialogPopup" relative-to-action="Debugger.CopyValue" anchor="after" />
    <add-to-group group-id="Debugger.InspectPanelPopup" relative-to-action="Debugger.CopyValue" anchor="after" />
    <add-to-group group-id="Debugger.WatchesPanelPopup" relative-to-action="Debugger.CopyValue" anchor="after" />
</action>


As a result - no additional item in menu. But in previous version of IDEA 13 - new item appears in menu.

How to solve this issue with 14.x?

0
6 comments
Avatar
Permanently deleted user

Hello Denis,

did you find a solution? I am facing the same problem; items don't show in IDEA 14, but it worked with older versions.

BR
Christoph

0
Avatar
Permanently deleted user

Hi Christoph,

No, I haven't found solution for this issue.
I've checked plugin with 14.0.3 UC version and menu item is still not visible

0
Avatar
Permanently deleted user

Ok, I digged a litter bit deeper into it, this is what i have found out:

  1. The group-ids seem to have changed with IDEA 14. This posts gave me a hint https://devnet.jetbrains.com/message/5543716#5543716 . I found all new IDEA 14 XDebugger group-ids here https://github.com/JetBrains/intellij-community/blob/master/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/XDebuggerActions.java .
  2. Menu Items don't appear if you inherit from com.intellij.debugger.actions.BaseValueAction (I have open a Thread about it https://devnet.jetbrains.com/thread/473213) . When using com.intellij.openapi.actionSystem.AnAction and the group-ids described a (1) at least menu items are there.


I hope that somebody from JetBrains will comment on this, soon...

0
Avatar
Permanently deleted user

Ok, I have reported this issue and I got an anwser: https://youtrack.jetbrains.com/issue/IDEA-145835

Instead of using BaseValueAction you should get selected values with ViewAsGroup.getSelectedValues(event).

My plugin works again. I hope this helps you, too.

0
Avatar
Permanently deleted user

That's quite strange because my action is exctended from DebuggerAction which extends AnAction

0
Avatar
Permanently deleted user

Have you tried using the new XDebugger groups? To add a context menu item to all variables in debugger- and watch-view I had to use these:

 
<add-to-group group-id="XDebugger.Watches.Tree.Popup" anchor="last"/>
<add-to-group group-id="XDebugger.Variables.Tree.Toolbar" anchor="last"/>
<add-to-group group-id="XDebugger.Variables.Tree.Popup" anchor="last"/>
<add-to-group group-id="XDebugger.Evaluation.Dialog.Tree.Popup" anchor="last"/>
<add-to-group group-id="XDebugger.Inspect.Tree.Popup" anchor="last"/>
0

Please sign in to leave a comment.