mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
simplify PermanentDeleteFix (IDEA-CR-15631)
This commit is contained in:
+3
-5
@@ -53,7 +53,6 @@ import com.intellij.util.text.CharArrayUtil;
|
||||
import com.intellij.util.text.DateFormatUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import gnu.trove.TObjectHashingStrategy;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -77,8 +76,8 @@ import java.util.function.Predicate;
|
||||
|
||||
public class UnusedDeclarationPresentation extends DefaultInspectionToolPresentation {
|
||||
|
||||
private final Set<RefEntity> myIgnoreElements = ContainerUtil.newConcurrentSet(TObjectHashingStrategy.IDENTITY);
|
||||
private final Map<RefEntity, UnusedDeclarationHint> myFixedElements = ContainerUtil.newConcurrentMap(TObjectHashingStrategy.IDENTITY);
|
||||
private final Set<RefEntity> myIgnoreElements = ContainerUtil.newConcurrentSet(ContainerUtil.identityStrategy());
|
||||
private final Map<RefEntity, UnusedDeclarationHint> myFixedElements = ContainerUtil.newConcurrentMap(ContainerUtil.identityStrategy());
|
||||
|
||||
private WeakUnreferencedFilter myFilter;
|
||||
private DeadHTMLComposer myComposer;
|
||||
@@ -612,8 +611,7 @@ public class UnusedDeclarationPresentation extends DefaultInspectionToolPresenta
|
||||
@Override
|
||||
public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
|
||||
if (myElement != null && myElement.isValid()) {
|
||||
ApplicationManager.getApplication().invokeLater(() -> SafeDeleteHandler
|
||||
.invoke(myElement.getProject(), new PsiElement[]{PsiTreeUtil.getParentOfType(myElement, PsiModifierListOwner.class)}, false));
|
||||
SafeDeleteHandler.invoke(myElement.getProject(), new PsiElement[]{PsiTreeUtil.getParentOfType(myElement, PsiModifierListOwner.class)}, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user