| Summary: | [plug-in registry] give user information, that he is now connected | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Jacek Pospychala <jacek.pospychala> | ||||||||||
| Component: | Incubators | Assignee: | Wojciech Galanciak <wojciech.galanciak> | ||||||||||
| Status: | RESOLVED DUPLICATE | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | ||||||||||||
| Version: | 3.5 | ||||||||||||
| Target Milestone: | --- | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Windows XP | ||||||||||||
| Whiteboard: | |||||||||||||
| Bug Depends on: | |||||||||||||
| Bug Blocks: | 243439 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Jacek Pospychala
Created attachment 142997 [details]
adds inforamtion about connection status
This is the first version of the patch. Plugin registry view informs user about connection status during connecting with remote application. There are two scenario:
- it has connected with remote application
- it hasn't connected with remote application
These situation are handled. We need to add information when the client loses connection with a server.
I don't think Backend needs to remember if it has connected or not. Let's just invoke updateTitle() when connecting and make something simple, like:
public void updateTitle() {
URI uri = model.getURI();
String uriString = "";
if (! "local".equals(uri.getScheme())) // we're connected remotely
uriString = "[" + uri.toString() + "] ";
}
setContentDescription(uriString + getTitleSummary());
}
Created attachment 143015 [details]
simpler version of previous patch
Yes, it's simpler but in that situation we don't remember that connection was established correctly or not. We can check it because model.connect(monitor, boolean) returns true when it connected, so if we check the returned value we can prepare correct statement:
- [connected with r-osgi://host:port] when it connected
- [cannot connect with r-osgi://host:port] when it not connected
Unfortunately, we must remember that statement somewhere (e. g. in RegistryBackend).
so maybe if unable to connect, we should better tell this to user.
For example: view should fall back to the local ("local:///") and show an error message. What you think?
Created attachment 143119 [details]
updated
Ok, I've added MessageDialog which shows when it can't establish connection.
Created attachment 143683 [details]
Previous patch after small update.
*** This bug has been marked as a duplicate of bug 283387 *** |