mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.intellij.xml.refactoring;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
@@ -35,12 +34,6 @@ import java.util.Collection;
|
||||
*/
|
||||
public class SchemaPrefixRenameHandler extends VariableInplaceRenameHandler {
|
||||
|
||||
@Override
|
||||
protected boolean isAvailable(PsiElement element, Editor editor, PsiFile file) {
|
||||
PossiblePrefixReference ref = getReference(file, editor);
|
||||
return ref != null && ref.resolve() instanceof SchemaPrefix;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static PossiblePrefixReference getReference(PsiFile file, Editor editor) {
|
||||
if (file != null && editor != null) {
|
||||
@@ -54,6 +47,12 @@ public class SchemaPrefixRenameHandler extends VariableInplaceRenameHandler {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isAvailable(PsiElement element, Editor editor, PsiFile file) {
|
||||
PossiblePrefixReference ref = getReference(file, editor);
|
||||
return ref != null && ref.resolve() instanceof SchemaPrefix;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected VariableInplaceRenamer createRenamer(@NotNull PsiElement elementToRename, Editor editor) {
|
||||
PossiblePrefixReference reference = getReference(elementToRename.getContainingFile(), editor);
|
||||
@@ -71,12 +70,6 @@ public class SchemaPrefixRenameHandler extends VariableInplaceRenameHandler {
|
||||
};
|
||||
}
|
||||
}
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
System.out.println("Reference: " + reference);
|
||||
if (reference != null) {
|
||||
System.out.println("Resolved: " + reference.resolve());
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user