private SearchPatternData tryIfPropertyFileSelected(IFile file) { IType accessorType= getAccessorType(file); return (accessorType != null) ? new SearchPatternData(accessorType, file) : null; }
private SearchPatternData tryIfPropertyFileSelected(IFile file) { IType accessorType= getAccessorType(file); return (accessorType != null) ? new SearchPatternData(accessorType, file) : null; }
private IType findAccessorType(IProgressMonitor pm) throws JavaModelException { IType accessorType= FindBrokenNLSKeysAction.getAccessorType(fFile); if (accessorType != null) return accessorType; if (pm != null && pm.isCanceled()) { return null; } IContainer parent= fFile.getParent(); IJavaElement javaElement= JavaCore.create(parent); if (!(javaElement instanceof IPackageFragment)) return null; ICompilationUnit[] compilationUnits= ((IPackageFragment) javaElement).getCompilationUnits(); for (int i= 0; i < compilationUnits.length; i++) { if (evaluateCU(compilationUnits[i], fFile)) { return compilationUnits[i].getTypes()[0]; } if (pm != null && pm.isCanceled()) { return null; } } return null; }
private IType findAccessorType(IProgressMonitor pm) throws JavaModelException { IType accessorType= FindBrokenNLSKeysAction.getAccessorType(fFile); if (accessorType != null) return accessorType; if (pm != null && pm.isCanceled()) { return null; } IContainer parent= fFile.getParent(); IJavaElement javaElement= JavaCore.create(parent); if (!(javaElement instanceof IPackageFragment)) return null; ICompilationUnit[] compilationUnits= ((IPackageFragment) javaElement).getCompilationUnits(); for (int i= 0; i < compilationUnits.length; i++) { if (evaluateCU(compilationUnits[i], fFile)) { return compilationUnits[i].getTypes()[0]; } if (pm != null && pm.isCanceled()) { return null; } } return null; }