org.eclipse.jface.text.source.AnnotationModel#org.eclipse.jface.dialogs.InputDialog源码实例Demo

下面列出了org.eclipse.jface.text.source.AnnotationModel#org.eclipse.jface.dialogs.InputDialog 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: http4e   文件: ProxyItemListEditor.java
protected String getNewInputObject(){
   String returnvalue = null;
   ProxyInputDialog inputDialog = new ProxyInputDialog(getShell());
   if (inputDialog.open() == InputDialog.OK) {
      // check for valid Input
      try {
         String name = inputDialog.getName();
         String host = inputDialog.getHost();
         String port = inputDialog.getPort();

         String inputText = name + "," + host + "," + port;

         // parse String for empty fields
         ProxyItem.createFromString(inputText);

         returnvalue = inputText;
      } catch (Exception e) {
         MessageDialog.openError(getShell(), "Wrong entry", "None of the fields must be left blank");
      }
   }
   return returnvalue;
}
 
源代码2 项目: xds-ide   文件: SdkToolsControl.java
private String editGroupName(String initialName, final Set<String> usedNames) {
    InputDialog dlg = new InputDialog(getShell(), Messages.SdkToolsControl_NewGroupName, 
            Messages.SdkToolsControl_EnterGroupName+':', initialName, 
            new IInputValidator() 
    {
        @Override
        public String isValid(String newText) {
            newText = newText.trim();
            if (newText.isEmpty()) {
                return Messages.SdkToolsControl_NameIsEmpty;
            } else if (usedNames.contains(newText)) {
                return Messages.SdkToolsControl_NameIsUsed;
            }
            return null;
        }
    });
    if (dlg.open() == Window.OK) {
        return dlg.getValue().trim();
    }
    return null;
}
 
源代码3 项目: gama   文件: RenameResourceAction.java
/**
 * Return the new name to be given to the target resource.
 *
 * @return java.lang.String
 * @param resource
 *            the resource to query status on
 */
protected String queryNewResourceName(final IResource resource) {
	final IWorkspace workspace = IDEWorkbenchPlugin.getPluginWorkspace();
	final IPath prefix = resource.getFullPath().removeLastSegments(1);
	final IInputValidator validator = string -> {
		if (resource.getName().equals(string)) {
			return IDEWorkbenchMessages.RenameResourceAction_nameMustBeDifferent;
		}
		final IStatus status = workspace.validateName(string, resource.getType());
		if (!status.isOK()) { return status.getMessage(); }
		if (workspace.getRoot().exists(prefix.append(string))) {
			return IDEWorkbenchMessages.RenameResourceAction_nameExists;
		}
		return null;
	};

	final InputDialog dialog =
			new InputDialog(WorkbenchHelper.getShell(), IDEWorkbenchMessages.RenameResourceAction_inputDialogTitle,
					IDEWorkbenchMessages.RenameResourceAction_inputDialogMessage, resource.getName(), validator);
	dialog.setBlockOnOpen(true);
	final int result = dialog.open();
	if (result == Window.OK) { return dialog.getValue(); }
	return null;
}
 
源代码4 项目: ermaster-b   文件: VGroupEditPart.java
/**
	 * {@inheritDoc}
	 */
	@Override
	public void performRequestOpen() {
		VGroup group = (VGroup) this.getModel();
		ERDiagram diagram = this.getDiagram();

//		VGroup copyGroup = group.clone();

		InputDialog dialog = new InputDialog(
				PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
				"�O���[�v���ύX", "�O���[�v�����͂��ĉ������B", group.getName(), null);

		if (dialog.open() == IDialogConstants.OK_ID) {
			CompoundCommand command = new CompoundCommand();
			command.add(new ChangeVGroupNameCommand(diagram, group, dialog.getValue()));
			this.executeCommand(command.unwrap());
		}
	}
 
源代码5 项目: erflute   文件: ChangeVirtualDiagramNameAction.java
@Override
public void execute(Event event) {
    final ERDiagram diagram = getDiagram();
    final List<?> selectedEditParts = getTreeViewer().getSelectedEditParts();
    final EditPart editPart = (EditPart) selectedEditParts.get(0);
    final Object model = editPart.getModel();
    if (model instanceof ERVirtualDiagram) {
        final ERVirtualDiagram vdiagram = (ERVirtualDiagram) model;
        final InputVirtualDiagramNameValidator validator = new InputVirtualDiagramNameValidator(diagram, vdiagram.getName());
        final InputDialog dialog = new InputDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Rename",
                "Input new name", vdiagram.getName(), validator);
        if (dialog.open() == IDialogConstants.OK_ID) {
            final ChangeVirtualDiagramNameCommand command = new ChangeVirtualDiagramNameCommand(vdiagram, dialog.getValue());
            execute(command);
        }
    }
}
 
源代码6 项目: slr-toolkit   文件: CreateTermHandler.java
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
	ISelection selection = HandlerUtil.getCurrentSelectionChecked(event);
	if (selection == null || !(selection instanceof IStructuredSelection)) {
		return null;
	}
	IStructuredSelection currentSelection = (IStructuredSelection) selection;
	if (currentSelection.size() == 1) {
		Term term = (Term) currentSelection.getFirstElement();	
		CreateTermDialog dialog = new CreateTermDialog(null, term.getName());
		dialog.setBlockOnOpen(true);
		if (dialog.open() == InputDialog.OK) {
			TermCreator.create(dialog.getTermName(), term, dialog.getTermPosition());							
		}
	}	
	return null;
}
 
源代码7 项目: slr-toolkit   文件: RenameTermHandler.java
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {			
	ISelection selection = HandlerUtil.getCurrentSelectionChecked(event);
	if (selection == null || !(selection instanceof IStructuredSelection)) {
		return null;
	}
	IStructuredSelection currentSelection = (IStructuredSelection) selection;
	if (currentSelection.size() == 1) {
		Term term = (Term) currentSelection.getFirstElement();	
		InputDialog dialog = new InputDialog(
				null,
				"Rename Term", 
				"Rename Term: " + term.getName() + " to:",
				term.getName(),
				null);
		dialog.setBlockOnOpen(true);
		if (dialog.open() == InputDialog.OK) {
			TermRenamer.rename(term, dialog.getValue());
		}
	}		
	return null;
}
 
private static INewNameQuery createStaticQuery(final IInputValidator validator, final String message, final String initial, final Shell shell){
	return new INewNameQuery(){
		public String getNewName() throws OperationCanceledException {
			InputDialog dialog= new InputDialog(shell, ReorgMessages.ReorgQueries_nameConflictMessage, message, initial, validator) {
				/* (non-Javadoc)
				 * @see org.eclipse.jface.dialogs.InputDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
				 */
				@Override
				protected Control createDialogArea(Composite parent) {
					Control area= super.createDialogArea(parent);
					TextFieldNavigationHandler.install(getText());
					return area;
				}
			};
			if (dialog.open() == Window.CANCEL)
				throw new OperationCanceledException();
			return dialog.getValue();
		}
	};
}
 
源代码9 项目: ermaster-b   文件: ERModelAddAction.java
@Override
	public void execute(Event event) throws Exception {
		ERDiagram diagram = this.getDiagram();

		Settings settings = (Settings) diagram.getDiagramContents()
				.getSettings().clone();

		InputDialog dialog = new InputDialog(
				PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
				"�_�C�A�O�����쐬", "�_�C�A�O����������͂��ĉ������B", "", null);
		if (dialog.open() == IDialogConstants.OK_ID) {
			AddERModelCommand command = new AddERModelCommand(diagram, dialog.getValue());
			this.execute(command);
		}
		
//		CategoryManageDialog dialog = new CategoryManageDialog(PlatformUI
//				.getWorkbench().getActiveWorkbenchWindow().getShell(),
//				settings, diagram);
//
//		if (dialog.open() == IDialogConstants.OK_ID) {
//			ChangeSettingsCommand command = new ChangeSettingsCommand(diagram,
//					settings);
//			this.execute(command);
//		}
	}
 
源代码10 项目: JDeodorant   文件: ZoomInputAction.java
public void run() {  

		Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();  
		String dialogBoxTitle = "Custom Zoom";  
		String message = "Enter Zoom Value (in percent): ";  
		String initialValue = "";
		
		
		InputDialog dialog = new InputDialog(shell, dialogBoxTitle, message, initialValue, new ZoomValueValidator() );
		if(dialog.open() == Window.OK){
			String value = dialog.getValue();
			if(value != null && (root != null || root2!= null)){
				if(isFreeform)
				this.root.setScale(Double.parseDouble(value)/100);
				else
					this.root2.setScale(Double.parseDouble(value)/100);
			}
		}
	}
 
源代码11 项目: birt   文件: LevelPropertyDialog.java
private void handleDefaultValueEditEvent( )
{
	InputDialog dialog = new InputDialog(this.getShell( ), DEFAULTVALUE_EDIT_TITLE, DEFAULTVALUE_EDIT_LABEL, DEUtil.resolveNull( input.getDefaultValue( )), null);
	if(dialog.open( ) == Window.OK){
		String value = dialog.getValue( );
		try
		{
			if(value==null || value.trim( ).length( ) == 0)
				input.setDefaultValue( null );
			else input.setDefaultValue( value.trim( ) );
			defaultValueViewer.refresh( );
		}
		catch ( SemanticException e )
		{
			ExceptionHandler.handle( e );
		}
	}
}
 
源代码12 项目: birt   文件: CubeGroupContent.java
/**
 * @deprecated
 */
private InputDialog createInputDialog( ReportElementHandle handle,
		String title, String message )
{
	InputDialog inputDialog = new InputDialog( getShell( ),
			title,
			message,
			handle.getName( ),
			null ) {

		public int open( )
		{

			return super.open( );
		}
	};
	inputDialog.create( );
	return inputDialog;
}
 
源代码13 项目: birt   文件: ExportElementToLibraryAction.java
private void doRename( )
{

	if ( selectedObj instanceof DesignElementHandle
			|| selectedObj instanceof EmbeddedImageHandle )
	{
		initOriginalName( );
		InputDialog inputDialog = new InputDialog( UIUtil.getDefaultShell( ),
				Messages.getString( "ExportElementToLibraryAction.DialogTitle" ), //$NON-NLS-1$
				Messages.getString( "ExportElementToLibraryAction.DialogMessage" ), //$NON-NLS-1$
				originalName,
				null );
		inputDialog.create( );
		clickOK = false;
		if ( inputDialog.open( ) == Window.OK )
		{
			saveChanges( inputDialog.getValue( ).trim( ) );
			clickOK = true;
		}
	}
}
 
源代码14 项目: Pydev   文件: DialogHelpers.java
public static Integer openAskInt(String title, String message, int initial) {
    Shell shell = EditorUtils.getShell();
    String initialValue = "" + initial;
    IInputValidator validator = new IInputValidator() {

        @Override
        public String isValid(String newText) {
            if (newText.length() == 0) {
                return "At least 1 char must be provided.";
            }
            try {
                Integer.parseInt(newText);
            } catch (Exception e) {
                return "A number is required.";
            }
            return null;
        }
    };
    InputDialog dialog = new InputDialog(shell, title, message, initialValue, validator);
    dialog.setBlockOnOpen(true);
    if (dialog.open() == Window.OK) {
        return Integer.parseInt(dialog.getValue());
    }
    return null;
}
 
源代码15 项目: Pydev   文件: DjangoMakeMigrations.java
@Override
public void run(IAction action) {
    IInputValidator validator = new IInputValidator() {

        @Override
        public String isValid(String newText) {
            if (newText.trim().length() == 0) {
                return "Name cannot be empty";
            }
            return null;
        }
    };
    InputDialog d = new InputDialog(EditorUtils.getShell(), "App name",
            "Name of the django app to makemigrations on", "",
            validator);

    int retCode = d.open();
    if (retCode == InputDialog.OK) {
        createApp(d.getValue().trim());
    }
}
 
源代码16 项目: Pydev   文件: DjangoCreateApp.java
@Override
public void run(IAction action) {
    IInputValidator validator = new IInputValidator() {

        @Override
        public String isValid(String newText) {
            if (newText.trim().length() == 0) {
                return "Name cannot be empty";
            }
            return null;
        }
    };
    InputDialog d = new InputDialog(EditorUtils.getShell(), "App name", "Name of the django app to be created", "",
            validator);

    int retCode = d.open();
    if (retCode == InputDialog.OK) {
        createApp(d.getValue().trim());
    }
}
 
源代码17 项目: elexis-3-core   文件: FallPlaneRechnung.java
public Object execute(ExecutionEvent arg0) throws ExecutionException{
	InputDialog dlg =
		new InputDialog(UiDesk.getTopShell(), Messages.FallPlaneRechnung_PlanBillingHeading,
			Messages.FallPlaneRechnung_PlanBillingAfterDays, "30", new IInputValidator() { //$NON-NLS-1$
			
				public String isValid(String newText){
					if (newText.matches("[0-9]*")) { //$NON-NLS-1$
						return null;
					}
					return Messages.FallPlaneRechnung_PlanBillingPleaseEnterPositiveInteger;
				}
			});
	if (dlg.open() == Dialog.OK) {
		return dlg.getValue();
	}
	return null;
}
 
源代码18 项目: elexis-3-core   文件: AddStringEntryAction.java
@Override
public void run(){
	InputDialog inputDialog = new InputDialog(UiDesk.getTopShell(), "Hinzufügen",
		"Bitte geben Sie die Bezeichnung an", null, null);
	int retVal = inputDialog.open();
	if (retVal != Dialog.OK) {
		return;
	}
	String value = inputDialog.getValue();
	
	if (targetCollection != null) {
		targetCollection.add(value);
		structuredViewer.setInput(targetCollection);
	} else {
		Object input = structuredViewer.getInput();
		if (input instanceof Collection) {
			((Collection<String>) input).add(value);
			structuredViewer.refresh();
		}
		super.run();
	}
}
 
源代码19 项目: olca-app   文件: ModelEditor.java
@Override
@SuppressWarnings("unchecked")
public void doSaveAs() {
	InputDialog diag = new InputDialog(UI.shell(), M.SaveAs, M.SaveAs,
			model.name + " - Copy", (name) -> {
				if (Strings.nullOrEmpty(name))
					return M.NameCannotBeEmpty;
				if (Strings.nullOrEqual(name, model.name))
					return M.NameShouldBeDifferent;
				return null;
			});
	if (diag.open() != Window.OK)
		return;
	String newName = diag.getValue();
	try {
		T clone = (T) model.clone();
		clone.name = newName;
		clone = dao.insert(clone);
		App.openEditor(clone);
		Navigator.refresh();
	} catch (Exception e) {
		log.error("failed to save " + model + " as " + newName, e);
	}
}
 
源代码20 项目: olca-app   文件: DbRenameAction.java
@Override
public void run() {
	if (config == null) {
		IDatabaseConfiguration conf = Database.getActiveConfiguration();
		if (!(conf instanceof DerbyConfiguration))
			return;
		config = (DerbyConfiguration) conf;
	}
	InputDialog dialog = new InputDialog(UI.shell(),
			M.Rename,
			M.PleaseEnterANewName,
			config.getName(), null);
	if (dialog.open() != Window.OK)
		return;
	String newName = dialog.getValue();
	if (!DbUtils.isValidName(newName) || Database.getConfigurations()
			.nameExists(newName.trim())) {
		MsgBox.error(M.DatabaseRenameError);
		return;
	}
	doRename(newName);
}
 
源代码21 项目: olca-app   文件: DbCopyAction.java
@Override
public void run() {
	if (config == null) {
		IDatabaseConfiguration conf = Database.getActiveConfiguration();
		if (!(conf instanceof DerbyConfiguration))
			return;
		config = (DerbyConfiguration) conf;
	}
	InputDialog dialog = new InputDialog(UI.shell(),
			M.Copy,
			M.PleaseEnterAName,
			config.getName(), null);
	if (dialog.open() != Window.OK)
		return;
	String newName = dialog.getValue();
	if (!DbUtils.isValidName(newName) || Database.getConfigurations()
			.nameExists(newName.trim())) {
		MsgBox.error(M.NewDatabase_InvalidName);
		return;
	}
	App.runInUI("Copy database", () -> doCopy(newName));
}
 
源代码22 项目: n4js   文件: MassOpenHandler.java
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
	final InputDialog dlg = new InputDialog(Display.getCurrent().getActiveShell(), "Mass Open",
			"Enter file names to open\n(separated by space, comma, or semicolon; no paths, just files names):",
			"", null);
	if (dlg.open() == Window.OK) {
		final Set<String> fileNames = parseNamesString(dlg.getValue());
		openEditors(fileNames);
	}
	return null;
}
 
源代码23 项目: neoscada   文件: ConfigurationFormToolkit.java
@Override
public void runWithEvent ( final Event event )
{
    final InputDialog dialog = new InputDialog ( this.shell, "Add key", "Enter the name of the key to add", "", null );
    if ( dialog.open () == Window.OK )
    {
        this.map.put ( dialog.getValue (), "" );
    }
}
 
源代码24 项目: neoscada   文件: FactoryEditor.java
public void handleInsert ()
{
    final InputDialog dlg = new InputDialog ( getSite ().getShell (), "Create new configuration", "Enter the id of the new configuration object to create", "", null );
    if ( dlg.open () == Window.OK )
    {
        insertEntry ( dlg.getValue () );
    }
}
 
源代码25 项目: http4e   文件: GetUserInput.java
protected Control createContents( Composite parent){
   Composite composite = new Composite(parent, SWT.NONE);
   composite.setLayout(new GridLayout(1, false));

   // Create a label to display what the user typed in
   final Label label = new Label(composite, SWT.NONE);
   label.setText("This will display the user input from InputDialog");

   // Create the button to launch the error dialog
   Button show = new Button(composite, SWT.PUSH);
   show.setText("Get Input");
   show.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected( SelectionEvent event){
         InputDialog dlg = new InputDialog(
               Display.getCurrent().getActiveShell(), 
               "Enter Input", "Enter Input", 
               label.getText(), new LengthValidator());
         if (dlg.open() == Window.OK) {
            // User clicked OK; update the label with the input
            label.setText(dlg.getValue());
         }
      }
   });

   parent.pack();
   return composite;
}
 
源代码26 项目: http4e   文件: SSLEditor.java
protected String getNewInputObject(){
   String returnvalue = null;
   SSLInputDialog inputDialog = new SSLInputDialog(getShell());
   if (inputDialog.open() == InputDialog.OK) {
      // check for valid Input
      try {
         returnvalue = inputDialog.getName();
      } catch (Exception e) {
         MessageDialog.openError(getShell(), "Wrong entry", "Wrong entry");
      }
   }
   return returnvalue;
}
 
源代码27 项目: JAADAS   文件: SootConfigManagerDialog.java
private void renamePressed(){
	if (getSelected() == null) return;
	
	String result = this.getSelected();
	
	IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
	
	// gets current number of configurations
	int config_count = 0;
	int oldNameCount = 0;
	try {
		config_count = settings.getInt(Messages.getString("SootConfigManagerDialog.config_count")); //$NON-NLS-1$
	}
	catch (NumberFormatException e) {	
	}

	ArrayList currentNames = new ArrayList();
	for (int i = 1; i <= config_count; i++) {
		currentNames.add(settings.get(Messages.getString("SootConfigManagerDialog.soot_run_config")+i)); //$NON-NLS-1$
		if (((String)currentNames.get(i-1)).equals(result)){
			oldNameCount = i;
		}
	}

	
	// sets validator to know about already used names 
	SootConfigNameInputValidator validator = new SootConfigNameInputValidator();
	validator.setAlreadyUsed(currentNames);
	
	InputDialog nameDialog = new InputDialog(this.getShell(), Messages.getString("SootConfigManagerDialog.Rename_Saved_Configuration"), Messages.getString("SootConfigManagerDialog.Enter_new_name"), "", validator);  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
	nameDialog.open();
	if (nameDialog.getReturnCode() == Dialog.OK){
		settings.put(Messages.getString("SootConfigManagerDialog.soot_run_config")+oldNameCount, nameDialog.getValue()); //$NON-NLS-1$
		settings.put(nameDialog.getValue(), settings.getArray(result));
		getTreeRoot().renameChild(result, nameDialog.getValue());
		saveMainClass(nameDialog.getValue(), settings.get(result+"_mainClass"));
	}
	refreshTree();
}
 
源代码28 项目: JAADAS   文件: SootConfigManagerDialog.java
private void clonePressed(){
	if (getSelected() == null) return;
	
	String result = this.getSelected();
	
	IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
	
	// gets current number of configurations
	int config_count = 0;
	try {
		config_count = settings.getInt(Messages.getString("SootConfigManagerDialog.config_count")); //$NON-NLS-1$
	}
	catch (NumberFormatException e) {	
	}
	ArrayList currentNames = new ArrayList();
	for (int i = 1; i <= config_count; i++) {
		currentNames.add(settings.get(Messages.getString("SootConfigManagerDialog.soot_run_config")+i)); //$NON-NLS-1$
		
	}

	
	// sets validator to know about already used names 
	SootConfigNameInputValidator validator = new SootConfigNameInputValidator();
	validator.setAlreadyUsed(currentNames);
	
	InputDialog nameDialog = new InputDialog(this.getShell(), Messages.getString("SootConfigManagerDialog.Clone_Saved_Configuration"), Messages.getString("SootConfigManagerDialog.Enter_new_name"), result, validator);  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
	nameDialog.open();
	if (nameDialog.getReturnCode() == Dialog.OK){
		config_count++;
		settings.put(Messages.getString("SootConfigManagerDialog.soot_run_config")+config_count, nameDialog.getValue()); //$NON-NLS-1$
		settings.put(nameDialog.getValue(), settings.getArray(result));
		settings.put(Messages.getString("SootConfigManagerDialog.config_count"), config_count); //$NON-NLS-1$
		getTreeRoot().addChild(new SootConfiguration(nameDialog.getValue()));
		saveMainClass(nameDialog.getValue(), settings.get(result+"_mainClass"));
	}
	refreshTree();
}
 
源代码29 项目: texlipse   文件: SaveAsTemplateAction.java
/**
 * Creates a window for entering the template name, checks the user's input and
 * proceeds to save the template. 
 */
public void run(IAction action) {
    
    IFile file = ((FileEditorInput)editor.getEditorInput()).getFile();
    String fullname = file.getFullPath().toString();
    
    // create dialog
    InputQueryDialog dialog = new InputQueryDialog(editor.getEditorSite().getShell(),
            TexlipsePlugin.getResourceString("templateSaveDialogTitle"),
            TexlipsePlugin.getResourceString("templateSaveDialogMessage").replaceAll("%s", fullname),
            file.getName().substring(0,file.getName().lastIndexOf('.')),
            new IInputValidator() {
        public String isValid(String newText) {
            if (newText != null && newText.length() > 0) {
                return null; // no error
            }
            return TexlipsePlugin.getResourceString("templateSaveErrorFileName");
        }});
    
    if (dialog.open() == InputDialog.OK) {
        String newName = dialog.getInput();
        
        // check existing
        boolean reallySave = true;
        if (ProjectTemplateManager.templateExists(newName)) {
            reallySave = MessageDialog.openConfirm(editor.getSite().getShell(),
                    TexlipsePlugin.getResourceString("templateSaveOverwriteTitle"),
                    TexlipsePlugin.getResourceString("templateSaveOverwriteText").replaceAll("%s", newName));
        }
        
        if (reallySave) {
            ProjectTemplateManager.saveProjectTemplate(file, newName);
        }
    }
}
 
源代码30 项目: olca-app   文件: GroupPage.java
private ProcessGroupSet createGroupSet() throws Exception {
	Shell shell = page.getEditorSite().getShell();
	InputDialog dialog = new InputDialog(shell, M.SaveAs,
			M.PleaseEnterAName, "", null);
	int code = dialog.open();
	if (code == Window.CANCEL)
		return null;
	ProcessGroupSet set = new ProcessGroupSet();
	set.name = dialog.getValue();
	new ProcessGroupSetDao(Database.get()).insert(set);
	return set;
}