Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2015-11-06 17:50:43 +0000
committerslewis2015-11-06 17:50:43 +0000
commit31dbdc76e0d9ecc7800a5c55d42f13bdbfd94e3f (patch)
tree49498c3b4aca61ced8bbfe740bc7688e86c99757 /framework
parentecf6e5fc04d84fdfee4c7e83591d90d6ead614f3 (diff)
downloadorg.eclipse.ecf-31dbdc76e0d9ecc7800a5c55d42f13bdbfd94e3f.tar.gz
org.eclipse.ecf-31dbdc76e0d9ecc7800a5c55d42f13bdbfd94e3f.tar.xz
org.eclipse.ecf-31dbdc76e0d9ecc7800a5c55d42f13bdbfd94e3f.zip
Updates to EndpointDiscoveryView and RemoteServiceAdminView APIs
Diffstat (limited to 'framework')
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/endpoint/EndpointDiscoveryView.java34
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/RemoteServiceAdminView.java26
2 files changed, 34 insertions, 26 deletions
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/endpoint/EndpointDiscoveryView.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/endpoint/EndpointDiscoveryView.java
index 26966de86..421d2548e 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/endpoint/EndpointDiscoveryView.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/endpoint/EndpointDiscoveryView.java
@@ -77,21 +77,21 @@ public class EndpointDiscoveryView extends ViewPart {
public static final String ID_VIEW = "org.eclipse.ecf.remoteserviceadmin.ui.views.EndpointDiscoveryView"; //$NON-NLS-1$
- private TreeViewer viewer;
- private Action copyValueAction;
- private Action copyNameAction;
- private Action importAction;
- private Action unimportAction;
+ protected TreeViewer viewer;
+ protected Action copyValueAction;
+ protected Action copyNameAction;
+ protected Action importAction;
+ protected Action unimportAction;
- private Action undiscoverAction;
+ protected Action undiscoverAction;
- private Action edefDiscoverAction;
+ protected Action edefDiscoverAction;
- private Clipboard clipboard;
+ protected Clipboard clipboard;
private DiscoveryComponent discovery;
- private EndpointContentProvider contentProvider;
+ protected EndpointContentProvider contentProvider;
public EndpointDiscoveryView() {
}
@@ -101,8 +101,7 @@ public class EndpointDiscoveryView extends ViewPart {
this.discovery.setView(this);
IViewSite viewSite = getViewSite();
- this.contentProvider = new EndpointContentProvider(viewSite,
- Messages.EndpointDiscoveryView_ENDPOINT_ROOT_NAME);
+ this.contentProvider = createContentProvider(viewSite);
viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
viewer.setContentProvider(this.contentProvider);
@@ -133,6 +132,11 @@ public class EndpointDiscoveryView extends ViewPart {
}
+ protected EndpointContentProvider createContentProvider(IViewSite viewSite) {
+ return new EndpointContentProvider(viewSite,
+ Messages.EndpointDiscoveryView_ENDPOINT_ROOT_NAME);
+ }
+
private int previousRegistryBrowserGroupBy;
private int invokeShowGroupBy(RegistryBrowser registryBrowser, int groupBy)
@@ -227,11 +231,11 @@ public class EndpointDiscoveryView extends ViewPart {
.log(new Status(level, Activator.PLUGIN_ID, message, e));
}
- private void logWarning(String message, Throwable e) {
+ protected void logWarning(String message, Throwable e) {
log(IStatus.WARNING, message, e);
}
- private void logError(String message, Throwable e) {
+ protected void logError(String message, Throwable e) {
log(IStatus.ERROR, message, e);
}
@@ -409,7 +413,7 @@ public class EndpointDiscoveryView extends ViewPart {
.setToolTipText(Messages.EndpointDiscoveryView_REMOVE_ENDPOINT_TT);
}
- EndpointNode getEDNodeSelected() {
+ protected EndpointNode getEDNodeSelected() {
AbstractEndpointNode aen = getNodeSelected();
return (aen instanceof EndpointNode) ? (EndpointNode) aen : null;
}
@@ -418,7 +422,7 @@ public class EndpointDiscoveryView extends ViewPart {
return contentProvider.getRootNode().equals(getNodeSelected());
}
- AbstractEndpointNode getNodeSelected() {
+ protected AbstractEndpointNode getNodeSelected() {
return ((AbstractEndpointNode) ((ITreeSelection) viewer.getSelection())
.getFirstElement());
}
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/RemoteServiceAdminView.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/RemoteServiceAdminView.java
index 658a01e5c..c26a5c1ce 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/RemoteServiceAdminView.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/RemoteServiceAdminView.java
@@ -41,11 +41,11 @@ public class RemoteServiceAdminView extends ViewPart {
public static final String ID_VIEW = "org.eclipse.ecf.remoteserviceadmin.ui.views.RSAView"; //$NON-NLS-1$
private DiscoveryComponent discovery;
- private TreeViewer viewer;
+ protected TreeViewer viewer;
- private RSAContentProvider contentProvider;
- private Action closeExportAction;
- private Action closeImportAction;
+ protected RSAContentProvider contentProvider;
+ protected Action closeExportAction;
+ protected Action closeImportAction;
public RemoteServiceAdminView() {
}
@@ -69,7 +69,7 @@ public class RemoteServiceAdminView extends ViewPart {
IViewSite viewSite = getViewSite();
- this.contentProvider = new RSAContentProvider(viewSite);
+ this.contentProvider = createContentProvider(viewSite);
viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
viewer.setContentProvider(this.contentProvider);
@@ -86,6 +86,10 @@ public class RemoteServiceAdminView extends ViewPart {
if (rsa != null) update(rsa, 0);
}
+ protected RSAContentProvider createContentProvider(IViewSite viewSite) {
+ return new RSAContentProvider(viewSite);
+ }
+
protected void fillContextMenu(IMenuManager manager) {
ITreeSelection selection = (ITreeSelection) viewer.getSelection();
if (selection != null) {
@@ -124,7 +128,7 @@ public class RemoteServiceAdminView extends ViewPart {
}
- Action createCloseAction() {
+ protected Action createCloseAction() {
return new Action() {
public void run() {
AbstractRegistrationNode n = getRegistrationNodeSelected();
@@ -134,13 +138,13 @@ public class RemoteServiceAdminView extends ViewPart {
};
}
- AbstractRSANode getNodeSelected() {
+ protected AbstractRSANode getNodeSelected() {
return ((AbstractRSANode) ((ITreeSelection) viewer.getSelection())
.getFirstElement());
}
- AbstractRegistrationNode getRegistrationNodeSelected() {
+ protected AbstractRegistrationNode getRegistrationNodeSelected() {
AbstractRSANode aen = getNodeSelected();
return (aen instanceof AbstractRegistrationNode) ? (AbstractRegistrationNode) aen : null;
}
@@ -178,11 +182,11 @@ public class RemoteServiceAdminView extends ViewPart {
});
}
- RemoteServiceAdmin getRSA() {
+ protected RemoteServiceAdmin getRSA() {
return (discovery == null) ? null : discovery.getRSA();
}
- void updateExports(RemoteServiceAdmin rsa) {
+ protected void updateExports(RemoteServiceAdmin rsa) {
ExportedServicesRootNode exportedRoot = contentProvider.getExportedServicesRoot();
exportedRoot.clearChildren();
if (rsa != null && exportedRoot != null) {
@@ -192,7 +196,7 @@ public class RemoteServiceAdminView extends ViewPart {
}
}
- void updateImports(RemoteServiceAdmin rsa) {
+ protected void updateImports(RemoteServiceAdmin rsa) {
ImportedEndpointsRootNode importedRoot = contentProvider.getImportedEndpointsRoot();
importedRoot.clearChildren();
if (rsa != null && importedRoot != null) {

Back to the top