mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix hierarchy export to file indentation
If a hierarchy node had a null descriptor, indentation was still appended to the string builder, leading to malformed indentation later on.
This commit is contained in:
committed by
Anna.Kozlova
parent
a30bc9faf5
commit
a476b0d038
@@ -58,13 +58,12 @@ class ExporterToTextFileHierarchy implements ExporterToTextFile {
|
||||
}
|
||||
|
||||
private void appendNode(StringBuilder buf, DefaultMutableTreeNode node, String lineSeparator, String indent) {
|
||||
buf.append(indent);
|
||||
final String childIndent;
|
||||
if (node.getParent() != null) {
|
||||
childIndent = indent + " ";
|
||||
final HierarchyNodeDescriptor descriptor = myHierarchyBrowserBase.getDescriptor(node);
|
||||
if (descriptor != null) {
|
||||
buf.append(descriptor.getHighlightedText().getText()).append(lineSeparator);
|
||||
buf.append(indent).append(descriptor.getHighlightedText().getText()).append(lineSeparator);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user