mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-14 12:35:22 +02:00
[187342] connect before opening window on a object that needs to be connected
This commit is contained in:
parent
b79400f4a9
commit
4bc6abcb61
1 changed files with 6 additions and 44 deletions
|
@ -2024,21 +2024,9 @@ public abstract class SubSystem extends RSEModelObject
|
||||||
*/
|
*/
|
||||||
public Object[] resolveFilterString(String filterString, IProgressMonitor monitor) throws Exception
|
public Object[] resolveFilterString(String filterString, IProgressMonitor monitor) throws Exception
|
||||||
{
|
{
|
||||||
boolean connnectedBefore = isConnected();
|
|
||||||
boolean ok = true;
|
|
||||||
|
|
||||||
if (!connnectedBefore)
|
if (isConnected())
|
||||||
ok = promptForPassword();
|
|
||||||
|
|
||||||
if (ok)
|
|
||||||
{
|
{
|
||||||
if (!connnectedBefore)
|
|
||||||
{
|
|
||||||
getConnectorService().connect(monitor);
|
|
||||||
// disconnected but may not have notified viewers (i.e. network problem)
|
|
||||||
ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
|
|
||||||
sr.connectedStatusChange(this, true, false, false);
|
|
||||||
}
|
|
||||||
Object[] results = internalResolveFilterString(filterString, monitor);
|
Object[] results = internalResolveFilterString(filterString, monitor);
|
||||||
if (sortResults && (results!=null))
|
if (sortResults && (results!=null))
|
||||||
results = sortResolvedFilterStringObjects(results);
|
results = sortResolvedFilterStringObjects(results);
|
||||||
|
@ -2070,25 +2058,12 @@ public abstract class SubSystem extends RSEModelObject
|
||||||
public Object[] resolveFilterStrings(String[] filterStrings, IProgressMonitor monitor)
|
public Object[] resolveFilterStrings(String[] filterStrings, IProgressMonitor monitor)
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
boolean connnectedBefore = isConnected();
|
|
||||||
boolean ok = true;
|
|
||||||
|
|
||||||
if ((filterStrings == null) || (filterStrings.length == 0)) {
|
if ((filterStrings == null) || (filterStrings.length == 0)) {
|
||||||
SystemBasePlugin.logInfo("Filter strings are null"); //$NON-NLS-1$
|
SystemBasePlugin.logInfo("Filter strings are null"); //$NON-NLS-1$
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
if (isConnected())
|
||||||
if (!connnectedBefore)
|
|
||||||
ok = promptForPassword();
|
|
||||||
if (ok)
|
|
||||||
{
|
{
|
||||||
if (!connnectedBefore)
|
|
||||||
{
|
|
||||||
getConnectorService().connect(monitor);
|
|
||||||
// disconnected but may not have notified viewers (i.e. network problem)
|
|
||||||
ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
|
|
||||||
sr.connectedStatusChange(this, true, false, false);
|
|
||||||
}
|
|
||||||
Object[] results = internalResolveFilterStrings(filterStrings, monitor);
|
Object[] results = internalResolveFilterStrings(filterStrings, monitor);
|
||||||
if (sortResults && (results!=null))
|
if (sortResults && (results!=null))
|
||||||
results = sortResolvedFilterStringObjects(results);
|
results = sortResolvedFilterStringObjects(results);
|
||||||
|
@ -2135,21 +2110,8 @@ public abstract class SubSystem extends RSEModelObject
|
||||||
public Object[] resolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
|
public Object[] resolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
boolean connnectedBefore = isConnected();
|
if (isConnected())
|
||||||
boolean ok = true;
|
|
||||||
|
|
||||||
if (!connnectedBefore)
|
|
||||||
ok = promptForPassword();
|
|
||||||
|
|
||||||
if (ok)
|
|
||||||
{
|
{
|
||||||
if (!connnectedBefore)
|
|
||||||
{
|
|
||||||
getConnectorService().connect(monitor);
|
|
||||||
// disconnected but may not have notified viewers (i.e. network problem)
|
|
||||||
ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
|
|
||||||
sr.connectedStatusChange(this, true, false, false);
|
|
||||||
}
|
|
||||||
Object[] results= internalResolveFilterString(parent, filterString, monitor);
|
Object[] results= internalResolveFilterString(parent, filterString, monitor);
|
||||||
if (sortResults && (results!=null))
|
if (sortResults && (results!=null))
|
||||||
results = sortResolvedFilterStringObjects(results);
|
results = sortResolvedFilterStringObjects(results);
|
||||||
|
|
Loading…
Add table
Reference in a new issue