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

[187342] connect before opening window on a object that needs to be connected

This commit is contained in:
David McKnight 2007-06-07 16:34:12 +00:00
parent b79400f4a9
commit 4bc6abcb61

View file

@ -2024,21 +2024,9 @@ public abstract class SubSystem extends RSEModelObject
*/
public Object[] resolveFilterString(String filterString, IProgressMonitor monitor) throws Exception
{
boolean connnectedBefore = 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);
}
if (isConnected())
{
Object[] results = internalResolveFilterString(filterString, monitor);
if (sortResults && (results!=null))
results = sortResolvedFilterStringObjects(results);
@ -2070,25 +2058,12 @@ public abstract class SubSystem extends RSEModelObject
public Object[] resolveFilterStrings(String[] filterStrings, IProgressMonitor monitor)
throws Exception
{
boolean connnectedBefore = isConnected();
boolean ok = true;
if ((filterStrings == null) || (filterStrings.length == 0)) {
SystemBasePlugin.logInfo("Filter strings are null"); //$NON-NLS-1$
return null;
}
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);
}
if (isConnected())
{
Object[] results = internalResolveFilterStrings(filterStrings, monitor);
if (sortResults && (results!=null))
results = sortResolvedFilterStringObjects(results);
@ -2135,21 +2110,8 @@ public abstract class SubSystem extends RSEModelObject
public Object[] resolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
throws Exception
{
boolean connnectedBefore = 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);
}
if (isConnected())
{
Object[] results= internalResolveFilterString(parent, filterString, monitor);
if (sortResults && (results!=null))
results = sortResolvedFilterStringObjects(results);