ISelection savedSelection= fTableViewer.getSelection(); if (savedSelection == null) return; if (getSelectedItems().length == 0) return;  if (up) setNewParameterOrder(moveUp()); else setNewParameterOrder(moveDown());  fTableViewer.refresh(); fTableViewer.getControl().setFocus(); fTableViewer.setSelection(savedSelection); tableModified(getNewParameterNames()); }
ISelection selection= fTableViewer.getSelection(); try{ ParameterInfo[] selected= getSelectedItems(); Assert.isTrue(selected.length == 1); ParameterInfo parameterInfo= selected[0]; String key= "Enter a new name for parameter ''{0}'':"; String message= MessageFormat.format(key, new String[]{parameterInfo.oldName}); IInputValidator validator= createParameterNameValidator(parameterInfo.oldName); InputDialog dialog= new InputDialog(getShell(), "Modify Parameter Name", message, parameterInfo.newName, validator); if (dialog.open() == InputDialog.CANCEL) { fTableViewer.setSelection(selection); return; } parameterInfo.newName= dialog.getValue(); tableModified(getNewParameterNames()); fTableViewer.update(parameterInfo, new String[] { PROPERTIES[NEWNAME_PROP]}); } finally { fTableViewer.refresh(); fTableViewer.getControl().setFocus(); fTableViewer.setSelection(selection); } }
			public void widgetSelected(SelectionEvent e) {				ISelection savedSelection= fTableViewer.getSelection();				if (savedSelection == null)					return;				if (getSelectedItems().length == 0)					return;				if (up)					setNewParameterOrder(moveUp());				else						setNewParameterOrder(moveDown());									fTableViewer.refresh();				fTableViewer.getControl().setFocus();				fTableViewer.setSelection(savedSelection);				tableModified(getNewParameterNames());			}