use of com.intellij.ide.errorTreeView.ErrorTreeElement in project intellij-community by JetBrains.
the class ExcludeFromCompileAction method getSelectedFile.
@Nullable
private VirtualFile getSelectedFile() {
final ErrorTreeNodeDescriptor descriptor = myErrorTreeView.getSelectedNodeDescriptor();
ErrorTreeElement element = descriptor != null ? descriptor.getElement() : null;
if (element != null && !(element instanceof GroupingElement)) {
NodeDescriptor parent = descriptor.getParentDescriptor();
if (parent instanceof ErrorTreeNodeDescriptor) {
element = ((ErrorTreeNodeDescriptor) parent).getElement();
}
}
return element instanceof GroupingElement ? ((GroupingElement) element).getFile() : null;
}
use of com.intellij.ide.errorTreeView.ErrorTreeElement in project intellij-community by JetBrains.
the class ErrorViewTextExporter method getReportText.
private void getReportText(StringBuffer buffer, final ErrorTreeElement element, boolean withUsages, final int indent) {
final String newline = SystemProperties.getLineSeparator();
Object[] children = myStructure.getChildElements(element);
for (final Object child : children) {
if (!(child instanceof ErrorTreeElement)) {
continue;
}
if (!withUsages && child instanceof NavigatableMessageElement) {
continue;
}
final ErrorTreeElement childElement = (ErrorTreeElement) child;
if (buffer.length() > 0) {
buffer.append(newline);
}
shift(buffer, indent);
exportElement(childElement, buffer, indent, newline);
getReportText(buffer, childElement, withUsages, indent + 4);
}
}
Aggregations