<commit_before>package org.dbflute.erflute.editor.view.action.ermodel;

import org.dbflute.erflute.editor.MainDiagramEditor;
import org.dbflute.erflute.editor.controller.command.ermodel.AddVirtualDiagramCommand;
import org.dbflute.erflute.editor.model.ERDiagram;
import org.dbflute.erflute.editor.view.action.AbstractBaseAction;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;

/**
 * @author modified by jflute (originated in ermaster)
 */
public class VirtualDiagramAddAction extends AbstractBaseAction {

    public static final String ID = VirtualDiagramAddAction.class.getName();

    public VirtualDiagramAddAction(MainDiagramEditor editor) {
        super(ID, "new VirtualDiagram()", editor);
    }

    @Override
    public void execute(Event event) throws Exception {
        final ERDiagram diagram = this.getDiagram();
        final Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
        final String dialogTitle = "new VirtualModel()";
        final String dialogMessage = "input name for new Virtual Model";
        final InputDialog dialog = new InputDialog(shell, dialogTitle, dialogMessage, "", null);
        if (dialog.open() == IDialogConstants.OK_ID) {
            final AddVirtualDiagramCommand command = new AddVirtualDiagramCommand(diagram, dialog.getValue());
            execute(command);
        }
    }
}<commit_msg>rename VirtualModel to VirtualDiagram in message<commit_after>package org.dbflute.erflute.editor.view.action.ermodel;

import org.dbflute.erflute.editor.MainDiagramEditor;
import org.dbflute.erflute.editor.controller.command.ermodel.AddVirtualDiagramCommand;
import org.dbflute.erflute.editor.model.ERDiagram;
import org.dbflute.erflute.editor.view.action.AbstractBaseAction;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;

/**
 * @author modified by jflute (originated in ermaster)
 */
public class VirtualDiagramAddAction extends AbstractBaseAction {

    public static final String ID = VirtualDiagramAddAction.class.getName();

    public VirtualDiagramAddAction(MainDiagramEditor editor) {
        super(ID, "new VirtualDiagram()", editor);
    }

    @Override
    public void execute(Event event) throws Exception {
        final ERDiagram diagram = this.getDiagram();
        final Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
        final String dialogTitle = "new VirtualDiagram()";
        final String dialogMessage = "input name for new Virtual Diagram";
        final InputDialog dialog = new InputDialog(shell, dialogTitle, dialogMessage, "", null);
        if (dialog.open() == IDialogConstants.OK_ID) {
            final AddVirtualDiagramCommand command = new AddVirtualDiagramCommand(diagram, dialog.getValue());
            execute(command);
        }
    }
}
{'fraction_non_alphanumeric': 0.09784357901512714, 'fraction_numerical': 0.0, 'mean_word_length': 4.34020618556701, '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': '1376667', 'n_tokens_mistral': 885, 'n_tokens_neox': 870, 'n_words': 189}