Search in sources :

Example 6 with Janitor

use of org.codehaus.groovy.control.Janitor in project grails-core by grails.

the class GrailsASTUtils method warning.

public static void warning(final SourceUnit sourceUnit, final ASTNode node, final String warningMessage) {
    final String sample = sourceUnit.getSample(node.getLineNumber(), node.getColumnNumber(), new Janitor());
    System.err.println("WARNING: " + warningMessage + "\n\n" + sample);
}
Also used : Janitor(org.codehaus.groovy.control.Janitor)

Aggregations

Janitor (org.codehaus.groovy.control.Janitor)6 SourceText (org.codehaus.groovy.runtime.powerassert.SourceText)3 SourceTextNotAvailableException (org.codehaus.groovy.runtime.powerassert.SourceTextNotAvailableException)2 Before (org.junit.Before)2 Label (org.objectweb.asm.Label)2 MethodVisitor (org.objectweb.asm.MethodVisitor)2