private void run(SearchPatternData[] data, String scope) { List wrappers= new ArrayList(); List properties= new ArrayList(); for (int i= 0; i < data.length; i++) { SearchPatternData current= data[i]; if (current.getWrapperClass() != null || current.getPropertyFile() != null) { wrappers.add(current.getWrapperClass()); properties.add(current.getPropertyFile()); } } IType[] accessorClasses= (IType[])wrappers.toArray(new IType[wrappers.size()]); IFile[] propertieFiles= (IFile[])properties.toArray(new IFile[properties.size()]); SearchBrokenNLSKeysUtil.search(scope, accessorClasses, propertieFiles); }
String name= file.getName(); if (resourceName.endsWith(name)) { return new SearchPatternData(type, file);
private void run(SearchPatternData[] data, String scope) { List<IType> wrappers= new ArrayList<>(); List<IFile> properties= new ArrayList<>(); for (int i= 0; i < data.length; i++) { SearchPatternData current= data[i]; if (current.getWrapperClass() != null || current.getPropertyFile() != null) { wrappers.add(current.getWrapperClass()); properties.add(current.getPropertyFile()); } } IType[] accessorClasses= wrappers.toArray(new IType[wrappers.size()]); IFile[] propertieFiles= properties.toArray(new IFile[properties.size()]); SearchBrokenNLSKeysUtil.search(scope, accessorClasses, propertieFiles); }
private SearchPatternData tryIfPropertyFileSelected(IFile file) { IType accessorType= getAccessorType(file); return (accessorType != null) ? new SearchPatternData(accessorType, file) : null; }
private void run(SearchPatternData[] data, String scope) { List<IType> wrappers= new ArrayList<>(); List<IFile> properties= new ArrayList<>(); for (int i= 0; i < data.length; i++) { SearchPatternData current= data[i]; if (current.getWrapperClass() != null || current.getPropertyFile() != null) { wrappers.add(current.getWrapperClass()); properties.add(current.getPropertyFile()); } } IType[] accessorClasses= wrappers.toArray(new IType[wrappers.size()]); IFile[] propertieFiles= properties.toArray(new IFile[properties.size()]); SearchBrokenNLSKeysUtil.search(scope, accessorClasses, propertieFiles); }
private SearchPatternData tryIfPropertyCuSelected(ICompilationUnit compilationUnit) throws JavaModelException { IStorage bundle= getResourceBundle(compilationUnit); if (!(bundle instanceof IFile)) return null; return new SearchPatternData(compilationUnit.getTypes()[0], (IFile) bundle); }
private SearchPatternData tryIfPropertyCuSelected(ICompilationUnit compilationUnit) throws JavaModelException { if (compilationUnit == null) return null; if (!ActionUtil.isOnBuildPath(compilationUnit)) return null; IType[] types= compilationUnit.getTypes(); if (types.length > 1) return null; IStorage bundle= NLSHintHelper.getResourceBundle(compilationUnit); if (!(bundle instanceof IFile)) return null; return new SearchPatternData(types[0], (IFile)bundle); }
private SearchPatternData tryIfPropertyFileSelected(IFile file) { IType accessorType= getAccessorType(file); return (accessorType != null) ? new SearchPatternData(accessorType, file) : null; }
private SearchPatternData tryIfPropertyCuSelected(ICompilationUnit compilationUnit) throws JavaModelException { IStorage bundle= getResourceBundle(compilationUnit); if (!(bundle instanceof IFile)) return null; return new SearchPatternData(compilationUnit.getTypes()[0], (IFile) bundle); }