protected boolean isDuplicate( IFile file, Set<IFile> files ) { Set<String> fqnForFile = getModule().getPathCache().getFqnForFile( file ); for( IFile f : files ) { Set<String> fqn = getModule().getPathCache().getFqnForFile( f ); if( fqnForFile.equals( fqn ) ) { return true; } } return false; }
private boolean isClassFile( TypeName tn ) { String fqn = tn.name; int iDollar = fqn.indexOf( '$' ); if( iDollar > 0 ) { fqn = fqn.substring( 0, iDollar ); } PathCache pathCache = getHost().getSingleModule().getPathCache(); return pathCache.getExtensionCache( "class" ).get( fqn ) != null; }
private void findExtensionsOnDisk( Set<String> fqns ) { PathCache pathCache = getModule().getPathCache(); for( IFile file : _model.getFiles() ) { Set<String> fqn = pathCache.getFqnForFile( file ); for( String f : fqn ) { if( f != null ) { fqns.add( f ); } } } }
private void findExtensionsOnDisk( Set<String> fqns ) { PathCache pathCache = getModule().getPathCache(); for( IFile file : _model.getFiles() ) { Set<String> fqn = pathCache.getFqnForFile( file ); for( String f : fqn ) { if( f != null ) { fqns.add( f ); } } } }
@Override public String[] getTypesForFile( IFile file ) { if( !handlesFile( file ) ) { return new String[0]; } Set<String> fqns = getModule().getPathCache().getFqnForFile( file ); Set<String> aliasedFqns = new HashSet<>(); if( fqns != null ) { for( String fqn : fqns ) { fqn = getTypeNameForFile( fqn, file ); if( fqn != null ) { aliasedFqns.add( fqn ); } } } return aliasedFqns.toArray( new String[aliasedFqns.size()] ); }
@Override public boolean handlesFile( IFile file ) Set<String> fqns = getModule().getPathCache().getFqnForFile( file ); if( fqns == null )
@Override public boolean handlesFile( IFile file ) Set<String> fqns = getModule().getPathCache().getFqnForFile( file ); if( fqns == null )
private Map<String, LocklessLazyVar<M>> buildCache() { Map<String, LocklessLazyVar<M>> extensionToModel = new HashMap<>(); FqnCache<IFile> extensionCache = getModule().getPathCache().getExtensionCache( getFileExt() ); Set<String> files = extensionCache.getFqns(); for( String fileFqn : files ) { IFile file = extensionCache.get( fileFqn ); addFile( extensionToModel, file ); } return extensionToModel; }
private Map<String, LocklessLazyVar<M>> buildCache() { Map<String, LocklessLazyVar<M>> extensionToModel = new HashMap<>(); FqnCache<IFile> extensionCache = getModule().getPathCache().getExtensionCache( getFileExt() ); Set<String> files = extensionCache.getFqns(); for( String fileFqn : files ) { IFile file = extensionCache.get( fileFqn ); addFile( extensionToModel, file ); } return extensionToModel; }
private Map<String, Set<IFile>> buildPrimaryFqnToFilesMap() Map<String, FqnCache<IFile>> extensionCaches = getModule().getPathCache().getExtensionCaches(); for( Map.Entry<String, FqnCache<IFile>> entry : extensionCaches.entrySet() )