{
StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
if ( ( !selection.isEmpty() ) && ( selection.size() == 1 ) )
{
Project project = ( ( ProjectWrapper ) selection.getFirstElement() ).getProject();
RenameProjectDialog dialog = new RenameProjectDialog( project.getName() );
if ( dialog.open() == Dialog.OK )
{
projectsHandler.renameProject( project, dialog.getNewName() );
}
}
}