if (! fScope.encloses((ICompilationUnit)element))
if (! fScope.encloses(element))
	private void addTextMatches(IResource resource, IProgressMonitor pm) throws JavaModelException{		try{			if (resource instanceof IFile){				IJavaElement element= JavaCore.create(resource);				pm.beginTask("", 1); //$NON-NLS-1$				if (!(element instanceof ICompilationUnit))					return;				if (! element.exists())					return;				if (! fScope.encloses((ICompilationUnit)element))					return;				addTextMatches((ICompilationUnit)element);			}			if (resource instanceof IContainer){				IContainer container= (IContainer)resource;				IResource[] members= container.members();				pm.beginTask("", members.length); //$NON-NLS-1$				pm.subTask(RefactoringCoreMessages.getString("TextMatchFinder.searching") + container.getFullPath()); //$NON-NLS-1$				for (int i = 0; i < members.length; i++) {					if (pm.isCanceled())						throw new OperationCanceledException();										addTextMatches(members[i], new SubProgressMonitor(pm, 1));				}				}		} catch (JavaModelException e){			throw e;			} catch (CoreException e){			throw new JavaModelException(e);			} finally{			pm.done();		}		}