Deprecated GraphBuilder API

Is the Diagram API the intended replacement for GraphBuilder/GraphBuilderFactory, and if so, is there a migration guide or example?

I’m trying to update the Struts 2 plugin (donated by JetBrains to ASF) but was hit by this issue, two deprecated methods with no public replacement:

  1. GraphBuilder.initialize() — called once after graph construction to set up the initial render

  2. GraphBuilder.queueUpdate() — called to refresh the graph when underlying DOM changes

The plugin visualizes Struts 2 action flow diagrams (actions → results) from struts.xml. The full pattern is:

// Create graph + view
Graph2D graph = GraphManager.getGraphManager().createGraph2D();
Graph2DView view = GraphManager.getGraphManager().createGraph2DView();

// Create data/presentation models
StrutsDataModel dataModel = new StrutsDataModel(xmlFile);
StrutsPresentationModel presentationModel = new StrutsPresentationModel(graph);

// Build via factory
myBuilder = GraphBuilderFactory.getInstance(project)
.createGraphBuilder(graph, view, dataModel, presentationModel);
Disposer.register(this, myBuilder);

// DEPRECATED: initialize the graph
myBuilder.initialize();

// DEPRECATED: refresh on DOM changes
DomManager.getDomManager(project).addDomEventListener(event → {
if (isShowing()) {
myBuilder.queueUpdate();
}
}, this);

Thanks for any hint!

Łukasz

Hey,
just for the record, they are not @Deprecated, but @Internal. I will ping the Platform team for some advice.

Right, but queueUpdate() is marked as deprecated