String title= JavaPlugin.getResourceString(INPUT_PREFIX+"title"); String message= JavaPlugin.getResourceString(INPUT_PREFIX+"message");
String title= ReorgMessages.getString("renameAction.rename.title"); String message= ReorgMessages.getString("renameAction.newName");
	protected void renameElement(final Object element) {		if (!confirmIfUnsaved(element))			return;					String title= JavaPlugin.getResourceString(INPUT_PREFIX+"title");		String message= JavaPlugin.getResourceString(INPUT_PREFIX+"message");		final INamingPolicy policy= ReorgSupportFactory.createNamingPolicy(element);		IInputValidator validator= new IInputValidator() {			int k= 0;			public String isValid(String name) {				Object parent= getJavaParent(element);				return policy.isValidNewName(element, parent, name);			}		};		Image img= Dialog.getImage(Dialog.DLG_IMG_QUESTION);		Shell activeShell= JavaPlugin.getActiveWorkbenchShell();		InputDialog dialog= new InputDialog(activeShell, title, message, getElementName(element), validator);		if (dialog.open() != dialog.OK)			return;					String id= JavaPlugin.getDefault().getDescriptor().getUniqueIdentifier();		String statusString= JavaPlugin.getResourceString(ERROR_PREFIX+"status");		final MultiStatus status= new MultiStatus(id, IStatus.OK, statusString, null);		final String newName= dialog.getValue();		final List renamedElements= new ArrayList();		if (newName != null && !newName.equals("")) {			WorkspaceModifyOperation op= new WorkspaceModifyOperation() {				public void execute(IProgressMonitor pm) {					IRenameSupport support= ReorgSupportFactory.createRenameSupport(element);					try {						Object renamedElement= support.rename(element, newName, pm);						if (renamedElement != null)							renamedElements.add(renamedElement);					} catch (CoreException e) {						status.merge(e.getStatus());					}				}			};			try {				new ProgressMonitorDialog(activeShell).run(true, true, op);			} catch (InvocationTargetException e) {				// this will never happen			} catch (InterruptedException e) {				return;			}			if (!status.isOK()) {				Throwable t= new JavaUIException(status);				ResourceBundle bundle= JavaPlugin.getResourceBundle();				ExceptionHandler.handle(t, activeShell, bundle, ERROR_PREFIX);			} else {				select(activeShell, renamedElements);			}		}	}