Search in sources :

Example 6 with GraphReport

use of au.gov.asd.tac.constellation.plugins.reporting.GraphReport in project constellation by constellation-app.

the class NotesViewPane method setGraphReport.

/**
 * Set the plugin reports that have executed on the current graph report.
 */
protected void setGraphReport(final NotesViewController controller) {
    final Graph activeGraph = GraphManager.getDefault().getActiveGraph();
    if (activeGraph != null) {
        final GraphReport currentGraphReport = GraphReportManager.getGraphReport(activeGraph.getId());
        if (currentGraphReport != null) {
            // Iterates the list of currently executed plugins.
            currentGraphReport.getPluginReports().forEach(pluginReport -> {
                // Omit low level plugins which are not useful as notes.
                if (!pluginReport.hasLowLevelTag()) {
                    addPluginReport(pluginReport);
                }
            });
            SwingUtilities.invokeLater(() -> {
                final TopComponent tc = WindowManager.getDefault().findTopComponent(NotesViewTopComponent.class.getSimpleName());
                if (tc != null && tc.isOpened()) {
                    // Update the Notes View UI.
                    updateNotesUI();
                    updateFilters();
                }
            });
            controller.writeState(activeGraph);
        }
    }
}
Also used : ReadableGraph(au.gov.asd.tac.constellation.graph.ReadableGraph) Graph(au.gov.asd.tac.constellation.graph.Graph) GraphReport(au.gov.asd.tac.constellation.plugins.reporting.GraphReport) TopComponent(org.openide.windows.TopComponent)

Aggregations

GraphReport (au.gov.asd.tac.constellation.plugins.reporting.GraphReport)6 PluginReport (au.gov.asd.tac.constellation.plugins.reporting.PluginReport)5 PluginException (au.gov.asd.tac.constellation.plugins.PluginException)4 PluginInteraction (au.gov.asd.tac.constellation.plugins.PluginInteraction)4 ExecutionException (java.util.concurrent.ExecutionException)4 PluginGraphs (au.gov.asd.tac.constellation.plugins.PluginGraphs)2 Graph (au.gov.asd.tac.constellation.graph.Graph)1 ReadableGraph (au.gov.asd.tac.constellation.graph.ReadableGraph)1 DualGraph (au.gov.asd.tac.constellation.graph.locking.DualGraph)1 PluginSynchronizer (au.gov.asd.tac.constellation.plugins.PluginSynchronizer)1 TopComponent (org.openide.windows.TopComponent)1 BeforeMethod (org.testng.annotations.BeforeMethod)1