use of com.igormaznitsa.nbmindmap.nb.swing.SortedTreeModelWrapper in project netbeans-mmd-plugin by raydac.
the class MMDNavigator method updateContent.
private void updateContent() {
if (this.treeModel != null) {
this.treeModel.dispose();
}
final String text = getDocumentText();
if (text != null) {
try {
this.treeModel = new SortedTreeModelWrapper(new MindMap(null, new StringReader(text)), this);
this.mindMapTree.setModel(this.treeModel);
Utils.foldUnfoldTree(this.mindMapTree, true);
} catch (IOException ex) {
// NOI18N
LOGGER.error("Can't parse mind map text", ex);
this.mindMapTree.setModel(null);
}
} else {
this.mindMapTree.setModel(null);
}
}
Aggregations