org.netbeans.modules.parsing.api/1 1.55.0 6

org.netbeans.modules.parsing.spi.indexing
Class ErrorsCache

java.lang.Object
  extended by org.netbeans.modules.parsing.spi.indexing.ErrorsCache

public class ErrorsCache
extends Object

Cache of errors in a file. The errors are shown in the projects tab and tasklist, as appropriate.

Since:
1.30

Nested Class Summary
static interface ErrorsCache.Convertor<T>
          Getter for properties of the given error description.
static class ErrorsCache.ErrorKind
           
 
Method Summary
static Collection<? extends URL> getAllFilesInError(URL root)
          Return all files with error badge under the given source root
static boolean isInError(FileObject file, boolean recursive)
          Whether or not the given file has an error badge.
static
<T> void
setErrors(URL root, Indexable i, Iterable<? extends T> errors, ErrorsCache.Convertor<T> convertor)
          Sets errors for a file/indexable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setErrors

public static <T> void setErrors(URL root,
                                 Indexable i,
                                 Iterable<? extends T> errors,
                                 ErrorsCache.Convertor<T> convertor)
Sets errors for a file/indexable. All previously set errors are forgotten.

Parameters:
root - inside which the given file resides
i - indexable for which the errors are being set
errors - errors to set
convertor - getter for properties of T. The methods on the convertor are not invoked after this method finishes.

isInError

public static boolean isInError(FileObject file,
                                boolean recursive)
Whether or not the given file has an error badge.

Parameters:
file - file to test
recursive - true if and only if folders should be tested recursively
Returns:
true if the given file or folder has an error badge

getAllFilesInError

public static Collection<? extends URL> getAllFilesInError(URL root)
                                                    throws IOException
Return all files with error badge under the given source root

Parameters:
root - source root to test
Returns:
all files with error badge under the given root
Throws:
IOException

org.netbeans.modules.parsing.api/1 1.55.0 6

Built on May 24 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.