<commit_before>package de.sonumina.simpledance;

import static de.sonumina.simpledance.I18n.*;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Comparator;
import java.util.Collections;
import java.util.LinkedList;
import java.util.ListIterator;

import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;

/**
 * @author sebauer
 *
 * To change this generated comment edit the template variable "typecomment":
 * Window>Preferences>Java>Templates.
 * To enable and disable the creation of type comments go to
 * Window>Preferences>Java>Code Generation.
 */
public class Dance implements Runnable
{
	private Shell shell;

	static final int TOOLBAR_NEW = 1;
	static final int TOOLBAR_OPEN = 2;
	static final int TOOLBAR_SAVE = 3;
	static final int TOOLBAR_SAVEAS = 4;
	static final int TOOLBAR_ZOOM_IN = 5;
	static final int TOOLBAR_ZOOM_OUT = 6;
	static final int TOOLBAR_SHOW_PREV = 7;
	static final int TOOLBAR_SHOW_NEXT = 8;
	static final int TOOLBAR_SHOW_ANIM = 9;
	static final int TOOLBAR_SHOW_GENT = 10;
	static final int TOOLBAR_SHOW_LADY = 11;
	static final int TOOLBAR_SHOW_GRID = 12;
	static final int TOOLBAR_PLAY = 13;
	static final int TOOLBAR_PLAYSTOP = 14;
	static final int TOOLBAR_PLAYBACKWARD = 15;
	static final int TOOLBAR_PLAYFORWARD = 16;

	protected Pattern pattern;
	
	/** The step which has been copied (inside the "clipboard") */
	private Step copiedStep;

	private int lastStepSelected; 
	
	private Ballroom ballroom;
	private Table stepOverviewTable;
	private Text gentLeftXText;
	private Text gentLeftYText;
	private Text gentLeftAngleText;
	private Combo gentLeftTypeCombo;
	private Button gentLeftSelectedButton;
	private Text gentRightXText;
	private Text gentRightYText;
	private Text gentRightAngleText;
	private Combo gentRightTypeCombo;
	private Button gentRightSelectedButton;
	private Text ladyLeftXText;
	private Text ladyLeftYText;
	private Text ladyLeftAngleText;
	private Combo ladyLeftTypeCombo;
	private Button ladyLeftSelectedButton;
	private Text ladyRightXText;
	private Text ladyRightYText;
	private Text ladyRightAngleText;
	private Combo ladyRightTypeCombo;
	private Button ladyRightSelectedButton;
	private StyledText stepDescriptionStyledText;
	private Text stepCountText;
	private Combo durationCombo;
	
	/* all created images, which are disposed in dispose() */
	private LinkedList imageList = new LinkedList();
	
	private PatternProp patternPropShell;
	private DetailedOverviewShell detailedOverviewShell;
	private TimerThread timerThread;

	private boolean coordinatesAreRelative = true;
	private boolean useGradients = true;

	private Text createInteger(Composite parent, ModifyListener modifyListener, Object data)
	{
		Text text = new Text(parent,SWT.BORDER);
		text.setTextLimit(5);
		Point p = text.computeSize(SWT.DEFAULT,SWT.DEFAULT);
		text.setData(data);
		if (modifyListener != null) text.addModifyListener(modifyListener);
		text.addVerifyListener(new IntegerVerifyListener());
		GridData gridData = new GridData();
		gridData.widthHint = 28;
		gridData.horizontalAlignment = GridData.FILL;
		gridData.grabExcessHorizontalSpace = false;
		text.setLayoutData(gridData);
		return text;
	}
	
	private Image createImage(String name)
	{
		ImageData source;
		try
		{
			source = new ImageData(name);
		}<commit_msg>Removed unused variable.<commit_after>package de.sonumina.simpledance;

import static de.sonumina.simpledance.I18n.*;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Comparator;
import java.util.Collections;
import java.util.LinkedList;
import java.util.ListIterator;

import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;

/**
 * @author sebauer
 *
 * To change this generated comment edit the template variable "typecomment":
 * Window>Preferences>Java>Templates.
 * To enable and disable the creation of type comments go to
 * Window>Preferences>Java>Code Generation.
 */
public class Dance implements Runnable
{
	private Shell shell;

	static final int TOOLBAR_NEW = 1;
	static final int TOOLBAR_OPEN = 2;
	static final int TOOLBAR_SAVE = 3;
	static final int TOOLBAR_SAVEAS = 4;
	static final int TOOLBAR_ZOOM_IN = 5;
	static final int TOOLBAR_ZOOM_OUT = 6;
	static final int TOOLBAR_SHOW_PREV = 7;
	static final int TOOLBAR_SHOW_NEXT = 8;
	static final int TOOLBAR_SHOW_ANIM = 9;
	static final int TOOLBAR_SHOW_GENT = 10;
	static final int TOOLBAR_SHOW_LADY = 11;
	static final int TOOLBAR_SHOW_GRID = 12;
	static final int TOOLBAR_PLAY = 13;
	static final int TOOLBAR_PLAYSTOP = 14;
	static final int TOOLBAR_PLAYBACKWARD = 15;
	static final int TOOLBAR_PLAYFORWARD = 16;

	protected Pattern pattern;
	
	/** The step which has been copied (inside the "clipboard") */
	private Step copiedStep;

	private int lastStepSelected; 
	
	private Ballroom ballroom;
	private Table stepOverviewTable;
	private Text gentLeftXText;
	private Text gentLeftYText;
	private Text gentLeftAngleText;
	private Combo gentLeftTypeCombo;
	private Button gentLeftSelectedButton;
	private Text gentRightXText;
	private Text gentRightYText;
	private Text gentRightAngleText;
	private Combo gentRightTypeCombo;
	private Button gentRightSelectedButton;
	private Text ladyLeftXText;
	private Text ladyLeftYText;
	private Text ladyLeftAngleText;
	private Combo ladyLeftTypeCombo;
	private Button ladyLeftSelectedButton;
	private Text ladyRightXText;
	private Text ladyRightYText;
	private Text ladyRightAngleText;
	private Combo ladyRightTypeCombo;
	private Button ladyRightSelectedButton;
	private StyledText stepDescriptionStyledText;
	private Text stepCountText;
	private Combo durationCombo;
	
	/* all created images, which are disposed in dispose() */
	private LinkedList imageList = new LinkedList();
	
	private PatternProp patternPropShell;
	private DetailedOverviewShell detailedOverviewShell;
	private TimerThread timerThread;

	private boolean coordinatesAreRelative = true;
	private boolean useGradients = true;

	private Text createInteger(Composite parent, ModifyListener modifyListener, Object data)
	{
		Text text = new Text(parent,SWT.BORDER);
		text.setTextLimit(5);
		text.setData(data);
		if (modifyListener != null) text.addModifyListener(modifyListener);
		text.addVerifyListener(new IntegerVerifyListener());
		GridData gridData = new GridData();
		gridData.widthHint = 28;
		gridData.horizontalAlignment = GridData.FILL;
		gridData.grabExcessHorizontalSpace = false;
		text.setLayoutData(gridData);
		return text;
	}
	
	private Image createImage(String name)
	{
		ImageData source;
		try
		{
			source = new ImageData(name);
		}
{'fraction_non_alphanumeric': 0.07383521979468281, 'fraction_numerical': 0.007370360621216109, 'mean_word_length': 5.48932536293766, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6979999', 'n_tokens_mistral': 2493, 'n_tokens_neox': 2320, 'n_words': 663}