IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
Variable variable = (Variable) selection.getFirstElement();
UpdateVariableNameDialog dialog = new UpdateVariableNameDialog(editor.getDefinition());
dialog.setName(variable.getName());
int result = dialog.open();
if (result != IDialogConstants.OK_ID) {
return;
}
String replacement = dialog.getName();