X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.ui%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fui%2Fbrowser%2FLaunchSCLDocumentationBrowser.java;h=3a687e0d921c0abba54cc10afb88f88d416dc501;hp=eab01a2e4def07a5a55a6a0f375b3473435d27f7;hb=9712014e959584157b02e594be8719c151b8f5b0;hpb=969bd23cab98a79ca9101af33334000879fb60c5 diff --git a/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/browser/LaunchSCLDocumentationBrowser.java b/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/browser/LaunchSCLDocumentationBrowser.java index eab01a2e4..3a687e0d9 100644 --- a/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/browser/LaunchSCLDocumentationBrowser.java +++ b/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/browser/LaunchSCLDocumentationBrowser.java @@ -1,34 +1,34 @@ -package org.simantics.scl.ui.browser; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.swt.SWTError; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PlatformUI; - -public class LaunchSCLDocumentationBrowser extends AbstractHandler { - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - Display display = PlatformUI.getWorkbench().getDisplay(); - Shell shell = new Shell(display); - shell.setText("SCL Documentation browser"); - shell.setLayout(new FillLayout()); - SCLDocumentationBrowser browser; - try { - browser = new SCLDocumentationBrowser(shell); - } catch (SWTError e) { - System.out.println("Could not instantiate the browser: " + e.getMessage()); - display.dispose(); - return null; - } - browser.setLocation("Prelude"); - shell.open(); - - return null; - } - -} +package org.simantics.scl.ui.browser; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.swt.SWTError; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.PlatformUI; + +public class LaunchSCLDocumentationBrowser extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + Display display = PlatformUI.getWorkbench().getDisplay(); + Shell shell = new Shell(display); + shell.setText(Messages.LaunchSCLDocumentationBrowser_SCLDocumentationBrowser); + shell.setLayout(new FillLayout()); + SCLDocumentationBrowser browser; + try { + browser = new SCLDocumentationBrowser(shell); + } catch (SWTError e) { + System.out.println("Could not instantiate the browser: " + e.getMessage()); //$NON-NLS-1$ + display.dispose(); + return null; + } + browser.setLocation("Prelude"); //$NON-NLS-1$ + shell.open(); + + return null; + } + +}