public boolean close() { final Rectangle shell= getShell().getBounds(); fDialogSettings.put(fKeyPreferredWidth, shell.width); fDialogSettings.put(fKeyPreferredHight, shell.height); fDialogSettings.put(fKeyPreferredX, shell.x); fDialogSettings.put(fKeyPreferredY, shell.y); return super.close(); }
@Override public boolean close() { final Rectangle shell= getShell().getBounds(); fDialogSettings.put(fKeyPreferredWidth, shell.width); fDialogSettings.put(fKeyPreferredHight, shell.height); fDialogSettings.put(fKeyPreferredX, shell.x); fDialogSettings.put(fKeyPreferredY, shell.y); return super.close(); }
private void saveButtonPressed() { Profile selected= new CustomProfile(fProfileNameField.getText(), new HashMap<>(fWorkingValues), fProfile.getVersion(), fProfileManager.getProfileVersioner().getProfileKind()); final FileDialog dialog= new FileDialog(getShell(), SWT.SAVE); dialog.setText(FormatterMessages.CodingStyleConfigurationBlock_save_profile_dialog_title); dialog.setFilterExtensions(new String [] {"*.xml"}); //$NON-NLS-1$ if (file.exists() && !MessageDialog.openQuestion(getShell(), FormatterMessages.CodingStyleConfigurationBlock_save_profile_overwrite_title, Messages.format(FormatterMessages.CodingStyleConfigurationBlock_save_profile_overwrite_message, BasicElementLabels.getPathLabel(file)))) { return; final String title= FormatterMessages.CodingStyleConfigurationBlock_save_profile_error_title; final String message= FormatterMessages.CodingStyleConfigurationBlock_save_profile_error_message; ExceptionHandler.handle(e, getShell(), title, message);
private void saveButtonPressed() { Profile selected= new CustomProfile(fProfileNameField.getText(), new HashMap(fWorkingValues), fProfile.getVersion(), fProfileManager.getProfileVersioner().getProfileKind()); final FileDialog dialog= new FileDialog(getShell(), SWT.SAVE); dialog.setText(FormatterMessages.CodingStyleConfigurationBlock_save_profile_dialog_title); dialog.setFilterExtensions(new String [] {"*.xml"}); //$NON-NLS-1$ if (file.exists() && !MessageDialog.openQuestion(getShell(), FormatterMessages.CodingStyleConfigurationBlock_save_profile_overwrite_title, Messages.format(FormatterMessages.CodingStyleConfigurationBlock_save_profile_overwrite_message, path))) { return; final String title= FormatterMessages.CodingStyleConfigurationBlock_save_profile_error_title; final String message= FormatterMessages.CodingStyleConfigurationBlock_save_profile_error_message; ExceptionHandler.handle(e, getShell(), title, message);
private void saveButtonPressed() { Profile selected= new CustomProfile(fProfileNameField.getText(), new HashMap<>(fWorkingValues), fProfile.getVersion(), fProfileManager.getProfileVersioner().getProfileKind()); final FileDialog dialog= new FileDialog(getShell(), SWT.SAVE | SWT.SHEET); dialog.setText(FormatterMessages.CodingStyleConfigurationBlock_save_profile_dialog_title); dialog.setFilterExtensions(new String [] {"*.xml"}); //$NON-NLS-1$ if (file.exists() && !MessageDialog.openQuestion(getShell(), FormatterMessages.CodingStyleConfigurationBlock_save_profile_overwrite_title, Messages.format(FormatterMessages.CodingStyleConfigurationBlock_save_profile_overwrite_message, BasicElementLabels.getPathLabel(file)))) { return; final String title= FormatterMessages.CodingStyleConfigurationBlock_save_profile_error_title; final String message= FormatterMessages.CodingStyleConfigurationBlock_save_profile_error_message; ExceptionHandler.handle(e, getShell(), title, message);
@Override public boolean close() { final Rectangle shell= getShell().getBounds(); fDialogSettings.put(fKeyPreferredWidth, shell.width); fDialogSettings.put(fKeyPreferredHight, shell.height); fDialogSettings.put(fKeyPreferredX, shell.x); fDialogSettings.put(fKeyPreferredY, shell.y); if (fSashForm != null) { Control[] children= fSashForm.getChildren(); fDialogSettings.put(fKeySashFormLeftWidth, children[0].getSize().x); fDialogSettings.put(fKeySashFormRightWidth, children[1].getSize().x); } if (fTree != null) fTree.saveState(); return super.close(); }