<commit_before>/*******************************************************************************
 * Copyright (c) 2010 Oak Ridge National Laboratory.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 ******************************************************************************/
package org.csstudio.alarm.beast.msghist;

import org.csstudio.alarm.beast.msghist.gui.GUI;
import org.csstudio.alarm.beast.msghist.model.Model;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.junit.Test;

/** JUnit test of GUI as standalone SWT app.
 *  @author <NAME>
 */
@SuppressWarnings("nls")
public class GUIDemo
{
    /** Initial window size */
    private static final int WIDTHS = 1000, HEIGHT = 800;


    @Test
    public void testGUI()
    {
        try
        {
            final Display display = new Display();
            final Shell shell = new Shell(display);
            final Rectangle screen = display.getBounds();
            shell.setBounds((screen.width-WIDTHS)/2,
                    (screen.height-HEIGHT)/2, WIDTHS, HEIGHT);

            final Model model = new Model(MessageRDBTest.URL, MessageRDBTest.USER, MessageRDBTest.PASSWORD, MessageRDBTest.SCHEMA, 1000, shell);
            new GUI(null, shell, model);

            shell.open();

            model.setTimerange("-1 days", "now");

            // Message loop left to the application
            while (!shell.isDisposed())
                if (!display.readAndDispatch())
                    display.sleep();<commit_msg>alarm.msghist.test: Fix compile error<commit_after>/*******************************************************************************
 * Copyright (c) 2010 Oak Ridge National Laboratory.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 ******************************************************************************/
package org.csstudio.alarm.beast.msghist;

import org.csstudio.alarm.beast.msghist.gui.GUI;
import org.csstudio.alarm.beast.msghist.model.Model;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.junit.Test;

/** JUnit test of GUI as standalone SWT app.
 *  @author <NAME>
 */
@SuppressWarnings("nls")
public class GUIDemo
{
    /** Initial window size */
    private static final int WIDTHS = 1000, HEIGHT = 800;


    @Test
    public void testGUI()
    {
        try
        {
            final Display display = new Display();
            final Shell shell = new Shell(display);
            final Rectangle screen = display.getBounds();
            shell.setBounds((screen.width-WIDTHS)/2,
                    (screen.height-HEIGHT)/2, WIDTHS, HEIGHT);

            final Model model = new Model(MessageRDBIT.URL, MessageRDBIT.USER, MessageRDBIT.PASSWORD, MessageRDBIT.SCHEMA, 1000, shell);
            new GUI(null, shell, model);

            shell.open();

            model.setTimerange("-1 days", "now");

            // Message loop left to the application
            while (!shell.isDisposed())
                if (!display.readAndDispatch())
                    display.sleep();
{'fraction_non_alphanumeric': 0.18609234234234234, 'fraction_numerical': 0.012387387387387387, 'mean_word_length': 2.9565701559020043, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6352174', 'n_tokens_mistral': 1014, 'n_tokens_neox': 926, 'n_words': 260}