thanks so far, but I need to call 'HighlightUsagesInFile' from a mouseEvent in my ToolWindow and I cant find a way to provide it with a correct AnActionEvent. I tried to use the AnActionEvent of the Action that fills the ToolWindow but I got the exception 'cannot share data context between Swing events' and the EDITOR has changed too.
EditorActionManager eam = EditorActionManager.getInstance(); EditorActionHandler editorHandler = eam.getActionHandler("HighlightUsagesInFile"); editorHandler.execute(, );
And data context fill according to: ]]>/doc/openapi/javadoc/com/intellij/openapi/actionSystem/DataConstants.html
May be you may look at NoSelectionCopyKiller plugin this snippet inspired by it.
got the same problem .. any ideas?
Hi,
Personally I'm using it like this:
public void actionPerformed(AnActionEvent e) {
ActionManager.getInstance().getAction("ShowIntentionActions").actionPerformed(e);
}
Where code of action can be found in ]]>\doc\openapi\actionmanager.xml
TIA,
Dmitry
thanks so far, but I need to call 'HighlightUsagesInFile' from a mouseEvent in my ToolWindow and I cant find a way to provide it with a correct AnActionEvent. I tried to use the AnActionEvent of the Action that fills the ToolWindow but I got the exception 'cannot share data context between Swing events' and the EDITOR has changed too.
Hi,
May something like this? Just idea.
EditorActionManager eam = EditorActionManager.getInstance();
EditorActionHandler editorHandler = eam.getActionHandler("HighlightUsagesInFile");
editorHandler.execute(, ); And data context fill according to: ]]>/doc/openapi/javadoc/com/intellij/openapi/actionSystem/DataConstants.html
May be you may look at NoSelectionCopyKiller plugin this snippet inspired by it.
TIA,
Dmitr