}
public static void renameProcessDefinition(IStructuredSelection selection) {
IFolder definitionFolder = (IFolder) selection.getFirstElement();
IFile definitionFile = ProjectFinder.getProcessDefinitionFile(definitionFolder);
RenameProcessDefinitionDialog dialog = new RenameProcessDefinitionDialog(definitionFolder);
ProcessDefinition definition = ProcessCache.getProcessDefinition(definitionFile);
dialog.setName(definition.getName());
if(dialog.open() == IDialogConstants.OK_ID) {
String newName = dialog.getName();
try {
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IEditorPart editor = page.findEditor(new FileEditorInput(definitionFile));
if (editor != null) {
page.closeEditor(editor, false);