Package org.codehaus.plexus.compiler

Examples of org.codehaus.plexus.compiler.CompilerError


        catch ( IOException e )
        {
            throw new CompilerException( "An exception occurred while creating output file", e );
        }

        return Collections.singletonList( new CompilerError( "message 1", shouldFail ) );
    }
View Full Code Here


    private static String MAGIC_LINE_MARKER_2 = ")";


    public static CompilerError parseLine( String line )
    {
        CompilerError ce = null;

        if ( isOutputWithNoColumnNumber( line ) )
        {
            ce = parseLineWithNoColumnNumber( line );
        }
View Full Code Here

            System.err.println( "Unknown output: " + line );

            return null;
        }

        return new CompilerError( file, error, startline, startcolumn, endline, endcolumn, message );

    }
View Full Code Here

            System.err.println( "Unknown output: " + line );

            return null;
        }

        return new CompilerError( file, error, startline, startcolumn, endline, endcolumn, message );
    }
View Full Code Here

        }

        if ( returnCode != 0 && messages.isEmpty() )
        {
            // TODO: exception?
            messages.add( new CompilerError(
                "Failure executing the compiler, but could not parse the error:" + EOL + stringWriter.toString(),
                true ) );
        }

        return messages;
View Full Code Here

        String line = bufferedReader.readLine();

        while ( line != null )
        {
            CompilerError compilerError = DefaultCSharpCompilerParser.parseLine( line );

            if ( compilerError != null )
            {
                messages.add( compilerError );
            }
View Full Code Here

           
            // Convert JDT IProblems into plexus CompilerErrors
            for (IProblem problem: result.getProblems()) {
                if (problem.isWarning()) {
                    if (showWarnings) {
                        compilerErrors.add(new CompilerError(new String(problem.getOriginatingFileName()),
                                                             false,
                                                             problem.getSourceLineNumber(),
                                                             problem.getSourceStart(),
                                                             problem.getSourceLineNumber(),
                                                             problem.getSourceEnd(),
                                                             problem.getMessage()));
                    }
                   
                } else if (problem.isError()) {
                    hasErrors = true;
                    compilerErrors.add(new CompilerError(new String(problem.getOriginatingFileName()),
                                                         true,
                                                         problem.getSourceLineNumber(),
                                                         problem.getSourceStart(),
                                                         problem.getSourceLineNumber(),
                                                         problem.getSourceEnd(),
View Full Code Here

        }

        boolean compilationError = false;

        for (Iterator i = messages.iterator(); i.hasNext();) {
            CompilerError message = (CompilerError) i.next();

            if (message.isError()) {
                compilationError = true;
            }
        }

        if (compilationError) {
            throw new CompilationFailureException(messages);
        } else {
            for (Iterator i = messages.iterator(); i.hasNext();) {
                CompilerError message = (CompilerError) i.next();

                getLog().warn(message.toString());
            }
        }
    }
View Full Code Here

    List messages = new ArrayList();

    String line = bufferedReader.readLine();

    while (line != null) {
      CompilerError compilerError = parseLine(line);

      if (compilerError != null) {
        messages.add(compilerError);
      }
View Full Code Here

      System.err.println("Unknown output: " + line);

      return null;
    }

    return new CompilerError(file, error, startline, startcolumn, endline,
        endcolumn, message);
  }
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.compiler.CompilerError

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.