Package com.jetbrains.lang.dart.psi

Examples of com.jetbrains.lang.dart.psi.DartType


  @Override
  protected Template buildFunctionsText(TemplateManager templateManager, DartComponent element) {
    final Template template = templateManager.createTemplate(getClass().getName(), DART_TEMPLATE_GROUP);
    template.setToReformat(true);
    final DartReturnType returnType = PsiTreeUtil.getChildOfType(element, DartReturnType.class);
    final DartType dartType = PsiTreeUtil.getChildOfType(element, DartType.class);
    if (returnType != null) {
      template.addTextSegment(DartPresentableUtil.buildTypeText(element, returnType, specializations));
      template.addTextSegment(" ");
    }
    else if (dartType != null) {
View Full Code Here


  }

  @Override
  protected Template buildFunctionsText(TemplateManager templateManager, DartComponent namedComponent) {
    final DartReturnType returnType = PsiTreeUtil.getChildOfType(namedComponent, DartReturnType.class);
    final DartType dartType = PsiTreeUtil.getChildOfType(namedComponent, DartType.class);
    final String typeText = returnType == null ? DartPresentableUtil.buildTypeText(namedComponent, dartType, null)
                                               : DartPresentableUtil.buildTypeText(namedComponent, returnType, null);
    final Template template = templateManager.createTemplate(getClass().getName(), DART_TEMPLATE_GROUP);
    template.setToReformat(true);
    if (myStrategy == Strategy.GETTER || myStrategy == Strategy.GETTERSETTER) {
View Full Code Here

    if (dartClass == null) {
      return ArrayUtil.EMPTY_OBJECT_ARRAY;
    }

    final List<DartClass> supers = new ArrayList<DartClass>();
    final DartType superClass = dartClass.getSuperClass();
    // looks like there's no sense in jumping to Object class
    if (superClass != null && !DartResolveUtil.OBJECT.equals(superClass.getName())) {
      final DartClassResolveResult dartClassResolveResult = DartResolveUtil.resolveClassByType(superClass);
      if (dartClassResolveResult.getDartClass() != null) {
        supers.add(dartClassResolveResult.getDartClass());
      }
    }
View Full Code Here

    }
    return descriptors.toArray(new HierarchyNodeDescriptor[descriptors.size()]);
  }

  private static boolean doesDirectlySubclass(final DartClass dartClass, final DartClass subClass) {
    final DartType type = subClass.getSuperClass();
    if (type != null && dartClass.equals(DartResolveUtil.resolveClassByType(type).getDartClass())) {
      return true;
    }
    final List<DartType> interfacesAndMixins = DartResolveUtil.getImplementsAndMixinsList(subClass);
    for (DartType type1 : interfacesAndMixins) {
View Full Code Here

    final DartComponent component = PsiTreeUtil.getParentOfType(at, DartComponent.class);
    final DartClass dartClass = PsiTreeUtil.getParentOfType(at, DartClass.class);
    if (at == null || dartClass == null || component == null) return;

    final List<DartClass> supers = new ArrayList<DartClass>();
    final DartType superClass = dartClass.getSuperClass();
    // looks like there's no sense in jumping to Object class
    if (superClass != null && !DartResolveUtil.OBJECT.equals(superClass.getReferenceExpression().getText())) {
      final DartClassResolveResult dartClassResolveResult = DartResolveUtil.resolveClassByType(superClass);
      if (dartClassResolveResult.getDartClass() != null) {
        supers.add(dartClassResolveResult.getDartClass());
      }
    }
View Full Code Here

  }

  private static DartClass[] createSuperClasses(final DartClass dartClass) {
    if (!dartClass.isValid()) return new DartClass[0];
    final ArrayList<DartClass> superClasses = new ArrayList<DartClass>();
    DartType superType = dartClass.getSuperClass();
    while (superType != null && !DartResolveUtil.OBJECT.equals(superType.getReferenceExpression().getText())) {
      final DartClassResolveResult dartClassResolveResult = DartResolveUtil.resolveClassByType(superType);
      final DartClass dartClass1 = dartClassResolveResult.getDartClass();
      if (dartClass1 != null) {
        superClasses.add(dartClass1);
        superType = dartClass1.getSuperClass();
View Full Code Here

TOP

Related Classes of com.jetbrains.lang.dart.psi.DartType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.