private void newButtonPressed() { final CreateProfileDialog p= new CreateProfileDialog(fComposite.getShell(), fProfileManager, fProfileVersioner); if (p.open() != Window.OK) return; if (!p.openEditDialog()) return; final StatusDialog modifyDialog= createModifyDialog(fComposite.getShell(), p.getCreatedProfile(), fProfileManager, fProfileStore, true); modifyDialog.open(); }
@Override public void modifyText(ModifyEvent e) { doValidation(); } });
@Override public void create() { super.create(); setTitle(FormatterMessages.CreateProfileDialog_dialog_title); }
layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.verticalSpacing= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); gd.widthHint= convertWidthInCharsToPixels(60); final Label nameLabel = new Label(composite, SWT.WRAP); nameLabel.setText(FormatterMessages.CreateProfileDialog_profile_name_label_text); updateStatus(fEmpty); applyDialogFont(composite);
gd.widthHint= convertWidthInCharsToPixels(60); final Label nameLabel = new Label(composite, SWT.WRAP); nameLabel.setText(FormatterMessages.CreateProfileDialog_profile_name_label_text); updateStatus(fEmpty); applyDialogFont(composite);
@Override protected void okPressed() { if (!getStatus().isOK()) return; JavaPlugin.getDefault().getDialogSettings().put(PREF_OPEN_EDIT_DIALOG, fOpenEditDialog); final Map<String, String> baseSettings= new HashMap<>(fSortedProfiles.get(fProfileCombo.getSelectionIndex()).getSettings()); final String profileName= fNameText.getText(); fCreatedProfile= new CustomProfile(profileName, baseSettings, fProfileVersioner.getCurrentVersion(), fProfileVersioner.getProfileKind()); fProfileManager.addProfile(fCreatedProfile); super.okPressed(); }
/** * Validate the current settings */ protected void doValidation() { final String name= fNameText.getText().trim(); if (fProfileManager.containsName(name)) { updateStatus(fDuplicate); return; } if (name.length() == 0) { updateStatus(fEmpty); return; } updateStatus(fOk); }
gd.widthHint= convertWidthInCharsToPixels(60); final Label nameLabel = new Label(composite, SWT.WRAP); nameLabel.setText(FormatterMessages.CreateProfileDialog_profile_name_label_text); updateStatus(fEmpty); applyDialogFont(composite);
@Override protected void okPressed() { if (!getStatus().isOK()) return; JavaPlugin.getDefault().getDialogSettings().put(PREF_OPEN_EDIT_DIALOG, fOpenEditDialog); final Map<String, String> baseSettings= new HashMap<>(fSortedProfiles.get(fProfileCombo.getSelectionIndex()).getSettings()); final String profileName= fNameText.getText(); fCreatedProfile= new CustomProfile(profileName, baseSettings, fProfileVersioner.getCurrentVersion(), fProfileVersioner.getProfileKind()); fProfileManager.addProfile(fCreatedProfile); super.okPressed(); }
/** * Validate the current settings */ protected void doValidation() { final String name= fNameText.getText().trim(); if (fProfileManager.containsName(name)) { updateStatus(fDuplicate); return; } if (name.length() == 0) { updateStatus(fEmpty); return; } updateStatus(fOk); }
private void newButtonPressed() { final CreateProfileDialog p= new CreateProfileDialog(fComposite.getShell(), fProfileManager, fProfileVersioner); if (p.open() != Window.OK) return; if (!p.openEditDialog()) return; final StatusDialog modifyDialog= createModifyDialog(fComposite.getShell(), p.getCreatedProfile(), fProfileManager, fProfileStore, true); modifyDialog.open(); }
@Override public void create() { super.create(); setTitle(FormatterMessages.CreateProfileDialog_dialog_title); }
@Override public void modifyText(ModifyEvent e) { doValidation(); } });
protected void okPressed() { if (!getStatus().isOK()) return; JavaPlugin.getDefault().getDialogSettings().put(PREF_OPEN_EDIT_DIALOG, fOpenEditDialog); final Map baseSettings= new HashMap(((Profile)fSortedProfiles.get(fProfileCombo.getSelectionIndex())).getSettings()); final String profileName= fNameText.getText(); fCreatedProfile= new CustomProfile(profileName, baseSettings, fProfileVersioner.getCurrentVersion(), fProfileVersioner.getProfileKind()); fProfileManager.addProfile(fCreatedProfile); super.okPressed(); }
/** * Validate the current settings */ protected void doValidation() { final String name= fNameText.getText().trim(); if (fProfileManager.containsName(name)) { updateStatus(fDuplicate); return; } if (name.length() == 0) { updateStatus(fEmpty); return; } updateStatus(fOk); }
private void newButtonPressed() { final CreateProfileDialog p= new CreateProfileDialog(fComposite.getShell(), fProfileManager, fProfileVersioner); if (p.open() != Window.OK) return; if (!p.openEditDialog()) return; final StatusDialog modifyDialog= createModifyDialog(fComposite.getShell(), p.getCreatedProfile(), fProfileManager, fProfileStore, true); modifyDialog.open(); }
public void create() { super.create(); setTitle(FormatterMessages.CreateProfileDialog_dialog_title); }
public void modifyText(ModifyEvent e) { doValidation(); } });