1 package org.simantics.scl.ui.browser;
3 import org.eclipse.core.commands.AbstractHandler;
4 import org.eclipse.core.commands.ExecutionEvent;
5 import org.eclipse.core.commands.ExecutionException;
6 import org.eclipse.swt.SWTError;
7 import org.eclipse.swt.layout.FillLayout;
8 import org.eclipse.swt.widgets.Display;
9 import org.eclipse.swt.widgets.Shell;
10 import org.eclipse.ui.PlatformUI;
12 public class LaunchSCLDocumentationBrowser extends AbstractHandler {
15 public Object execute(ExecutionEvent event) throws ExecutionException {
16 Display display = PlatformUI.getWorkbench().getDisplay();
17 Shell shell = new Shell(display);
18 shell.setText(Messages.LaunchSCLDocumentationBrowser_SCLDocumentationBrowser);
19 shell.setLayout(new FillLayout());
20 SCLDocumentationBrowser browser;
22 browser = new SCLDocumentationBrowser(shell);
23 } catch (SWTError e) {
24 System.out.println("Could not instantiate the browser: " + e.getMessage()); //$NON-NLS-1$
28 browser.setLocation("Prelude"); //$NON-NLS-1$