mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inspection tool window: NPE when ref-entity is null fixed + QF button can be disabled
This commit is contained in:
@@ -486,7 +486,9 @@ public class InspectionResultsView extends JPanel implements Disposable, Occuren
|
||||
}
|
||||
|
||||
private JComponent createBaseRightComponentFor(int problemCount, RefEntity selectedEntity) {
|
||||
if (selectedEntity instanceof RefElement && !(((RefElement)selectedEntity).getElement() instanceof PsiDirectory)) {
|
||||
if (selectedEntity instanceof RefElement &&
|
||||
selectedEntity.isValid() &&
|
||||
!(((RefElement)selectedEntity).getElement() instanceof PsiDirectory)) {
|
||||
PsiElement selectedElement = ((RefElement)selectedEntity).getElement();
|
||||
if (problemCount == 1) {
|
||||
CommonProblemDescriptor[] descriptors = myTree.getSelectedDescriptors();
|
||||
|
||||
@@ -258,6 +258,7 @@ public class QuickFixToolbar extends JPanel implements InspectionTreeLoadingProg
|
||||
if (icon == null) {
|
||||
icon = AllIcons.Actions.CreateFromUsage;
|
||||
}
|
||||
button.setEnabled(presentation.isEnabled());
|
||||
button.setIcon(IconLoader.getTransparentIcon(icon, 0.75f));
|
||||
new ClickListener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user