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:
parent
56bd71d3f2
commit
e925b3380b
1 changed files with 14 additions and 7 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue