]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/browser/TestSCLDocumentationBrowser.java
Externalize strings in org.simantics.scl.ui
[simantics/platform.git] / bundles / org.simantics.scl.ui / src / org / simantics / scl / ui / browser / TestSCLDocumentationBrowser.java
1 package org.simantics.scl.ui.browser;
2
3
4 import org.eclipse.swt.SWTError;
5 import org.eclipse.swt.layout.FillLayout;
6 import org.eclipse.swt.widgets.Display;
7 import org.eclipse.swt.widgets.Shell;
8 import org.junit.Test;
9
10 public class TestSCLDocumentationBrowser {
11         
12     @Test
13     public void testDocumentationBrowser() throws Exception {
14         Display display = new Display();
15         Shell shell = new Shell(display);
16         shell.setText("SCL module documentation"); //$NON-NLS-1$
17         shell.setLayout(new FillLayout());
18         SCLDocumentationBrowser browser;
19         try {
20             browser = new SCLDocumentationBrowser(shell);
21         } catch (SWTError e) {
22             System.out.println("Could not instantiate Browser: " + e.getMessage()); //$NON-NLS-1$
23             display.dispose();
24             return;
25         }
26         browser.setLocation("Prelude"); //$NON-NLS-1$
27         shell.open();
28         while (!shell.isDisposed()) {
29             if (!display.readAndDispatch())
30                 display.sleep();
31         }
32         display.dispose();
33     }
34     
35 }