<commit_before>package nak.nakloidGUI.actions.executors;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;

import nak.nakloidGUI.actions.AbstractAction;
import nak.nakloidGUI.coredata.CoreData;
import nak.nakloidGUI.gui.MainWindow;

public class BuildAndPlayAction extends AbstractAction {
	public BuildAndPlayAction(MainWindow mainWindow, CoreData coreData) {
		super(mainWindow, coreData);
		setText("合成して再生(&R)@Ctrl+Space");
		setAccelerator(SWT.CTRL + SWT.SPACE);
	}

	@Override
	public void run() {
		mainWindow.buildAction.run();
		Display.getCurrent().asyncExec(new Runnable () {
			@Override
			public void run() {
				if (coreData.getSongWaveform().isLoaded()) {
					mainWindow.playAction.run();
				} else {
					Display.getCurrent().timerExec(50, this);
				}
			}
		});
	}<commit_msg>build and play action bugfix<commit_after>package nak.nakloidGUI.actions.executors;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;

import nak.nakloidGUI.actions.AbstractAction;
import nak.nakloidGUI.coredata.CoreData;
import nak.nakloidGUI.gui.MainWindow;

public class BuildAndPlayAction extends AbstractAction {
	public BuildAndPlayAction(MainWindow mainWindow, CoreData coreData) {
		super(mainWindow, coreData);
		setText("合成して再生(&R)@Ctrl+Space");
		setAccelerator(SWT.CTRL + SWT.SPACE);
	}

	@Override
	public void run() {
		mainWindow.buildAction.run();
		Display.getCurrent().asyncExec(new Runnable () {
			@Override
			public void run() {
				if (coreData.getSongWaveform() == null) {
					return;
				}
				if (coreData.getSongWaveform().isLoaded()) {
					mainWindow.playAction.run();
				} else {
					Display.getCurrent().timerExec(50, this);
				}
			}
		});
	}
{'fraction_non_alphanumeric': 0.12835472578763127, 'fraction_numerical': 0.002333722287047841, 'mean_word_length': 4.568181818181818, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3868475', 'n_tokens_mistral': 663, 'n_tokens_neox': 585, 'n_words': 96}