final String project= fJavaProject.getElementName(); String handle= extended.getAttribute(JavaRefactoringDescriptor.INPUT); if (handle != null && !"".equals(handle)) extended.setAttribute(JavaRefactoringDescriptor.INPUT, getTransformedHandle(project, handle)); int count= 1; String attribute= JavaRefactoringDescriptor.ELEMENT + count; while ((handle= extended.getAttribute(attribute)) != null) { if (!"".equals(handle)) extended.setAttribute(attribute, getTransformedHandle(project, handle)); count++; attribute= JavaRefactoringDescriptor.ELEMENT + count;
if (fJavaProject != null) { final String project= fJavaProject.getElementName(); String handle= extended.getAttribute(JavaRefactoringDescriptor.INPUT); if (handle != null && !"".equals(handle)) extended.setAttribute(JavaRefactoringDescriptor.INPUT, getTransformedHandle(project, handle)); int count= 1; String attribute= JavaRefactoringDescriptor.ELEMENT + count; while ((handle= extended.getAttribute(attribute)) != null) { if (!"".equals(handle)) extended.setAttribute(attribute, getTransformedHandle(project, handle)); count++; attribute= JavaRefactoringDescriptor.ELEMENT + count; }
	protected Refactoring createRefactoring(final RefactoringDescriptor descriptor, final RefactoringStatus status) throws CoreException {		Assert.isNotNull(descriptor);		Refactoring refactoring= null;		if (descriptor instanceof JavaRefactoringDescriptor) {			final JavaRefactoringDescriptor javaDescriptor= (JavaRefactoringDescriptor) descriptor;			JavaRefactoringContribution contribution= javaDescriptor.getContribution();			if (contribution != null)				refactoring= contribution.createRefactoring(descriptor);			else {				final RefactoringContribution refactoringContribution= RefactoringCore.getRefactoringContribution(javaDescriptor.getID());				if (refactoringContribution instanceof JavaRefactoringContribution) {					contribution= (JavaRefactoringContribution) refactoringContribution;					refactoring= contribution.createRefactoring(descriptor);				}			}			if (refactoring != null) {				final RefactoringArguments arguments= javaDescriptor.createArguments();				if (arguments instanceof JavaRefactoringArguments) {					final JavaRefactoringArguments extended= (JavaRefactoringArguments) arguments;					final String project= fJavaProject.getElementName();					String handle= extended.getAttribute(JavaRefactoringDescriptor.INPUT);					if (handle != null && !"".equals(handle)) //$NON-NLS-1$						extended.setAttribute(JavaRefactoringDescriptor.INPUT, getTransformedHandle(project, handle));					int count= 1;					String attribute= JavaRefactoringDescriptor.ELEMENT + count;					while ((handle= extended.getAttribute(attribute)) != null) {						if (!"".equals(handle)) //$NON-NLS-1$							extended.setAttribute(attribute, getTransformedHandle(project, handle));						count++;						attribute= JavaRefactoringDescriptor.ELEMENT + count;					}				}				if (refactoring instanceof IInitializableRefactoringComponent) {					fCurrentRefactoring= (IInitializableRefactoringComponent) refactoring;					fCurrentArguments= arguments;				} else					status.merge(RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.JavaRefactoringDescriptor_initialization_error, javaDescriptor.getID())));			}			return refactoring;		}		return null;	}