1 package org.simantics.scl.ui.imports.internal;
3 import java.util.ArrayList;
5 import org.eclipse.jface.dialogs.Dialog;
6 import org.eclipse.jface.dialogs.InputDialog;
7 import org.eclipse.swt.widgets.Shell;
8 import org.simantics.scl.compiler.commands.CommandSessionImportEntry;
9 import org.simantics.scl.ui.imports.ImportModulesAction;
11 public class ManualImportModulesAction extends ImportModulesAction {
13 public static final ManualImportModulesAction INSTANCE = new ManualImportModulesAction();
15 public ManualImportModulesAction() {
16 super("Add freeform module", 100.0);
20 public boolean editImports(Shell shell, ArrayList<CommandSessionImportEntry> imports) {
21 InputDialog dialog = new InputDialog(shell, "Select module", "Write the full name of the module",
23 if(dialog.open() == Dialog.OK) {
24 new CommandSessionImportEntry(dialog.getValue(), "", true).addTo(imports);