use of com.intellij.ide.errorTreeView.GroupingElement in project intellij-community by JetBrains.
the class ProblemsViewImpl method addMessage.
@Override
public void addMessage(final int type, @NotNull final String[] text, @Nullable final String groupName, @Nullable final Navigatable navigatable, @Nullable final String exportTextPrefix, @Nullable final String rendererTextPrefix, @Nullable final UUID sessionId) {
myViewUpdater.execute(() -> {
final ErrorViewStructure structure = myPanel.getErrorViewStructure();
final GroupingElement group = structure.lookupGroupingElement(groupName);
if (group != null && sessionId != null && !sessionId.equals(group.getData())) {
structure.removeElement(group);
}
if (navigatable != null) {
myPanel.addMessage(type, text, groupName, navigatable, exportTextPrefix, rendererTextPrefix, sessionId);
} else {
myPanel.addMessage(type, text, null, -1, -1, sessionId);
}
updateIcon();
});
}
use of com.intellij.ide.errorTreeView.GroupingElement 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;
}
Aggregations