]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/console/TestSCLConsole.java
LabelDecorator.decorateLabel can return null
[simantics/platform.git] / bundles / org.simantics.scl.ui / src / org / simantics / scl / ui / console / TestSCLConsole.java
1 package org.simantics.scl.ui.console;
2
3 import org.eclipse.swt.SWT;
4 import org.eclipse.swt.layout.FillLayout;
5 import org.eclipse.swt.widgets.Display;
6 import org.eclipse.swt.widgets.Shell;
7 import org.junit.Test;
8
9 public class TestSCLConsole {
10
11     @Test
12     public void testConsole() throws Exception {
13         Display display = new Display();
14         Shell shell = new Shell(display);
15         shell.setSize(640, 480);
16         
17         FillLayout layout = new FillLayout();
18         shell.setLayout(layout);
19         
20         // Test console
21         new SCLConsole(shell, SWT.NONE);
22                 
23         // Open shell
24         shell.open();
25         while (!shell.isDisposed()) {
26             if (!display.readAndDispatch()) 
27                 display.sleep();
28         }
29         display.dispose();
30     }
31 }