Examples of HaxeComponentType


Examples of com.intellij.plugins.haxe.HaxeComponentType

    this.override = override;
  }

  @Override
  protected String buildFunctionsText(HaxeNamedComponent element) {
    final HaxeComponentType componentType = HaxeComponentType.typeOf(element);
    final StringBuilder result = new StringBuilder();
    if (override && !element.isOverride()) {
      result.append("override ");
    }
    final HaxeDeclarationAttribute[] declarationAttributeList = PsiTreeUtil.getChildrenOfType(element, HaxeDeclarationAttribute.class);
View Full Code Here

Examples of com.intellij.plugins.haxe.HaxeComponentType

  }

  @NotNull
  @Override
  public SearchScope getUseScope() {
    final HaxeComponentType type = HaxeComponentType.typeOf(getParent());
    final HaxeComponent component = PsiTreeUtil.getParentOfType(getParent(), HaxeComponent.class, true);
    if (type == null || component == null) {
      return super.getUseScope();
    }
    if (type == HaxeComponentType.FUNCTION || type == HaxeComponentType.PARAMETER || type == HaxeComponentType.VARIABLE) {
View Full Code Here

Examples of com.intellij.plugins.haxe.HaxeComponentType

      subItems.addAll(HaxeResolveUtil.getNamedSubComponents(subClass));
    }

    final boolean isInterface = HaxeComponentType.typeOf(haxeClass) == HaxeComponentType.INTERFACE;
    for (HaxeNamedComponent haxeNamedComponent : HaxeResolveUtil.getNamedSubComponents(haxeClass)) {
      final HaxeComponentType type = HaxeComponentType.typeOf(haxeNamedComponent);
      if (type == HaxeComponentType.METHOD || type == HaxeComponentType.FIELD) {
        LineMarkerInfo item = tryCreateOverrideMarker(haxeNamedComponent, superItems);
        if (item != null) {
          result.add(item);
        }
View Full Code Here

Examples of com.intellij.plugins.haxe.HaxeComponentType

    final List<HaxeClass> supers = HaxeResolveUtil.tyrResolveClassesByQName(haxeClass.getExtendsList());
    supers.addAll(HaxeResolveUtil.tyrResolveClassesByQName(haxeClass.getImplementsList()));
    final List<HaxeNamedComponent> superItems = HaxeResolveUtil.findNamedSubComponents(false, supers.toArray(new HaxeClass[supers.size()]));

    final HaxeComponentType type = HaxeComponentType.typeOf(namedComponent);
    if (type == HaxeComponentType.METHOD) {
      final HaxeComponentWithDeclarationList methodDeclaration = (HaxeComponentWithDeclarationList)namedComponent;
      tryNavigateToSuperMethod(editor, methodDeclaration, superItems);
    }
    else if (!supers.isEmpty() && namedComponent instanceof HaxeClass) {
View Full Code Here

Examples of com.intellij.plugins.haxe.HaxeComponentType

    return result;
  }

  public static List<HaxeNamedComponent> getNamedSubComponents(HaxeClass haxeClass) {
    PsiElement body = null;
    final HaxeComponentType type = HaxeComponentType.typeOf(haxeClass);
    if (type == HaxeComponentType.CLASS) {
      body = PsiTreeUtil.getChildOfAnyType(haxeClass, HaxeClassBody.class, HaxeExternClassDeclarationBody.class);
    }
    else if (type == HaxeComponentType.INTERFACE) {
      body = PsiTreeUtil.getChildOfType(haxeClass, HaxeInterfaceBody.class);
View Full Code Here

Examples of com.intellij.plugins.haxe.HaxeComponentType

    return result;
  }

  public static List<HaxeVarDeclaration> getClassVarDeclarations(HaxeClass haxeClass) {
    PsiElement body = null;
    final HaxeComponentType type = HaxeComponentType.typeOf(haxeClass);
    if (type == HaxeComponentType.CLASS) {
      body = PsiTreeUtil.getChildOfAnyType(haxeClass, HaxeClassBody.class, HaxeExternClassDeclarationBody.class);
    }

    final List<HaxeVarDeclaration> result = new ArrayList<HaxeVarDeclaration>();
View Full Code Here

Examples of com.intellij.plugins.haxe.HaxeComponentType

  @Override
  public String getQualifiedName(PsiElement element) {
    if (element instanceof HaxeClass) {
      return ((HaxeClass)element).getQualifiedName();
    }
    final HaxeComponentType componentType = HaxeComponentType.typeOf(element);
    if (componentType == HaxeComponentType.METHOD || componentType == HaxeComponentType.FIELD) {
      final String name = ((HaxeComponent)element).getName();
      final HaxeClass haxeClass = PsiTreeUtil.getParentOfType(element, HaxeClass.class, true);
      if (name != null && haxeClass != null) {
        return haxeClass.getQualifiedName() + "#" + name;
View Full Code Here

Examples of com.intellij.plugins.haxe.HaxeComponentType

    return this;
  }

  @Override
  public Icon getIcon(int flags) {
    final HaxeComponentType type = HaxeComponentType.typeOf(this);
    return type == null ? null : type.getIcon();
  }
View Full Code Here

Examples of com.intellij.plugins.haxe.HaxeComponentType

  private final byte[] buffer = IOUtil.allocReadWriteUTFBuffer();

  @Override
  public void save(DataOutput out, HaxeClassInfo classInfo) throws IOException {
    IOUtil.writeUTFFast(buffer, out, classInfo.getValue());
    final HaxeComponentType haxeComponentType = classInfo.getType();
    final int key = haxeComponentType == null ? -1 : haxeComponentType.getKey();
    out.writeInt(key);
  }
View Full Code Here

Examples of com.intellij.plugins.haxe.HaxeComponentType

        }
        else if (HaxeComponentType.typeOf(AbstractHaxeNamedComponent.this) == HaxeComponentType.METHOD) {
          // constructor
          result.append("new");
        }
        final HaxeComponentType type = HaxeComponentType.typeOf(AbstractHaxeNamedComponent.this);
        if (type == HaxeComponentType.METHOD) {
          final String parameterList = HaxePresentableUtil.getPresentableParameterList(AbstractHaxeNamedComponent.this);
          result.append("(").append(parameterList).append(")");
        }
        if (type == HaxeComponentType.METHOD || type == HaxeComponentType.FIELD) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.