1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 15:15:25 +02:00

[207095] Implicit connect needs to run in the same job as caller

This commit is contained in:
David McKnight 2007-10-25 21:03:56 +00:00
parent 56bd71d3f2
commit e925b3380b

View file

@ -476,22 +476,29 @@ public abstract class SubSystem extends RSEModelObject
* will throw a SystemMessageException you can easily display to the user by using a method
* in it.
*/
public void checkIsConnected() throws SystemMessageException
public void checkIsConnected(IProgressMonitor monitor) throws SystemMessageException
{
if (!isConnected())
{
try
{
Display display = Display.getCurrent();
if (display != null)
if (monitor != null)
{
connect(false, null);
connect(monitor, false);
}
else
{
// Not on UI-thread
connect(new NullProgressMonitor(), false);
}
Display display = Display.getCurrent();
if (display != null)
{
connect(false, null);
}
else
{
// Not on UI-thread
connect(new NullProgressMonitor(), false);
}
}
}
catch (Exception e)
{