-package org.simantics.scl.ui.browser;\r
-\r
-\r
-import org.eclipse.swt.SWTError;\r
-import org.eclipse.swt.layout.FillLayout;\r
-import org.eclipse.swt.widgets.Display;\r
-import org.eclipse.swt.widgets.Shell;\r
-import org.junit.Test;\r
-\r
-public class TestSCLDocumentationBrowser {\r
- \r
- @Test\r
- public void testDocumentationBrowser() throws Exception {\r
- Display display = new Display();\r
- Shell shell = new Shell(display);\r
- shell.setText("SCL module documentation");\r
- shell.setLayout(new FillLayout());\r
- SCLDocumentationBrowser browser;\r
- try {\r
- browser = new SCLDocumentationBrowser(shell);\r
- } catch (SWTError e) {\r
- System.out.println("Could not instantiate Browser: " + e.getMessage());\r
- display.dispose();\r
- return;\r
- }\r
- browser.setLocation("Prelude");\r
- shell.open();\r
- while (!shell.isDisposed()) {\r
- if (!display.readAndDispatch())\r
- display.sleep();\r
- }\r
- display.dispose();\r
- }\r
- \r
-}\r
+package org.simantics.scl.ui.browser;
+
+
+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.junit.Test;
+
+public class TestSCLDocumentationBrowser {
+
+ @Test
+ public void testDocumentationBrowser() throws Exception {
+ Display display = new Display();
+ Shell shell = new Shell(display);
+ shell.setText("SCL module documentation");
+ shell.setLayout(new FillLayout());
+ SCLDocumentationBrowser browser;
+ try {
+ browser = new SCLDocumentationBrowser(shell);
+ } catch (SWTError e) {
+ System.out.println("Could not instantiate Browser: " + e.getMessage());
+ display.dispose();
+ return;
+ }
+ browser.setLocation("Prelude");
+ shell.open();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch())
+ display.sleep();
+ }
+ display.dispose();
+ }
+
+}