Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-03-02 16:48:38 +0000
committerslewis2008-03-02 16:48:38 +0000
commit8e99ac5d92915d908d86a91615afa1fe2b57271f (patch)
treece6fe8b000d801dbc0bae2b28e1a539d8ea198b5 /server-side/examples
parent70ecec210546dc14d94aade9a76ee30103aee583 (diff)
downloadorg.eclipse.ecf-8e99ac5d92915d908d86a91615afa1fe2b57271f.tar.gz
org.eclipse.ecf-8e99ac5d92915d908d86a91615afa1fe2b57271f.tar.xz
org.eclipse.ecf-8e99ac5d92915d908d86a91615afa1fe2b57271f.zip
Added testing code in prep for RemoteMethodDialog
Diffstat (limited to 'server-side/examples')
-rw-r--r--server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.client/META-INF/MANIFEST.MF3
-rw-r--r--server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.client/src/org/eclipse/ecf/internal/examples/remoteservices/client/RemoteEnvironmentInfoServiceAccessHandler.java18
2 files changed, 13 insertions, 8 deletions
diff --git a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.client/META-INF/MANIFEST.MF b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.client/META-INF/MANIFEST.MF
index ed28c1920..5bab54673 100644
--- a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.client/META-INF/MANIFEST.MF
+++ b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.client/META-INF/MANIFEST.MF
@@ -13,7 +13,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.ecf.discovery.ui;bundle-version="2.0.0",
org.eclipse.ecf.remoteservice;bundle-version="1.2.0",
org.eclipse.ecf.examples.remoteservices.common;bundle-version="1.0.0",
- org.eclipse.ecf.ui;bundle-version="1.3.0"
+ org.eclipse.ecf.ui;bundle-version="1.3.0",
+ org.eclipse.ecf.remoteservice.ui;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.4
Eclipse-LazyStart: true
Export-Package: org.eclipse.ecf.internal.examples.remoteservices.client;x-internal:=true
diff --git a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.client/src/org/eclipse/ecf/internal/examples/remoteservices/client/RemoteEnvironmentInfoServiceAccessHandler.java b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.client/src/org/eclipse/ecf/internal/examples/remoteservices/client/RemoteEnvironmentInfoServiceAccessHandler.java
index 66b0c1358..afbc0a4e2 100644
--- a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.client/src/org/eclipse/ecf/internal/examples/remoteservices/client/RemoteEnvironmentInfoServiceAccessHandler.java
+++ b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.client/src/org/eclipse/ecf/internal/examples/remoteservices/client/RemoteEnvironmentInfoServiceAccessHandler.java
@@ -90,7 +90,7 @@ public class RemoteEnvironmentInfoServiceAccessHandler extends AbstractRemoteSer
try {
// Then we connect
connectContainer(container, cTargetID, null);
- } catch (ContainerConnectException e) {
+ } catch (final ContainerConnectException e) {
showException(e);
}
}
@@ -156,13 +156,17 @@ public class RemoteEnvironmentInfoServiceAccessHandler extends AbstractRemoteSer
final IAction action = new Action() {
public void run() {
try {
+ // XXX testing
+ //final MethodInvocationDialog mid = new MethodInvocationDialog((Shell) null, IRemoteEnvironmentInfo.class);
+ //mid.open();
+
final IRemoteCall remoteCall = createRemoteCall();
if (remoteCall != null) {
switch (invokeMode) {
// callSynch
case 0 :
// Actually call
- Object result = remoteService.callSynch(remoteCall);
+ final Object result = remoteService.callSynch(remoteCall);
// Show result
showResult(IRemoteEnvironmentInfo.class.getName(), remoteCall, result);
break;
@@ -172,7 +176,7 @@ public class RemoteEnvironmentInfoServiceAccessHandler extends AbstractRemoteSer
remoteService.callAsynch(remoteCall, new IRemoteCallListener() {
public void handleEvent(IRemoteCallEvent event) {
if (event instanceof IRemoteCallCompleteEvent) {
- IRemoteCallCompleteEvent complete = (IRemoteCallCompleteEvent) event;
+ final IRemoteCallCompleteEvent complete = (IRemoteCallCompleteEvent) event;
if (complete.hadException()) {
showException(complete.getException());
} else
@@ -184,20 +188,20 @@ public class RemoteEnvironmentInfoServiceAccessHandler extends AbstractRemoteSer
// callAsynch (future)
case 2 :
// Actually call
- IAsyncResult asyncResult = remoteService.callAsynch(remoteCall);
+ final IAsyncResult asyncResult = remoteService.callAsynch(remoteCall);
// Show result
showResult(IRemoteEnvironmentInfo.class.getName(), remoteCall, asyncResult.get());
break;
// proxy
case 3 :
- IRemoteEnvironmentInfo proxy = (IRemoteEnvironmentInfo) remoteService.getProxy();
+ final IRemoteEnvironmentInfo proxy = (IRemoteEnvironmentInfo) remoteService.getProxy();
// Actually call
- Object proxyResult = proxy.getProperty((String) remoteCall.getParameters()[0]);
+ final Object proxyResult = proxy.getProperty((String) remoteCall.getParameters()[0]);
showResult(IRemoteEnvironmentInfo.class.getName(), remoteCall, proxyResult);
break;
}
}
- } catch (Exception e) {
+ } catch (final Exception e) {
MessageDialog.openError(null, "Invoke Exception", e.getLocalizedMessage());
}
}

Back to the top