IType primaryType= movedUnit.findPrimaryType(); importEdit.removeImport(JavaModelUtil.getFullyQualifiedName(primaryType)); importEdit.addImport(fDestination.getElementName() + "." + primaryType.getElementName());
IImportDeclaration importDecl= (IImportDeclaration)results[j].getEnclosingElement(); importEdit.removeImport(importDecl.getElementName()); importEdit.addImport(createStringForNewImport(movedUnit, importDecl));
	private void addReferenceUpdates(TextChangeManager changeManager, ICompilationUnit movedUnit, IProgressMonitor pm) throws JavaModelException, CoreException {		SearchResultGroup[] references = getReferences(movedUnit, pm);		for (int i= 0; i < references.length; i++){			IJavaElement el= JavaCore.create(references[i].getResource());			if (! (el instanceof ICompilationUnit))				continue;			ICompilationUnit referencingCu= (ICompilationUnit)el;			SearchResult[] results= references[i].getSearchResults();			for (int j= 0; j < results.length; j++){				if (isQualifiedReference(results[j])){					TextEdit edit= new UpdateTypeReferenceEdit(results[j], getPackage(movedUnit), fDestination);					changeManager.get(referencingCu).addTextEdit(RefactoringCoreMessages.getString("MoveCuUpdateCreator.update_references"), edit); //$NON-NLS-1$				}					if (results[j].getEnclosingElement().getElementType() == IJavaElement.IMPORT_DECLARATION){					ImportEdit importEdit= getImportEdit(referencingCu);					IType primaryType= movedUnit.findPrimaryType();					importEdit.removeImport(JavaModelUtil.getFullyQualifiedName(primaryType));					importEdit.addImport(fDestination.getElementName() + "." + primaryType.getElementName()); //$NON-NLS-1$				}				}		}	}