Search in sources :

Example 6 with ErrorHandler

use of org.eclipse.titanium.error.ErrorHandler 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 7 with ErrorHandler

use of org.eclipse.titanium.error.ErrorHandler 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

ErrorHandler (org.eclipse.titanium.error.ErrorHandler)7 ConsoleErrorHandler (org.eclipse.titanium.error.ConsoleErrorHandler)6 ComponentGraphGenerator (org.eclipse.titanium.graph.generators.ComponentGraphGenerator)4 ModuleGraphGenerator (org.eclipse.titanium.graph.generators.ModuleGraphGenerator)4 File (java.io.File)2 IOException (java.io.IOException)2 URI (java.net.URI)2 JAXBException (javax.xml.bind.JAXBException)2 BaseCluster (org.eclipse.titanium.graph.clustering.BaseCluster)2 ClustererBuilder (org.eclipse.titanium.graph.clustering.ClustererBuilder)2 GraphGenerator (org.eclipse.titanium.graph.generators.GraphGenerator)2 ExecutionException (org.eclipse.core.commands.ExecutionException)1 IFile (org.eclipse.core.resources.IFile)1 IResource (org.eclipse.core.resources.IResource)1 GUIErrorHandler (org.eclipse.titanium.error.GUIErrorHandler)1 ComponentGraphEditor (org.eclipse.titanium.graph.gui.windows.ComponentGraphEditor)1 IEditorPart (org.eclipse.ui.IEditorPart)1 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)1 FileEditorInput (org.eclipse.ui.part.FileEditorInput)1