Examples of printMessage()


Examples of javax.annotation.processing.Messager.printMessage()

                messager.printMessage(NOTE, String.format("Generating code for [%s]", md.storeClassName));
                StoreGenerator generator = new StoreGenerator();
                final StringBuffer code = generator.generate(md);
                writeCode(md.packageName, md.storeClassName, code);

                messager.printMessage(NOTE,
                        String.format("Successfully generated store implementation [%s]", md.storeClassName));
            } catch (GenerationException ge) {
                final String msg = ge.getMessage();
                messager.printMessage(Diagnostic.Kind.ERROR, msg/* , storeElement*/);
            }
View Full Code Here

Examples of javax.annotation.processing.Messager.printMessage()

                messager.printMessage(NOTE,
                        String.format("Successfully generated store implementation [%s]", md.storeClassName));
            } catch (GenerationException ge) {
                final String msg = ge.getMessage();
                messager.printMessage(Diagnostic.Kind.ERROR, msg/* , storeElement*/);
            }
        }

        // GraphVIZ
        String graphVizFile = writeGraphViz();
View Full Code Here

Examples of javax.annotation.processing.Messager.printMessage()

    private String writeGraphViz() throws GenerationException, IOException {
        final Messager messager = processingEnv.getMessager();
        GraphVizGenerator generator = new GraphVizGenerator();
        StringBuffer code = generator.generate(graphVizInfos.values());
        messager.printMessage(NOTE,
                "Generating GraphViz file to visualize store dependencies [" + GRAPH_VIZ_OUTPUT + "]");
        FileObject fo = processingEnv.getFiler()
                .createResource(StandardLocation.SOURCE_OUTPUT, "", GRAPH_VIZ_OUTPUT);
        Writer w = fo.openWriter();
        BufferedWriter bw = new BufferedWriter(w);
View Full Code Here

Examples of javax.annotation.processing.Messager.printMessage()

        Writer w = fo.openWriter();
        BufferedWriter bw = new BufferedWriter(w);
        bw.append(code);
        bw.close();
        w.close();
        messager.printMessage(NOTE, "Successfully generated GraphViz file [" + GRAPH_VIZ_OUTPUT + "]");
        return fo.getName();
    }

    private void validateDAG(final String graphVizFile) throws GenerationException {
        boolean cyclesFound = false;
View Full Code Here

Examples of javax.annotation.processing.Messager.printMessage()

        boolean cyclesFound = false;
        final Messager messager = processingEnv.getMessager();
        for (Map.Entry<String, Multimap<String, String>> entry : dagValidation.entrySet()) {
            String payload = entry.getKey();
            Multimap<String, String> dependencies = entry.getValue();
            messager.printMessage(NOTE, "Check cyclic dependencies for action [" + payload + "]");
            DirectedGraph<String, DefaultEdge> dg = new DefaultDirectedGraph<>(DefaultEdge.class);

            // vertices
            for (String store : dependencies.keySet()) {
                dg.addVertex(store);
View Full Code Here

Examples of javax.annotation.processing.Messager.printMessage()

                StringBuilder cycleInfo = new StringBuilder();
                for (String cycle : cycles) {
                    cycleInfo.append(cycle).append(" -> ");
                }
                cycleInfo.append(cycles.get(0));
                messager.printMessage(ERROR,
                        "Cyclic dependencies detected for action [" + payload + "]: " + cycleInfo);
                messager.printMessage(ERROR, "Please review [" + graphVizFile + "] for more details.");
            }
            if (!cyclesFound) {
                messager.printMessage(NOTE, "No cyclic dependencies found for action [" + payload + "]");
View Full Code Here

Examples of javax.annotation.processing.Messager.printMessage()

                    cycleInfo.append(cycle).append(" -> ");
                }
                cycleInfo.append(cycles.get(0));
                messager.printMessage(ERROR,
                        "Cyclic dependencies detected for action [" + payload + "]: " + cycleInfo);
                messager.printMessage(ERROR, "Please review [" + graphVizFile + "] for more details.");
            }
            if (!cyclesFound) {
                messager.printMessage(NOTE, "No cyclic dependencies found for action [" + payload + "]");
            }
        }
View Full Code Here

Examples of javax.annotation.processing.Messager.printMessage()

                messager.printMessage(ERROR,
                        "Cyclic dependencies detected for action [" + payload + "]: " + cycleInfo);
                messager.printMessage(ERROR, "Please review [" + graphVizFile + "] for more details.");
            }
            if (!cyclesFound) {
                messager.printMessage(NOTE, "No cyclic dependencies found for action [" + payload + "]");
            }
        }
    }
}
View Full Code Here

Examples of javax.annotation.processing.Messager.printMessage()

            return true;
        }

        Messager messager = processingEnv.getMessager();

        messager.printMessage(Diagnostic.Kind.NOTE, "PathAnnotationProcessor now in processing.");
        try {
            List<PathInfo> pathList = new ArrayList<PathInfo>(annotations.size());
            List<Element> elementList = new ArrayList<Element>();
            for (TypeElement type : annotations) {
                Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith(type);
View Full Code Here

Examples of javax.annotation.processing.Messager.printMessage()

            FileObject file = createXmlFile(filer, messager, elementList);
            setupMountPoint(mountPoint, pathList);
            writeMountPoint(context, file, mountPoint);
        } catch (JAXBException ex) {
            messager.printMessage(Diagnostic.Kind.ERROR, "Can not create a java source file");
            LOGGER.error("Can not create a java source file", ex);
        } catch (IOException ex) {
            messager.printMessage(Diagnostic.Kind.ERROR, "Can not create a java source file");
            LOGGER.error("Can not create a java source file", ex);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.