This commit is contained in:
Dmitry Batkovich
2019-03-12 19:31:10 +03:00
parent e691b529db
commit 2ca363c8d8
2 changed files with 4 additions and 5 deletions
@@ -112,7 +112,7 @@ public class InspectionResultsView extends JPanel implements Disposable, DataPro
myScope = globalInspectionContext.getCurrentScope();
myGlobalInspectionContext = globalInspectionContext;
myProvider = provider;
myTree = new InspectionTree(globalInspectionContext, this);
myTree = new InspectionTree(this);
mySplitter = new OnePixelSplitter(false, AnalysisUIOptions.getInstance(globalInspectionContext.getProject()).SPLITTER_PROPORTION);
mySplitter.setFirstComponent(ScrollPaneFactory.createScrollPane(myTree, SideBorder.LEFT));
@@ -66,8 +66,7 @@ public class InspectionTree extends Tree {
private final OccurenceNavigator myOccurenceNavigator = new MyOccurrenceNavigator();
private final InspectionResultsView myView;
public InspectionTree(@NotNull GlobalInspectionContextImpl context,
@NotNull InspectionResultsView view) {
public InspectionTree(@NotNull InspectionResultsView view) {
myView = view;
myModel = new InspectionTreeModel();
Disposer.register(view, myModel);
@@ -93,7 +92,7 @@ public class InspectionTree extends Tree {
@Override
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
if (myView != null && !myView.isDisposed()) {
if (!myView.isDisposed()) {
OpenSourceUtil.openSourcesFrom(DataManager.getInstance().getDataContext(myView), false);
}
}
@@ -114,7 +113,7 @@ public class InspectionTree extends Tree {
EdtInvocationManager.getInstance().invokeLater(() -> {
expandPath(new TreePath(myModel.getRoot()));
SmartExpander.installOn(InspectionTree.this);
if (myView != null && !myView.isDisposed()) {
if (!myView.isDisposed()) {
myView.syncRightPanel();
}
});