Search in sources :

Example 1 with ComponentGraphGenerator

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

the class ComponentGraphEditor method initGeneratorAndHandler.

@Override
protected void initGeneratorAndHandler(final Composite parent) {
    handler = new GraphHandler();
    generator = new ComponentGraphGenerator(((IFileEditorInput) getEditorInput()).getFile().getProject(), errorHandler);
}
Also used : GraphHandler(org.eclipse.titanium.graph.visualization.GraphHandler) ComponentGraphGenerator(org.eclipse.titanium.graph.generators.ComponentGraphGenerator)

Example 2 with ComponentGraphGenerator

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

the class SaveComponentNet method exportInformationForProject.

@Override
protected void exportInformationForProject(final String[] args, final IProject project, final IProgressMonitor monitor) {
    final ErrorHandler errorHandler = new ConsoleErrorHandler();
    final ComponentGraphGenerator generator = new ComponentGraphGenerator(project, errorHandler);
    try {
        generator.generateGraph();
        GraphHandler.saveGraphToPajek(generator.getGraph(), args[0] + project.getName() + ".net");
    } catch (Exception e) {
        errorHandler.reportException("Error while exporting", e);
    }
}
Also used : ConsoleErrorHandler(org.eclipse.titanium.error.ConsoleErrorHandler) ErrorHandler(org.eclipse.titanium.error.ErrorHandler) ConsoleErrorHandler(org.eclipse.titanium.error.ConsoleErrorHandler) ComponentGraphGenerator(org.eclipse.titanium.graph.generators.ComponentGraphGenerator)

Example 3 with ComponentGraphGenerator

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

the class SaveComponentDot method exportInformationForProject.

@Override
protected void exportInformationForProject(final String[] args, final IProject project, final IProgressMonitor monitor) {
    final ErrorHandler errorHandler = new ConsoleErrorHandler();
    final ComponentGraphGenerator generator = new ComponentGraphGenerator(project, errorHandler);
    try {
        generator.generateGraph();
        GraphHandler.saveGraphToDot(generator.getGraph(), args[0] + project.getName() + ".dot", project.getName());
    } catch (Exception e) {
        errorHandler.reportException("Error while exporting", e);
    }
}
Also used : ConsoleErrorHandler(org.eclipse.titanium.error.ConsoleErrorHandler) ErrorHandler(org.eclipse.titanium.error.ErrorHandler) ConsoleErrorHandler(org.eclipse.titanium.error.ConsoleErrorHandler) ComponentGraphGenerator(org.eclipse.titanium.graph.generators.ComponentGraphGenerator)

Example 4 with ComponentGraphGenerator

use of org.eclipse.titanium.graph.generators.ComponentGraphGenerator 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)

Aggregations

ComponentGraphGenerator (org.eclipse.titanium.graph.generators.ComponentGraphGenerator)4 ConsoleErrorHandler (org.eclipse.titanium.error.ConsoleErrorHandler)3 ErrorHandler (org.eclipse.titanium.error.ErrorHandler)3 IOException (java.io.IOException)1 URI (java.net.URI)1 JAXBException (javax.xml.bind.JAXBException)1 GraphGenerator (org.eclipse.titanium.graph.generators.GraphGenerator)1 ModuleGraphGenerator (org.eclipse.titanium.graph.generators.ModuleGraphGenerator)1 GraphHandler (org.eclipse.titanium.graph.visualization.GraphHandler)1