use of org.eclipse.wst.xml.ui.StructuredTextViewerConfigurationXML in project webtools.sourceediting by eclipse.
the class TestViewerConfigurationXML method setUpViewerConfiguration.
private void setUpViewerConfiguration() {
// some test environments might not have a "real" display
if (Display.getCurrent() != null) {
Shell shell = null;
Composite parent = null;
if (PlatformUI.isWorkbenchRunning()) {
shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
} else {
shell = new Shell(Display.getCurrent());
}
parent = new Composite(shell, SWT.NONE);
// dummy viewer
fViewer = new StructuredTextViewer(parent, null, null, false, SWT.NONE);
fConfig = new StructuredTextViewerConfigurationXML();
} else {
fDisplayExists = false;
Logger.log(Logger.INFO, "Remember, viewer configuration tests are not run because workbench is not open (normal on build machine)");
}
}
Aggregations