| Summary: | Subsystem could check only connection state on connect | ||
|---|---|---|---|
| Product: | [Tools] Target Management | Reporter: | Simon Bernard <sbernard> |
| Component: | RSE | Assignee: | dsdp.tm.rse-inbox <tm.rse-inbox> |
| Status: | NEW --- | QA Contact: | Martin Oberhuber <mober.at+eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | contact |
| Version: | 3.2.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Simon Bernard
I think this is invalid, see my explanation in bug 359873 . When you override isConnected() to add constraints you also have to override connect() -- our connect method can't foresee any modified behavior of isConnected(). I agree if I override isConnect, I surely must override connect too.
I must do something like that :
if (supportsConnecting)
{
if (getConnectorService() != null && !getConnectorService().isConnected()) {
super.connect(monitor, forcePrompt);
}
if (!isOtherConnectionConnected()) {
connectOtherConnection();
}
}
It's not really elegant and the test of connection state is execute twice (One in the overrided method and one in the super method)
If connection state test is done only on the connectorService instead of subsystem state, the overriding of connect will be more elegant.
if (supportsConnecting)
{
super.connect(monitor, forcePrompt);
if (!isOtherConnectionConnected()) {
connectOtherConnection();
}
}
|