mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-18 13:45:45 +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,21 +476,28 @@ 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
|
||||||
{
|
{
|
||||||
Display display = Display.getCurrent();
|
if (monitor != null)
|
||||||
if (display != null)
|
|
||||||
{
|
{
|
||||||
connect(false, null);
|
connect(monitor, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Not on UI-thread
|
Display display = Display.getCurrent();
|
||||||
connect(new NullProgressMonitor(), false);
|
if (display != null)
|
||||||
|
{
|
||||||
|
connect(false, null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Not on UI-thread
|
||||||
|
connect(new NullProgressMonitor(), false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
Loading…
Add table
Reference in a new issue