Bug 180575 - [api] Add ISubSystemConfiguration.supportsDeferredQueries()
Summary: [api] Add ISubSystemConfiguration.supportsDeferredQueries()
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 1.0.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.0   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2007-04-02 17:42 EDT by Martin Oberhuber CLA
Modified: 2008-08-13 13:17 EDT (History)
0 users

See Also:


Attachments
Patch to allow changing deferred query support for filters (8.89 KB, patch)
2007-04-02 18:07 EDT, Martin Oberhuber CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2007-04-02 17:42:02 EDT
Whether or not deferred queries are supported, is profoundly a property of the subsystem and / or service implementation.

The service in our commercial product always works asynchronously with callbacks: expanding a node produces a temporary "pending" object in the Model, just like the RSE Deferred Adapter's Pending node. But the query is not resolved via a Job, it is sent asynchronously to the remote side instead. When the result is there, a Refresh event is sent to the SystemView to indicate that the model has new data.

We can use this mechanism with all elements in our model, because ISystemViewElementAdapter.supportsDeferredQueries() exists. But we can not currently use it for filters. We need the
    SystemViewFilterReferenceAdapter#supportsDeferredQueries()
method to delegate to the SubSystemConfiguration for its result.

I first thought that supportsDeferredQueries() would be a view-only setting (so it should go into the SubSystemConfigurationAdapter), but I now I think that it is really a property of the subsystemConfiguration itself.
Comment 1 Martin Oberhuber CLA 2007-04-02 18:07:02 EDT
Created attachment 62730 [details]
Patch to allow changing deferred query support for filters

Attached patch fixes the issue by allowing ISubSystemConfiguration to specify whether deferred queries are supported for filters.
Comment 2 Martin Oberhuber CLA 2007-04-02 18:07:37 EDT
Dave can you please review attached patch and apply it if you see fit.
Comment 3 David McKnight CLA 2007-04-03 11:08:59 EDT
applied + added implementations to configs
Comment 4 Martin Oberhuber CLA 2007-04-03 12:51:07 EDT
It looks like this patch from SubSystemConfiguration had been rejected:

/**
 * Return true if deferred queries are supported.
 * By default, they are supported. Override for different behavior.
 * 
 * @return <code>true</code> if deferred queries are supported.
 * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#supportsDeferredQueries()
 */
public boolean supportsDeferredQueries()
{
	return true;
}


This should really be in the base abstract SubSystemConfiguration, and not in the children (DaytimeSubSytemConfiguration etc.). Also, the default should be true for all since only the filters use this, normally, and it should be true for them.

Should I go and fix this?
Comment 5 Martin Oberhuber CLA 2007-04-03 13:18:56 EDT
Reviewed, seen that Dave already added the missing impl in SubSystem base class, removed unnecessary implementations in child classes.
Comment 6 Martin Oberhuber CLA 2008-08-13 13:17:42 EDT
[target cleanup] 2.0 M6 was the original target milestone for this bug