Java 类com.intellij.openapi.util.MixinExtension 实例源码

项目:intellij-ce-playground    文件:DeclarationRangeUtil.java   
public static @Nullable
TextRange getPossibleDeclarationAtRange(final PsiElement container) {
  DeclarationRangeHandler handler = MixinExtension.getInstance(DeclarationRangeHandler.EP_NAME, container);
  if (handler != null) {
    return handler.getDeclarationRange(container);
  }
  else {
    for(Class clazz:ourDeclarationRangeRegistry.keySet()) {
      if (clazz.isInstance(container)) {
        final DeclarationRangeHandler handler2 = ourDeclarationRangeRegistry.get(clazz);
        if (handler2 != null) return handler2.getDeclarationRange(container);
      }
    }

    return null;
  }
}
项目:tools-idea    文件:DeclarationRangeUtil.java   
public static @Nullable
TextRange getPossibleDeclarationAtRange(final PsiElement container) {
  DeclarationRangeHandler handler = MixinExtension.getInstance(DeclarationRangeHandler.EP_NAME, container);
  if (handler != null) {
    return handler.getDeclarationRange(container);
  }
  else {
    for(Class clazz:ourDeclarationRangeRegistry.keySet()) {
      if (clazz.isInstance(container)) {
        final DeclarationRangeHandler handler2 = ourDeclarationRangeRegistry.get(clazz);
        if (handler2 != null) return handler2.getDeclarationRange(container);
      }
    }

    return null;
  }
}
项目:consulo    文件:DeclarationRangeUtil.java   
public static @Nullable
TextRange getPossibleDeclarationAtRange(final PsiElement container) {
  DeclarationRangeHandler handler = MixinExtension.getInstance(DeclarationRangeHandler.EP_NAME, container);
  if (handler != null) {
    return handler.getDeclarationRange(container);
  }
  else {
    for(Class clazz:ourDeclarationRangeRegistry.keySet()) {
      if (clazz.isInstance(container)) {
        final DeclarationRangeHandler handler2 = ourDeclarationRangeRegistry.get(clazz);
        if (handler2 != null) return handler2.getDeclarationRange(container);
      }
    }

    return null;
  }
}