diff options
| author | slewis | 2005-06-02 23:59:05 +0000 |
|---|---|---|
| committer | slewis | 2005-06-02 23:59:05 +0000 |
| commit | 5b2572cfda7bd1079683d2ed069a58d57b638d4c (patch) | |
| tree | 23c457001c98053afc1e481f8d51994139cb5a3a | |
| parent | 3ede73b333b3a8a3ebfe896c663f00ef0f98a752 (diff) | |
| download | org.eclipse.ecf-5b2572cfda7bd1079683d2ed069a58d57b638d4c.tar.gz org.eclipse.ecf-5b2572cfda7bd1079683d2ed069a58d57b638d4c.tar.xz org.eclipse.ecf-5b2572cfda7bd1079683d2ed069a58d57b638d4c.zip | |
Fixed presentation of shared urls so that they appear in external browser. Removed 'Send File and Launch' menu item to eliminate possibility of security problems with testing.
7 files changed, 52 insertions, 35 deletions
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/build.properties b/examples/bundles/org.eclipse.ecf.example.collab/build.properties index 501150ae9..82998fdd7 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/build.properties +++ b/examples/bundles/org.eclipse.ecf.example.collab/build.properties @@ -1,3 +1,13 @@ +############################################################################### +# Copyright (c) 2005 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### source.client.jar = src/ output.client.jar = bin/ bin.includes = plugin.xml,\ diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/actions/ProjectPopupComposentAction.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/actions/ProjectPopupComposentAction.java index 21cd8cd52..065b8a312 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/actions/ProjectPopupComposentAction.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/actions/ProjectPopupComposentAction.java @@ -1,3 +1,13 @@ +/**************************************************************************** +* Copyright (c) 2004 Composent, Inc. and others. +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* Composent, Inc. - initial API and implementation +*****************************************************************************/ package org.eclipse.ecf.example.collab.actions; import org.eclipse.core.resources.IProject; diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/actions/ProjectPopupLocalhostAction.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/actions/ProjectPopupLocalhostAction.java index f6c87058f..251ea5837 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/actions/ProjectPopupLocalhostAction.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/actions/ProjectPopupLocalhostAction.java @@ -1,3 +1,13 @@ +/**************************************************************************** +* Copyright (c) 2004 Composent, Inc. and others. +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +* +* Contributors: +* Composent, Inc. - initial API and implementation +*****************************************************************************/ package org.eclipse.ecf.example.collab.actions; import org.eclipse.core.resources.IProject; diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/ExecURL.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/ExecURL.java index 64ee215ea..7fcdce048 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/ExecURL.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/ExecURL.java @@ -102,7 +102,7 @@ public class ExecURL extends GenericSharedObject { public void activated(ID [] others) { debug("activated()"); try { - if (!getContext().isGroupServer()) { + if (!getContext().isGroupManager()) { GetExec.showURL(url,true); } else { debug("Not executing commands because is server"); diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/GetExec.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/GetExec.java index dec4ee446..9f37dfe64 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/GetExec.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/GetExec.java @@ -13,10 +13,10 @@ package org.eclipse.ecf.example.collab.share.url; import java.io.File; +import org.eclipse.ecf.example.collab.ClientPlugin; import org.eclipse.help.browser.IBrowser; import org.eclipse.help.internal.browser.BrowserManager; import org.eclipse.swt.SWT; -import org.eclipse.swt.program.Program; import org.eclipse.swt.widgets.Display; public class GetExec { @@ -32,33 +32,15 @@ public class GetExec { private static final String WIN_ID = "Windows"; // The default system browser under windows. private static final String WIN_PATH = "rundll32"; - protected static void displayURL(String url, boolean considerInternal) { - boolean useEmbedded = false; + protected static void displayURL(String url, boolean external) { boolean win32 = SWT.getPlatform().equals("win32"); - if (win32 && considerInternal) { - useEmbedded = getUseEmbeddedBrowser(); - } - if (useEmbedded) { - IBrowser browser = BrowserManager.getInstance() - .createBrowser(false); - try { - browser.displayURL(url); - } catch (Exception e) { - e.printStackTrace(); - } - } else { - if (win32) { - Program.launch(url); - } else { - // defect 11483 - IBrowser browser = BrowserManager.getInstance().createBrowser(); - try { - browser.displayURL(url); - } catch (Exception e) { - e.printStackTrace(); - } - } + IBrowser browser = BrowserManager.getInstance() + .createBrowser(external); + try { + browser.displayURL(url); + } catch (Exception e) { + ClientPlugin.log("Exception in displayURL for URL: "+url,e); } } public static String getBrowserExec(String unixBrowser, String url) { @@ -80,11 +62,6 @@ public class GetExec { else return fileName; } - - protected static boolean getUseEmbeddedBrowser() { - return true; - } - public static boolean isWindowsPlatform() { String os = System.getProperty("os.name"); if (os != null && os.startsWith(WIN_ID)) diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/ChatComposite.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/ChatComposite.java index 5ce6fe828..90200d32a 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/ChatComposite.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/ChatComposite.java @@ -336,7 +336,7 @@ public class ChatComposite extends Composite { manager.add(outputSelectAll); manager.add(new Separator()); manager.add(sendFileToGroup); - manager.add(sendFileToGroupAndLaunch); + //manager.add(sendFileToGroupAndLaunch); manager.add(coBrowseURL); //manager.add(startProgram); //appShare.setEnabled(!LineChatView.appShareActive()); @@ -709,7 +709,7 @@ public class ChatComposite extends Composite { sendFileToGroup.setImageDescriptor(PlatformUI.getWorkbench() .getSharedImages().getImageDescriptor( ISharedImages.IMG_OBJ_FILE)); - + /* sendFileToGroupAndLaunch = new Action() { public void run() { sendFileToGroup(true); @@ -720,7 +720,7 @@ public class ChatComposite extends Composite { sendFileToGroupAndLaunch.setImageDescriptor(PlatformUI.getWorkbench() .getSharedImages().getImageDescriptor( ISharedImages.IMG_OBJ_FILE)); - + */ coBrowseURL = new Action() { public void run() { sendCoBrowseToUser(null); diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/ChatLine.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/ChatLine.java index a4e203e5c..aae25236f 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/ChatLine.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/ChatLine.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2005 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ /* * Created on Feb 18, 2005 * |
