Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-06-11 05:33:06 +0000
committerslewis2007-06-11 05:33:06 +0000
commitc6667ce352e9a41623571376d0d73c8834183c5f (patch)
tree496245d75541f262f61d800434e4abfad7ae7589 /framework/bundles/org.eclipse.ecf.presence.collab.ui
parent86597575a37efeff8633b470a6d6fa1aaa7d98b2 (diff)
downloadorg.eclipse.ecf-c6667ce352e9a41623571376d0d73c8834183c5f.tar.gz
org.eclipse.ecf-c6667ce352e9a41623571376d0d73c8834183c5f.tar.xz
org.eclipse.ecf-c6667ce352e9a41623571376d0d73c8834183c5f.zip
Refactored classes into new url and view packages to handle URL sharing and view sharing.
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.presence.collab.ui')
-rw-r--r--framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShare.java36
1 files changed, 19 insertions, 17 deletions
diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShare.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShare.java
index 9f0f4cb4a..788ea9ff9 100644
--- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShare.java
+++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShare.java
@@ -35,7 +35,7 @@ import org.eclipse.ui.browser.IWebBrowser;
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
/**
- *
+ * Send/receive requests to display an URL in the internal web browser.
*/
public class URLShare extends AbstractShare {
@@ -67,23 +67,25 @@ public class URLShare extends AbstractShare {
MessageDialog.openError(null, title, message);
}
-
private void showURL(final String user, final String url) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
- if (MessageDialog.openQuestion(null, Messages.URLShare_RECEIVED_URL_TITLE, NLS.bind(
- Messages.URLShare_RECEIVED_URL_MESSAGE,
- user))) {
- IWorkbenchBrowserSupport support = PlatformUI.getWorkbench()
- .getBrowserSupport();
+ if (MessageDialog.openQuestion(null,
+ Messages.URLShare_RECEIVED_URL_TITLE, NLS.bind(
+ Messages.URLShare_RECEIVED_URL_MESSAGE, user))) {
+ IWorkbenchBrowserSupport support = PlatformUI
+ .getWorkbench().getBrowserSupport();
IWebBrowser browser;
try {
browser = support.createBrowser(null);
browser.openURL(new URL(url));
} catch (Exception e) {
- showErrorToUser(Messages.URLShare_ERROR_BROWSER_TITLE, NLS.bind(
- Messages.URLShare_ERROR_BROWSER_MESSAGE, e
- .getLocalizedMessage()));
+ showErrorToUser(
+ Messages.URLShare_ERROR_BROWSER_TITLE,
+ NLS
+ .bind(
+ Messages.URLShare_ERROR_BROWSER_MESSAGE,
+ e.getLocalizedMessage()));
logError(Messages.URLShare_EXCEPTION_LOG_BROWSER, e);
}
}
@@ -107,15 +109,15 @@ public class URLShare extends AbstractShare {
sendMessage(toID, serialize(new Object[] {
senderuser, send }));
} catch (ECFException e) {
- showErrorToUser(Messages.Share_ERROR_SEND_TITLE, NLS
- .bind(Messages.Share_ERROR_SEND_MESSAGE, e
- .getStatus().getException()
- .getLocalizedMessage()));
+ showErrorToUser(Messages.Share_ERROR_SEND_TITLE,
+ NLS.bind(Messages.Share_ERROR_SEND_MESSAGE,
+ e.getStatus().getException()
+ .getLocalizedMessage()));
logError(e.getStatus());
} catch (Exception e) {
- showErrorToUser(Messages.Share_ERROR_SEND_TITLE, NLS
- .bind(Messages.Share_ERROR_SEND_MESSAGE, e
- .getLocalizedMessage()));
+ showErrorToUser(Messages.Share_ERROR_SEND_TITLE,
+ NLS.bind(Messages.Share_ERROR_SEND_MESSAGE,
+ e.getLocalizedMessage()));
logError(Messages.Share_EXCEPTION_LOG_SEND, e);
}
}

Back to the top