mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
move RenameableFakePsiElement to core; change FakePsiElement to inherit from the other PsiElementBase
This commit is contained in:
+47
-1
@@ -16,12 +16,12 @@
|
||||
|
||||
package com.intellij.psi.impl;
|
||||
|
||||
import com.intellij.extapi.psi.PsiElementBase;
|
||||
import com.intellij.lang.ASTNode;
|
||||
import com.intellij.lang.Language;
|
||||
import com.intellij.navigation.ItemPresentation;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiManager;
|
||||
import com.intellij.psi.PsiNamedElement;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
@@ -158,4 +158,50 @@ public abstract class FakePsiElement extends PsiElementBase implements PsiNamedE
|
||||
public PsiElement setName(@NonNls @NotNull String name) throws IncorrectOperationException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiElement replace(@NotNull PsiElement newElement) throws IncorrectOperationException {
|
||||
throw new UnsupportedOperationException(getClass().getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkAdd(@NotNull PsiElement element) throws IncorrectOperationException {
|
||||
throw new UnsupportedOperationException(getClass().getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiElement add(@NotNull PsiElement element) throws IncorrectOperationException {
|
||||
throw new UnsupportedOperationException(getClass().getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiElement addBefore(@NotNull PsiElement element, PsiElement anchor) throws IncorrectOperationException {
|
||||
throw new UnsupportedOperationException(getClass().getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiElement addAfter(@NotNull PsiElement element, PsiElement anchor) throws IncorrectOperationException {
|
||||
throw new UnsupportedOperationException(getClass().getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkDelete() throws IncorrectOperationException {
|
||||
throw new UnsupportedOperationException(getClass().getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete() throws IncorrectOperationException {
|
||||
throw new UnsupportedOperationException(getClass().getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiElement copy() {
|
||||
return (PsiElement)clone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiManager getManager() {
|
||||
final PsiElement parent = getParent();
|
||||
return parent != null ? parent.getManager() : null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user