Problem in refreshing IDEA window

I am new to IDEA plugins and I'm a contestant of IDEA plugin contest. I came across two questions and like to know answers for them.

1. In my plugin, I download some files from remote locations. When I invoke the plugin, using a key combination, IDEA seems to be stuck. I can only see ash window and nothing else until my plugin ends. How can I fix this?

2. When I am running the plugin, I want to print some outputs to the console. I tried logging to the console as INFO message. Will it work? (I can not see anything due to the above problem)

If you wanna re-create the problem, please get the plugin from http://people.apache.org/~chinthaka/IDEA/Idea_Plugin.jar. Then openup a project which uses maven 1.x the build system. Select the root folder and press CtrlShiftAlt+U.

Thanks for the help in advance.

2 comments
Comment actions Permalink

1. In my plugin, I download some files from remote
locations. When I invoke the plugin, using a key
combination, IDEA seems to be stuck. I can only see
ash window and nothing else until my plugin ends. How
can I fix this?


Well, every lengthy operation should be done in a separate thread. If you want to have some nice feedback I suggest you to look for ProgressManager.getInstance().runProcessWithProgressSynchronously().

2. When I am running the plugin, I want to print some
outputs to the console. I tried logging to the
console as INFO message. Will it work? (I can not see
anything due to the above problem)


Which console are you talking about? Are you opening your own console window?

0
Comment actions Permalink

ProgressManager.getInstance().runProcessWithProgressSy
nchronously().


This will introduce a progress bar and yes this helps to imrove rather than just no displaying anything.


Which console are you talking about? Are you opening
your own console window?


When you run ant build script you see some stuff in the console pain. Similarly I want to write sometihng to the console. There is no hard requirement for me to use my own console and I can use the existing one too. My only concern is to display some output to the user.

0

Please sign in to leave a comment.