Current module reference

How do I refer to my current module in JAVA code?
I am calling doRunShell() but that function requires a module as a parameter. I assume it needs my current plugin module.
Is there a document or sample code that shows how I pass my current module to the function?

You need to subclass GroovyConsoleAction and invoke protected doRunShell on it.



For reference:

https://youtrack.jetbrains.com/issue/IDEA-136707


Thanks!

3 comments
Comment actions Permalink

As you can see, GroovyShellActionBase contains logic that allows the user to choose which module to run the console with. Is there any reason why this logic is not suitable for you?

0
Comment actions Permalink

Sure the logic is no problem I will look at it.
Here is what I am trying to (this is my first IntelliJ plugin I am writing):

This program:
https://github.com/jkester/selenium-groovy

Launches a selenium webdriver JAR and a standalone groovyconsole

In the code there is a call to the standalone groovyconsole and I was hoping to simply switch out that call with the call to the IntelliJ IDE groovyconsole instead but maybe it is not so simple?

Peter Gromov said:
"You need to subclass GroovyConsoleAction and invoke protected doRunShell on it."

And I was just trying to implement his suggestion. Is that the best way or is there better way?


Thanks
Rich

0
Comment actions Permalink

If Peter says this is the right way, then so it is. :) He's an expert in that area of our codebase, while I'm not.

0

Please sign in to leave a comment.