use of org.eclipse.ecf.remoteserviceadmin.ui.endpoint.model.EndpointGroupNode in project ecf by eclipse.
the class EndpointDiscoveryView method handleRSAEent.
public void handleRSAEent(RemoteServiceAdminEvent event) {
final int type = event.getType();
Throwable t = event.getException();
if (t == null) {
TreeViewer treeViewer = this.viewer;
if (treeViewer == null)
return;
switch(type) {
case RemoteServiceAdminEvent.IMPORT_UNREGISTRATION:
final ImportReference ir = (ImportReference) event.getImportReference();
if (ir != null) {
treeViewer.getControl().getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
EndpointGroupNode egn = contentProvider.getRootNode();
for (AbstractEndpointNode aen : egn.getChildren()) {
if (aen instanceof EndpointNode) {
EndpointNode en = (EndpointNode) aen;
ImportReference iRef = en.getImportReference();
if (iRef != null && iRef.equals(ir))
en.setImportReference(null);
}
}
viewer.refresh();
}
});
}
break;
}
}
}
use of org.eclipse.ecf.remoteserviceadmin.ui.endpoint.model.EndpointGroupNode in project ecf by eclipse.
the class EndpointDiscoveryView method findEndpointNode.
EndpointNode findEndpointNode(final ImportReference ir) {
EndpointGroupNode egn = contentProvider.getRootNode();
for (AbstractEndpointNode aen : egn.getChildren()) {
if (aen instanceof EndpointNode) {
EndpointNode en = (EndpointNode) aen;
ImportReference iRef = en.getImportReference();
if (iRef != null && iRef.equals(ir))
return en;
}
}
return null;
}
Aggregations