01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.internal.ui.actions;
11:
12: import java.net.URL;
13:
14: import org.eclipse.swt.custom.BusyIndicator;
15: import org.eclipse.swt.widgets.Display;
16:
17: import org.eclipse.ui.PlatformUI;
18:
19: public class OpenBrowserUtil {
20:
21: public static void open(final URL url, Display display,
22: final String dialogTitle) {
23: display.syncExec(new Runnable() {
24: public void run() {
25: internalOpen(url, dialogTitle);
26: }
27: });
28: }
29:
30: private static void internalOpen(final URL url, String title) {
31: BusyIndicator.showWhile(null, new Runnable() {
32: public void run() {
33: PlatformUI
34: .getWorkbench()
35: .getHelpSystem()
36: .displayHelpResource(
37: url.toExternalForm() + "?noframes=true"); //$NON-NLS-1$
38: }
39: });
40: }
41: }
|