Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2015-04-13 23:23:36 -0400
committerslewis2015-04-13 23:23:36 -0400
commit56e449a0ca8db912c67e95378263c16a757e29b0 (patch)
tree75bf2772484ce3ff26bb0cced5a8db2b2fac27f6
parentf7495e3b942387c7cef8c91bfad73da6e4bb18a6 (diff)
downloadorg.eclipse.ecf-56e449a0ca8db912c67e95378263c16a757e29b0.tar.gz
org.eclipse.ecf-56e449a0ca8db912c67e95378263c16a757e29b0.tar.xz
org.eclipse.ecf-56e449a0ca8db912c67e95378263c16a757e29b0.zip
Enhancement for new Endpoint Discovery view to show Network Discovery
information for network-discovered endpoints. Change-Id: I0000000000000000000000000000000000000000
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/EndpointDiscoveryView.java28
1 files changed, 21 insertions, 7 deletions
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/EndpointDiscoveryView.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/EndpointDiscoveryView.java
index c865dcdec..89804d9c1 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/EndpointDiscoveryView.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/EndpointDiscoveryView.java
@@ -111,6 +111,13 @@ public class EndpointDiscoveryView extends ViewPart {
getSite().setSelectionProvider(viewer);
showServicesInRegistryBrowser();
+
+ IEndpointDescriptionLocator locator = this.discovery.getEndpointDescriptionLocator();
+ if (locator != null) {
+ EndpointDescription[] eds = locator.getDiscoveredEndpoints();
+ for(EndpointDescription ed: eds)
+ addEndpoint(ed);
+ }
}
private int previousRegistryBrowserGroupBy;
@@ -420,26 +427,33 @@ public class EndpointDiscoveryView extends ViewPart {
viewer.getControl().getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
- AbstractEndpointNode root = contentProvider.getRootNode();
EndpointDescription ed = (EndpointDescription) event
.getEndpoint();
int type = event.getType();
switch (type) {
case EndpointEvent.ADDED:
- if (EndpointDiscoveryView.this.previousRegistryBrowserGroupBy != RegistryBrowser.SERVICES)
- showServicesInRegistryBrowser();
- root.addChild(createEndpointDescriptionNode(ed));
+ addEndpoint(ed);
break;
case EndpointEvent.REMOVED:
- root.removeChild(new EndpointNode(ed));
+ removeEndpoint(ed);
break;
}
- viewer.setExpandedState(root, true);
+ viewer.setExpandedState(contentProvider.getRootNode(), true);
viewer.refresh();
}
});
}
+ void addEndpoint(EndpointDescription ed) {
+ if (EndpointDiscoveryView.this.previousRegistryBrowserGroupBy != RegistryBrowser.SERVICES)
+ showServicesInRegistryBrowser();
+ contentProvider.getRootNode().addChild(createEndpointDescriptionNode(ed));
+ }
+
+ void removeEndpoint(EndpointDescription ed) {
+ contentProvider.getRootNode().removeChild(new EndpointNode(ed));
+ }
+
ImportRegistration findImportRegistration(EndpointDescription ed) {
RemoteServiceAdmin rsa = discovery.getRSA();
if (rsa == null)
@@ -499,7 +513,7 @@ public class EndpointDiscoveryView extends ViewPart {
IEndpointDescriptionLocator locator = discovery
.getEndpointDescriptionLocator();
- IServiceID serviceID = (locator == null)?null:locator.getNetworkDiscoveredService(ed);
+ IServiceID serviceID = (locator == null)?null:locator.getNetworkDiscoveredServiceID(ed);
if (serviceID != null)
edo.addChild(new EndpointDiscoveryGroupNode(

Back to the top