/**
 * 
 */
package org.corpus_tools.atomic.grideditor.gui;

import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

/**
 * // TODO Add description
 *
 * @author Stephan Druskat <[mail@sdruskat.net](mailto:mail@sdruskat.net)>
 * 
 */
public class TokenTextInputDialog extends Dialog {
	
    /**
     * Error message string.
     */
    private String errorMessage;
    private Button btnCheckButton;
	private Text text;
	private String value;
	private boolean addWhitespace;

	public TokenTextInputDialog(Shell parentShell) {
		super(parentShell);
	}
	
	@Override
	protected Control createDialogArea(Composite parent) {
        // create composite
        Composite composite = (Composite) super.createDialogArea(parent);
        // create message
            Label label = new Label(composite, SWT.WRAP);
            label.setText("Please enter the text which the new token should cover");
            GridData data = new GridData(GridData.GRAB_HORIZONTAL
                    | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL
                    | GridData.VERTICAL_ALIGN_CENTER);
            data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
            label.setLayoutData(data);
            label.setFont(parent.getFont());
        text = new Text(composite, SWT.SINGLE | SWT.BORDER);
        text.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
                | GridData.HORIZONTAL_ALIGN_FILL));
//        text.addModifyListener(e -> validateInput());
        
        btnCheckButton = new Button(composite, SWT.CHECK);
        btnCheckButton.setText("Add single whitespace before and after.");
        btnCheckButton.setSelection(true);
        
        applyDialogFont(composite);
        return composite;
    }
	
	@Override
	protected void buttonPressed(int buttonId) {
        if (buttonId == IDialogConstants.OK_ID) {
            value = text.getText();
            addWhitespace = btnCheckButton.getSelection();
        } else {
            value = null;
        }
        super.buttonPressed(buttonId);
    }

	/**
	 * @return the value
	 */
	public String getValue() {
		return value;
	}

	/**
	 * @return the addWhitespace
	 */
	public boolean addWhitespace() {
		return addWhitespace;
	}

}

@@ -1315,16 +1315,17 @@
 ld cover
+.
 %22);%0A    
@@ -1890,64 +1890,8 @@
 ));%0A
-//        text.addModifyListener(e -%3E validateInput());%0A
     

Fix typo