类com.intellij.psi.ElementManipulator源码实例Demo

下面列出了怎么用com.intellij.psi.ElementManipulator的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: BashSupport   文件: AbstractBashFileReference.java
@NotNull
private ElementManipulator<AbstractBashCommand<?>> getManipulator() {
    ElementManipulator<AbstractBashCommand<?>> manipulator = ElementManipulators.<AbstractBashCommand<?>>getManipulator(cmd);
    if (manipulator == null) {
        throw new IncorrectOperationException("No element manipulator found for " + cmd);
    }

    return manipulator;
}
 
源代码2 项目: BashSupport   文件: AbstractFunctionReference.java
@NotNull
private ElementManipulator<AbstractBashCommand<?>> getManipulator() {
    ElementManipulator<AbstractBashCommand<?>> manipulator = ElementManipulators.<AbstractBashCommand<?>>getManipulator(cmd);
    if (manipulator == null) {
        throw new IncorrectOperationException("No element manipulator found for " + cmd);
    }
    return manipulator;
}
 
源代码3 项目: consulo   文件: CachingReference.java
@Nonnull
public static <T extends PsiElement> ElementManipulator<T> getManipulator(T currentElement){
  ElementManipulator<T> manipulator = ElementManipulators.getManipulator(currentElement);
  if (manipulator == null) {
    throw new IncorrectOperationException("Manipulator for this element is not defined: " + currentElement + "; " + currentElement.getClass());
  }
  return manipulator;
}
 
源代码4 项目: camel-idea-plugin   文件: BeanSelfReference.java
@Override
public PsiElement handleElementRename(@NotNull String newElementName) throws IncorrectOperationException {
    ElementManipulator<PsiElement> manipulator = ElementManipulators.getManipulator(myElement);
    return manipulator.handleContentChange(myElement, TextRange.from(1, id.length()), newElementName);
}
 
@Override
public PsiElement handleElementRename(@NotNull String newElementName) throws IncorrectOperationException {
    ElementManipulator<PsiElement> manipulator = ElementManipulators.getManipulator(myElement);
    return manipulator.handleContentChange(myElement, endpoint.getNameTextRange().shiftRight(1), newElementName);
}
 
@Override
public PsiElement handleElementRename(@NotNull String newElementName) throws IncorrectOperationException {
    ElementManipulator<PsiElement> manipulator = ElementManipulators.getManipulator(myElement);
    return manipulator.handleContentChange(myElement, endpoint.getNameTextRange().shiftRight(1), newElementName);
}
 
 类所在包
 类方法
 同包方法