1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-18 05:35:45 +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,11 +476,17 @@ public abstract class SubSystem extends RSEModelObject
* will throw a SystemMessageException you can easily display to the user by using a method * will throw a SystemMessageException you can easily display to the user by using a method
* in it. * in it.
*/ */
public void checkIsConnected() throws SystemMessageException public void checkIsConnected(IProgressMonitor monitor) throws SystemMessageException
{ {
if (!isConnected()) if (!isConnected())
{ {
try try
{
if (monitor != null)
{
connect(monitor, false);
}
else
{ {
Display display = Display.getCurrent(); Display display = Display.getCurrent();
if (display != null) if (display != null)
@ -493,6 +499,7 @@ public abstract class SubSystem extends RSEModelObject
connect(new NullProgressMonitor(), false); connect(new NullProgressMonitor(), false);
} }
} }
}
catch (Exception e) catch (Exception e)
{ {
if (e instanceof SystemMessageException) if (e instanceof SystemMessageException)