Search in sources :

Example 1 with MessagePrinter

use of org.neo4j.tooling.procedure.messages.MessagePrinter in project neo4j by neo4j.

the class PerformsWriteProcessor method init.

@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    messagePrinter = new MessagePrinter(processingEnv.getMessager());
    visitor = new PerformsWriteMethodVisitor();
}
Also used : PerformsWriteMethodVisitor(org.neo4j.tooling.procedure.visitors.PerformsWriteMethodVisitor) MessagePrinter(org.neo4j.tooling.procedure.messages.MessagePrinter)

Example 2 with MessagePrinter

use of org.neo4j.tooling.procedure.messages.MessagePrinter in project neo4j by neo4j.

the class DuplicationAwareBaseProcessor method init.

@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    messagePrinter = new MessagePrinter(processingEnv.getMessager());
    duplicationValidator = new DuplicatedExtensionValidator<>(processingEnv.getElementUtils(), supportedAnnotationType, customNameFunction);
    visitor = visitorSupplier.apply(processingEnv);
}
Also used : MessagePrinter(org.neo4j.tooling.procedure.messages.MessagePrinter)

Example 3 with MessagePrinter

use of org.neo4j.tooling.procedure.messages.MessagePrinter in project neo4j by neo4j.

the class ProcedureProcessor method init.

@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    Types typeUtils = processingEnv.getTypeUtils();
    Elements elementUtils = processingEnv.getElementUtils();
    visitedProcedures.clear();
    messagePrinter = new MessagePrinter(processingEnv.getMessager());
    visitor = new StoredProcedureVisitor(typeUtils, elementUtils, processingEnv.getOptions().containsKey(IGNORE_CONTEXT_WARNINGS));
    duplicationPredicate = new DuplicatedProcedureValidator<>(elementUtils, sprocType, ProcedureProcessor::getCustomName);
}
Also used : Types(javax.lang.model.util.Types) MessagePrinter(org.neo4j.tooling.procedure.messages.MessagePrinter) StoredProcedureVisitor(org.neo4j.tooling.procedure.visitors.StoredProcedureVisitor) Elements(javax.lang.model.util.Elements)

Example 4 with MessagePrinter

use of org.neo4j.tooling.procedure.messages.MessagePrinter in project neo4j by neo4j.

the class UserFunctionProcessor method init.

@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    Types typeUtils = processingEnv.getTypeUtils();
    Elements elementUtils = processingEnv.getElementUtils();
    visitedFunctions.clear();
    messagePrinter = new MessagePrinter(processingEnv.getMessager());
    visitor = new UserFunctionVisitor(typeUtils, elementUtils, new TypeMirrorUtils(typeUtils, elementUtils));
    duplicationPredicate = new DuplicatedProcedureValidator<>(elementUtils, userFunctionType, UserFunctionProcessor::getCustomName);
}
Also used : Types(javax.lang.model.util.Types) UserFunctionVisitor(org.neo4j.tooling.procedure.visitors.UserFunctionVisitor) MessagePrinter(org.neo4j.tooling.procedure.messages.MessagePrinter) Elements(javax.lang.model.util.Elements) TypeMirrorUtils(org.neo4j.tooling.procedure.compilerutils.TypeMirrorUtils)

Aggregations

MessagePrinter (org.neo4j.tooling.procedure.messages.MessagePrinter)4 Elements (javax.lang.model.util.Elements)2 Types (javax.lang.model.util.Types)2 TypeMirrorUtils (org.neo4j.tooling.procedure.compilerutils.TypeMirrorUtils)1 PerformsWriteMethodVisitor (org.neo4j.tooling.procedure.visitors.PerformsWriteMethodVisitor)1 StoredProcedureVisitor (org.neo4j.tooling.procedure.visitors.StoredProcedureVisitor)1 UserFunctionVisitor (org.neo4j.tooling.procedure.visitors.UserFunctionVisitor)1