Search in sources :

Example 1 with GraphGenerator

use of org.eclipse.titanium.graph.generators.GraphGenerator in project titan.EclipsePlug-ins by eclipse.

the class SonarDataExporter method exportComponentDot.

private void exportComponentDot(final URI exportDir) {
    final URI filePath = URIUtil.append(exportDir, "component_graph.dot");
    final ErrorHandler errorHandler = new ConsoleErrorHandler();
    final GraphGenerator generator = new ComponentGraphGenerator(project, errorHandler);
    try {
        generator.generateGraph();
        GraphHandler.saveGraphToDot(generator.getGraph(), filePath.getPath(), project.getName());
    } catch (Exception e) {
        errorHandler.reportException("Error while exporting the component graph", e);
    }
}
Also used : ConsoleErrorHandler(org.eclipse.titanium.error.ConsoleErrorHandler) ErrorHandler(org.eclipse.titanium.error.ErrorHandler) GraphGenerator(org.eclipse.titanium.graph.generators.GraphGenerator) ModuleGraphGenerator(org.eclipse.titanium.graph.generators.ModuleGraphGenerator) ComponentGraphGenerator(org.eclipse.titanium.graph.generators.ComponentGraphGenerator) ConsoleErrorHandler(org.eclipse.titanium.error.ConsoleErrorHandler) URI(java.net.URI) ComponentGraphGenerator(org.eclipse.titanium.graph.generators.ComponentGraphGenerator) IOException(java.io.IOException) JAXBException(javax.xml.bind.JAXBException)

Example 2 with GraphGenerator

use of org.eclipse.titanium.graph.generators.GraphGenerator in project titan.EclipsePlug-ins by eclipse.

the class SonarDataExporter method exportModuleDot.

private void exportModuleDot(final URI exportDir) {
    final URI filePath = URIUtil.append(exportDir, "module_graph.dot");
    final ErrorHandler errorHandler = new ConsoleErrorHandler();
    final GraphGenerator generator = new ModuleGraphGenerator(project, errorHandler);
    try {
        generator.generateGraph();
        GraphHandler.saveGraphToDot(generator.getGraph(), filePath.getPath(), project.getName());
    } catch (Exception e) {
        errorHandler.reportException("Error while exporting the module graph", e);
    }
}
Also used : ConsoleErrorHandler(org.eclipse.titanium.error.ConsoleErrorHandler) ErrorHandler(org.eclipse.titanium.error.ErrorHandler) ModuleGraphGenerator(org.eclipse.titanium.graph.generators.ModuleGraphGenerator) GraphGenerator(org.eclipse.titanium.graph.generators.GraphGenerator) ModuleGraphGenerator(org.eclipse.titanium.graph.generators.ModuleGraphGenerator) ComponentGraphGenerator(org.eclipse.titanium.graph.generators.ComponentGraphGenerator) ConsoleErrorHandler(org.eclipse.titanium.error.ConsoleErrorHandler) URI(java.net.URI) IOException(java.io.IOException) JAXBException(javax.xml.bind.JAXBException)

Aggregations

IOException (java.io.IOException)2 URI (java.net.URI)2 JAXBException (javax.xml.bind.JAXBException)2 ConsoleErrorHandler (org.eclipse.titanium.error.ConsoleErrorHandler)2 ErrorHandler (org.eclipse.titanium.error.ErrorHandler)2 ComponentGraphGenerator (org.eclipse.titanium.graph.generators.ComponentGraphGenerator)2 GraphGenerator (org.eclipse.titanium.graph.generators.GraphGenerator)2 ModuleGraphGenerator (org.eclipse.titanium.graph.generators.ModuleGraphGenerator)2