mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge branches 'evagl/included-from' and 'master' of git.labs.intellij.net:idea/community
This commit is contained in:
+5
-1
@@ -127,7 +127,7 @@ public class NewErrorTreeViewPanel extends JPanel implements DataProvider, Occur
|
||||
|
||||
myMessagePanel = new JPanel(new BorderLayout());
|
||||
|
||||
myErrorViewStructure = new ErrorViewStructure(project, canHideWarnings());
|
||||
myErrorViewStructure = createErrorViewStructure(project, canHideWarnings());
|
||||
DefaultMutableTreeNode root = new DefaultMutableTreeNode();
|
||||
root.setUserObject(myErrorViewStructure.createDescriptor(myErrorViewStructure.getRootElement(), null));
|
||||
final DefaultTreeModel treeModel = new DefaultTreeModel(root);
|
||||
@@ -180,6 +180,10 @@ public class NewErrorTreeViewPanel extends JPanel implements DataProvider, Occur
|
||||
EditSourceOnDoubleClickHandler.install(myTree);
|
||||
}
|
||||
|
||||
protected ErrorViewStructure createErrorViewStructure(Project project, boolean canHideWarnings) {
|
||||
return new ErrorViewStructure(project, canHideWarnings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
myIsDisposed = true;
|
||||
|
||||
+12
-5
@@ -25,6 +25,8 @@ import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.DefaultActionGroup;
|
||||
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class ErrorViewFactoryImpl implements ErrorViewFactory {
|
||||
public ErrorTreeView createErrorTreeView(Project project,
|
||||
String helpId,
|
||||
@@ -52,12 +54,17 @@ public class ErrorViewFactoryImpl implements ErrorViewFactory {
|
||||
}
|
||||
|
||||
public void close() {
|
||||
ContentManager contentManager = contentManagerProvider.getParentContent();
|
||||
Content content = contentManager.getContent(this);
|
||||
if (content != null) {
|
||||
contentManager.removeContent(content, true);
|
||||
}
|
||||
removeFromContentManager(contentManagerProvider.getParentContent(), this);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static void removeFromContentManager(ContentManager contentManager, ErrorTreeView view) {
|
||||
if (view instanceof JComponent) {
|
||||
Content content = contentManager.getContent((JComponent)view);
|
||||
if (content != null) {
|
||||
contentManager.removeContent(content, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user