waitForConsole

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

waitForConsole

FORREST EVANS

I’m trying to write a macro that runs multiple commands in the system shell in the console plugin using “runCommandInConsole”.  I used to use “waitForConsole” to make sure that the previous command had completed before running the next command, but it’s now giving me problems. 

 

The “waitForConsole” command locks up jEdit.  If I don’t use this in my macro, only the first command actually gets run by the console.

 

I’m running jEdit 4.4pre1 on Windows XP SP3, Java 1.6.0_21.

 

Is there another way to do this?  Any help would be appreciated.

 

Thanks,

Forrest

 

Sent from my PC.

 


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
--
-----------------------------------------------
jEdit Users' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-users
Reply | Threaded
Open this post in threaded view
|

Re: waitForConsole

Shlomy Reinstein
Your macro runs in the UI thread. Unless you create a new thread for this purpose in your macro, the jEdit window will hang until "waitForConsole" returns. This might be a deadlock if the console needs to do something in the UI thread.

If that is the case, create a Runnable in your macro for this purpose, and use ThreadUtilities.runInBackground(runnable) to run it.
Hope this helps.

I don't know how it previously worked. Sounds like either your macro used to run it in the background, or "waitForConsole" used to do that in previous versions of Console.

Shlomy


2010/9/22 FORREST EVANS <[hidden email]>

I’m trying to write a macro that runs multiple commands in the system shell in the console plugin using “runCommandInConsole”.  I used to use “waitForConsole” to make sure that the previous command had completed before running the next command, but it’s now giving me problems. 

 

The “waitForConsole” command locks up jEdit.  If I don’t use this in my macro, only the first command actually gets run by the console.

 

I’m running jEdit 4.4pre1 on Windows XP SP3, Java 1.6.0_21.

 

Is there another way to do this?  Any help would be appreciated.

 

Thanks,

Forrest

 

Sent from my PC.

 


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
--
-----------------------------------------------
jEdit Users' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-users



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
--
-----------------------------------------------
jEdit Users' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-users