<commit_before>/**********************************************************************
 **                                                                   **
 **               This code belongs to the KETTLE project.            **
 **                                                                   **
 ** Kettle, from version 2.2 on, is released into the public domain   **
 ** under the Lesser GNU Public License (LGPL).                       **
 **                                                                   **
 ** For more details, please read the document LICENSE.txt, included  **
 ** in this project                                                   **
 **                                                                   **
 ** http://www.kettle.be                                              **
 ** <EMAIL>                                                    **
 **                                                                   **
 **********************************************************************/

/*
 * Created on 19-jun-2003
 *
 */

package be.ibridge.kettle.spoon.dialog;

import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.ShellAdapter;
import org.eclipse.swt.events.ShellEvent;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

import be.ibridge.kettle.core.Const;
import be.ibridge.kettle.core.Props;
import be.ibridge.kettle.core.WindowProperty;

public class TipsDialog extends Dialog
{
    private String title, message;

    private Label wlDesc;
    private Text wDesc;
    private FormData fdlDesc, fdDesc;

    private Label wlShowTips;
    private Button wShowTips;
    private FormData fdlShowTips, fdShowTips;

    private boolean showtips;

    private Shell shell;
    private Display display;
    private Props props;

    private String description;
    private Font font;
    private Shell parent;

    public TipsDialog(Shell parent)
    {
        super(parent, SWT.NONE);
        props = Props.getInstance();
        title = Messages.getString("TipsDialog.Dialog.Tips.Title"); // Spoon tips...
        message = Messages.getString("TipsDialog.Label.Tips"); // TIP\!
        this.parent = parent;

        description = getTip();

    }

    public String open()
    {
        display = parent.getDisplay();

        shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN);
        props.setLook(shell);

        showtips = props.showTips();

        FormLayout formLayout = new FormLayout();
        formLayout.marginWidth = Const.FORM_MARGIN;
        formLayout.marginHeight = Const.FORM_MARGIN;<commit_msg>CRQ5280<commit_after>/**********************************************************************
 **                                                                   **
 **               This code belongs to the KETTLE project.            **
 **                                                                   **
 ** Kettle, from version 2.2 on, is released into the public domain   **
 ** under the Lesser GNU Public License (LGPL).                       **
 **                                                                   **
 ** For more details, please read the document LICENSE.txt, included  **
 ** in this project                                                   **
 **                                                                   **
 ** http://www.kettle.be                                              **
 ** <EMAIL>                                                    **
 **                                                                   **
 **********************************************************************/

/*
 * Created on 19-jun-2003
 *
 */

package be.ibridge.kettle.spoon.dialog;

import org.eclipse.swt.SWT;
import be.ibridge.kettle.core.GUIResource;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.ShellAdapter;
import org.eclipse.swt.events.ShellEvent;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

import be.ibridge.kettle.core.Const;
import be.ibridge.kettle.core.Props;
import be.ibridge.kettle.core.WindowProperty;

public class TipsDialog extends Dialog
{
    private String title, message;

    private Label wlDesc;
    private Text wDesc;
    private FormData fdlDesc, fdDesc;

    private Label wlShowTips;
    private Button wShowTips;
    private FormData fdlShowTips, fdShowTips;

    private boolean showtips;

    private Shell shell;
    private Display display;
    private Props props;

    private String description;
    private Font font;
    private Shell parent;

    public TipsDialog(Shell parent)
    {
        super(parent, SWT.NONE);
        props = Props.getInstance();
        title = Messages.getString("TipsDialog.Dialog.Tips.Title"); // Spoon tips...
        message = Messages.getString("TipsDialog.Label.Tips"); // TIP\!
        this.parent = parent;

        description = getTip();

    }

    public String open()
    {
        display = parent.getDisplay();

        shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN);
        props.setLook(shell);
		shell.setImage(GUIResource.getInstance().getImageLogoSmall());

        showtips = props.showTips();

        FormLayout formLayout = new FormLayout();
        formLayout.marginWidth = Const.FORM_MARGIN;
        formLayout.marginHeight = Const.FORM_MARGIN;
{'fraction_non_alphanumeric': 0.13784272371196143, 'fraction_numerical': 0.0030129557095510697, 'mean_word_length': 1.9651630192050022, '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': 42, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5006169', 'n_tokens_mistral': 1753, 'n_tokens_neox': 1667, 'n_words': 370}