Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] AbstractErrorParser question

Title: AbstractErrorParser question

AbstractErrorParser#processLine has an interesting comment in it.

        public boolean processLine(String line, ErrorParserManager eoParser) {
                for (int i = 0; i < patterns.length; ++i)
                        if (patterns[i].processLine(line, eoParser))
                                break;
                // Should this return true if we processed a line?
                return false;
        }

My understanding is that processLine should return true if it generates a marker from the line.  Otherwise, the same line is passed to other error parsers which may also handle it.  We've been seeing duplicate warning markers for a while but wasn't sure why.  Any reason why we shouldn't change this to this?

        public boolean processLine(String line, ErrorParserManager eoParser) {
                for (int i = 0; i < patterns.length; ++i)
                        if (patterns[i].processLine(line, eoParser))
                                return true;
                return false;
        }


Back to the top