1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 18:56:02 +02:00

[180575] applying patch + imples

This commit is contained in:
David McKnight 2007-04-03 15:07:54 +00:00
parent 6474a2af7f
commit 33c837d99f
12 changed files with 83 additions and 17 deletions

View file

@ -103,4 +103,12 @@ public class DaytimeSubSystemConfiguration extends ServiceSubSystemConfiguration
return IDaytimeService.class;
}
/**
* By default, this type of subsystem supports deferred queries.
* Override this method if your implementation does not.
*/
public boolean supportsDeferredQueries()
{
return true;
}
}

View file

@ -108,4 +108,12 @@ public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
return false;
}
/**
* By default, this type of subsystem supports deferred queries.
* Override this method if your implementation does not.
*/
public boolean supportsDeferredQueries()
{
return true;
}
}

View file

@ -134,6 +134,28 @@ public interface ISubSystemConfiguration extends ISystemFilterPoolManagerProvide
*/
public boolean supportsDropInFilters();
/**
* Return true if deferred queries are supported.
*
* Deferred queries work such that when a filter or element
* children query is made, a WorkbenchJob is started to
* perform the query in a background thread. The query can
* take time to complete, but a negative side-effect of this
* is that it will always take time to complete.
*
* Alternative models can use asynchronous calls to populate
* their model with data from the remote side, and refresh
* the views when new data is in the model. Such subsystem
* configurations should return <code>false</code> here.
*
* The default implementation returns <code>true</code>, indicating
* that deferred queries are supported for filters, and delegates
* the check for model elements to the ISystemViewElementAdapter.
*
* @return <code>true</code> if deferred queries are supported.
*/
public boolean supportsDeferredQueries();
/**
* Return true if filters of this subsystem factory provide a custom implementation of drop support.
* By default, the filter reference adapter treats a drop on a filter as an update to the list of filter

View file

@ -495,4 +495,13 @@ public abstract class RemoteFileSubSystemConfiguration extends SubSystemConfigur
return isFor;
}
/**
* By default file subsystems support deferred queries
* Override this method if not.
*/
public boolean supportsDeferredQueries()
{
return true;
}
}

View file

@ -213,5 +213,13 @@ public abstract class RemoteProcessSubSystemConfiguration extends
ISystemValidator portValidator = new ValidatorServerPortInput();
return portValidator;
}
/**
* By default, this type of subsystem supports deferred queries.
* Override this method if your implementation does not.
*/
public boolean supportsDeferredQueries()
{
return true;
}
}

View file

@ -184,11 +184,12 @@ public abstract class RemoteCmdSubSystemConfiguration extends SubSystemConfigura
return ";"; //$NON-NLS-1$
}
/**
* By default, deferred queries are not applicable to this type
* of subsystem.
*/
public boolean supportsDeferredQueries()
{
return false;
}
}

View file

@ -209,10 +209,10 @@ public class SystemTableTreeViewProvider implements ILabelProvider, ITableLabelP
{
if (supportsDeferredQueries())
{
if (manager != null && adapter.supportsDeferredQueries())
if (manager != null)
{
ISubSystem ss = adapter.getSubSystem(object);
if (ss != null)
if (ss != null && adapter.supportsDeferredQueries(ss))
{
// if (ss.isConnected())
{

View file

@ -957,10 +957,11 @@ public class SystemViewFilterReferenceAdapter
/*
* Return whether deferred queries are supported.
* Return whether deferred queries are supported.
* Defer to the subsystem configuration.
*/
public boolean supportsDeferredQueries()
public boolean supportsDeferredQueries(ISubSystem subSys)
{
return true;
return subSys.getSubSystemConfiguration().supportsDeferredQueries();
}
}

View file

@ -270,7 +270,7 @@ public class SystemViewLabelAndContentProvider extends LabelProvider
{
// The adapter needs to be checked to be not null, otherwise
// we run into an NPE here.
if (manager != null && adapter != null && adapter.supportsDeferredQueries())
if (manager != null && adapter != null)
{
ISubSystem ss = null;
if (object instanceof IContextObject)
@ -281,7 +281,7 @@ public class SystemViewLabelAndContentProvider extends LabelProvider
{
ss = adapter.getSubSystem(object);
}
if (ss != null)
if (ss != null && adapter.supportsDeferredQueries(ss))
{
// if (ss.isConnected())
{

View file

@ -1870,7 +1870,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
* they are not supported. Subclasses must override this to
* return true if they are to support this.
*/
public boolean supportsDeferredQueries()
public boolean supportsDeferredQueries(ISubSystem subSys)
{
return false;
}

View file

@ -376,7 +376,8 @@ public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragD
* Return whether deferred queries are supported. By default
* they are not supported. Subclasses must override this to
* return true if they are to support this.
* @param subSys subsystem to use for deferred queries.
* @return <code>true</code> if it supports deferred queries, <code>false</code> otherwise.
*/
public boolean supportsDeferredQueries();
public boolean supportsDeferredQueries(ISubSystem subSys);
}

View file

@ -81,4 +81,12 @@ public class TestSubSystemConfiguration extends SubSystemConfiguration implement
public boolean supportsServerLaunchProperties(IHost host) {
return false;
}
/**
* By default, this type of subsystem supports deferred queries.
*/
public boolean supportsDeferredQueries()
{
return true;
}
}