edu.cmu.sei.aadl.modelsupport.errorreporting
Class ParseErrorReporterManager

java.lang.Object
  extended by edu.cmu.sei.aadl.modelsupport.errorreporting.AbstractErrorReporterManager
      extended by edu.cmu.sei.aadl.modelsupport.errorreporting.ParseErrorReporterManager
All Implemented Interfaces:
ErrorReporterManager, InternalErrorReporter

public final class ParseErrorReporterManager
extends AbstractErrorReporterManager

This class manages the creation and use of edu.cmu.sei.aadl.model.pluginsupport.ParseErrorReporter instances across a set of AADL text file resources. The manager indexes error reportrs using the OS specific path name of the file.

The manager is supplied with a edu.cmu.sei.aadl.model.pluginsupport.ParseErrorReporterFactory instance that is used to create the error reporters.

Primary purpose of this class is to serve as a cache of parse error reporters that ensures each reporter is "cleared" only the first time it is retreived. Also coordinates errors counts across a set of parsed files. This class used to have more functionality that is now rolled into edu.cmu.sei.aadl.model.pluginsupport.AnalysisToParseErrorReporterAdapter.

Author:
aarong
See Also:
edu.cmu.sei.aadl.model.pluginsupport.ParseErrorReporter, edu.cmu.sei.aadl.model.pluginsupport.ParseErrorReporterFactory

Constructor Summary
ParseErrorReporterManager(InternalErrorReporter ier, ParseErrorReporterFactory fact)
           
 
Method Summary
 int getNumErrors()
          Get the total number of errors across all the error reporters being managed.
 int getNumInfos()
          Get the total number of information messages across all the error reporters being managed.
 int getNumMessages()
          Get the total number of errors and warnings across all the error reports being managed.
 int getNumWarnings()
          Get the total number of warnings across all the error reporters being managed.
 ParseErrorReporter getReporter(org.eclipse.core.resources.IResource aadlRsrc)
          Get the error reporter that is associated with AADL Text file named by the given filename.
 
Methods inherited from class edu.cmu.sei.aadl.modelsupport.errorreporting.AbstractErrorReporterManager
getNumInternalErrors, internalError, internalError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParseErrorReporterManager

public ParseErrorReporterManager(InternalErrorReporter ier,
                                 ParseErrorReporterFactory fact)
Method Detail

getReporter

public final ParseErrorReporter getReporter(org.eclipse.core.resources.IResource aadlRsrc)
Get the error reporter that is associated with AADL Text file named by the given filename.

Parameters:
aadlRsrc - The IResource associated with the AADL text file to get an error reporter for. This may be null if the IResource doesn't exist. This is the case when dealing with standard property sets because they do not exist in the Eclipse workspace and thus do not have IResources. But see ParseErrorReporterFactory regarding null.

getNumErrors

public final int getNumErrors()
Get the total number of errors across all the error reporters being managed.


getNumWarnings

public final int getNumWarnings()
Get the total number of warnings across all the error reporters being managed.


getNumInfos

public final int getNumInfos()
Get the total number of information messages across all the error reporters being managed.


getNumMessages

public final int getNumMessages()
Get the total number of errors and warnings across all the error reports being managed.

See Also:
InternalErrorReporter.getNumInternalErrors()