Get Variable and Value in Debug Follow
Answered
Hi, I want to add a new action, which is similar to evaluate expression only that it will always evaluate the selected expression and display it (or copied it to clipboard) as JSON.
First I want to add another action to the right-click menu. what I did is:
<action id="PojoToJsonAction"
class="PojoToJsonAction" text="Print as JSON">
<keyboard-shortcut first-keystroke="ctrl alt J" keymap="$default"/>
<add-to-group group-id="EditorPopupMenu" anchor="last"/>
</action>
I tried also the add it to another group ( <add-to-group group-id="XDebugger.Actions"/>) but it didn't help so I removed it.
Next, I want to get the selected expression. I tried the following:
List<JavaValue> selectedValues = ViewAsGroup.getSelectedValues(e);
and
XValueNodeImpl selectedNode = XDebuggerTreeActionBase.getSelectedNode(e.getDataContext());
None of the methods worked.
And finally, after I will have the selected expression, how will I be able to evaluate it?
Thanks!
Please sign in to leave a comment.
Anything? :)
Please show/link to full sources of your plugin.