Class ErrorPattern


  • public class ErrorPattern
    extends java.lang.Object
    Error Pattern - used by Error Parser to convert build output to problem markers
    Since:
    5.1 Clients may extend this class.
    • Constructor Summary

      Constructors 
      Constructor Description
      ErrorPattern​(java.lang.String pattern)
      Pattern for errors that should be skipped.
      ErrorPattern​(java.lang.String pattern, int groupDesc, int severity)
      Pattern for errors not associated file a file (e.g.
      ErrorPattern​(java.lang.String pattern, int groupFileName, int groupLineNum, int groupDesc, int groupVarName, int severity)
      Full Pattern Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDesc​(java.util.regex.Matcher matcher)  
      java.lang.String getFileName​(java.util.regex.Matcher matcher)  
      int getLineNum​(java.util.regex.Matcher matcher)  
      protected org.eclipse.core.runtime.IPath getLocation​(java.lang.String filename)
      If the file designated by filename exists, return the IPath representation of the filename If it does not exist, try cygpath translation
      java.util.regex.Matcher getMatcher​(java.lang.CharSequence input)  
      int getSeverity​(java.util.regex.Matcher matcher)  
      java.lang.String getVarName​(java.util.regex.Matcher matcher)  
      boolean processLine​(java.lang.String line, ErrorParserManager eoParser)
      Parse a line of build output and register error/warning for Problems view.
      protected boolean recordError​(java.util.regex.Matcher matcher, ErrorParserManager eoParser)
      Register the error in ErrorParserManager.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getMatcher

        public java.util.regex.Matcher getMatcher​(java.lang.CharSequence input)
        Parameters:
        input - - input line.
        Returns:
        matcher to interpret the input line.
      • getFileName

        public java.lang.String getFileName​(java.util.regex.Matcher matcher)
        Parameters:
        matcher - - matcher to parse the input line.
        Returns:
        parsed file name or null.
      • getLineNum

        public int getLineNum​(java.util.regex.Matcher matcher)
        Parameters:
        matcher - - matcher to parse the input line.
        Returns:
        parsed line number or 0.
      • getDesc

        public java.lang.String getDesc​(java.util.regex.Matcher matcher)
        Parameters:
        matcher - - matcher to parse the input line.
        Returns:
        parsed description or null.
      • getVarName

        public java.lang.String getVarName​(java.util.regex.Matcher matcher)
        Parameters:
        matcher - - matcher to parse the input line.
        Returns:
        parsed variable name or null.
      • getSeverity

        public int getSeverity​(java.util.regex.Matcher matcher)
        Parameters:
        matcher - - matcher to parse the input line.
        Returns:
        severity of the problem.
      • processLine

        public boolean processLine​(java.lang.String line,
                                   ErrorParserManager eoParser)
        Parse a line of build output and register error/warning for Problems view.
        Parameters:
        line - - one line of output.
        eoParser - - ErrorParserManager.
        Returns:
        true if error/warning/info problem was found.
      • recordError

        protected boolean recordError​(java.util.regex.Matcher matcher,
                                      ErrorParserManager eoParser)
        Register the error in ErrorParserManager.
        Parameters:
        matcher - - matcher to parse the input line.
        eoParser - - ErrorParserManager.
        Returns:
        true indicating that error was found.
      • getLocation

        protected org.eclipse.core.runtime.IPath getLocation​(java.lang.String filename)
        If the file designated by filename exists, return the IPath representation of the filename If it does not exist, try cygpath translation
        Parameters:
        filename - - file name
        Returns:
        location (outside of the workspace).