Package tree

Examples of tree.HaxeTree


    {
        if (node.getHaxeType() != null)
        {
            return;
        }
        HaxeTree expr = node.getExpression();
        if (expr.isUndefinedType(true))
        {
            visit(expr, data);
        }
        else
        {
View Full Code Here


        if (node.getHaxeType() != null)
        {
            return;
        }
       
        HaxeTree ifBlock = node.getIfBlock();
        HaxeTree elseBlock = node.getElseBlock();
       
        if (!ifBlock.isUndefinedType()
                && !elseBlock.isUndefinedType()
                && node.isLastInScope())
        {
            data = node;
            node.commitError("The blocks returns different value types.");
            return;
View Full Code Here

    }

    @Override
    protected void visit(final While node, Object data)
    {
        HaxeTree condition = node.getCondition();
       
        visit(node.getScope(), data);
        node.setHaxeType(node.getScope().getHaxeType());
       
        if (condition.isUndefinedType())
        {
            visit(condition, data);
            return;
        }

        HaxeType bool = TypeUtils.getBool();
        if (!condition.getHaxeType().equals(bool))
        {
            ErrorPublisher.commitCastError(condition, bool);
        }
    }
View Full Code Here

  @Override
  public ICompletionProposal[] getContentProposals(
      final IParseController controller, final int offset,
      final ITextViewer viewer) {
    HaxeTree sourceNode = null;
    String sourceString = null;

    HaxeParseController haxeController = (HaxeParseController) controller;
    try {
      sourceNode = TreeUtils.getNodeByOffset(
View Full Code Here

   */
  private Environment filterVars(
      final HaxeTree nodeToStart, final String prefix)
  {
      Environment result = new Environment();
    HaxeTree parent = nodeToStart.getParent();
    if (parent == null)
    {
        return result;
    }
    result.putAll(filterVars(parent, prefix));
    for (HaxeTree commonTree : parent.getAllChildren())
    {
      if (commonTree.getText().startsWith(prefix)
              && (commonTree instanceof Declaration
              || commonTree instanceof Class
              || commonTree instanceof Function))
View Full Code Here

  @Override
  public void visitTree(final Object root) {
    if (root == null) {
      return;
    }
    HaxeTree rootNode = (HaxeTree) root;
    visitor = new HaxeModelVisitor();

    accept(rootNode);
  }
View Full Code Here

        if (lib == null)
        {
            return null;
        }
        CodeFile file = lib.getFile(shortName);
        HaxeTree stdTypes = null;
        if (file != null)
        {
            stdTypes = file.getAst();
        }
        if (stdTypes == null)
        {
            file = lib.getFile(primaryTypesFileName);
            if (file == null)
            {
                Activator.logger.error("Could not find lib file");
                return null;
            }
            stdTypes = file.getAst();
        }
        if (stdTypes == null)
        {
            return null;
        }
        for (HaxeTree child : stdTypes.getChildren())
        {
            if (child instanceof HaxeType && child.getText().equals(shortName))
            {
                return (HaxeType)child;
            }
View Full Code Here

        CodeFile file = lib.getFile(pack);
        if (file == null)
        {
            return null;
        }
        HaxeTree ast = file.getAst();
        if (ast == null)
        {
            return null;
        }
        for (HaxeTree child : ast.getChildren())
        {
            if (child instanceof HaxeType && child.getText().equals(shortName))
            {
                return (HaxeType)child;
            }
View Full Code Here

                    return sImageRegistry.get(IHaxeResources.HAXE_FILE_WARNING);*/
                default:
                    return SharedImages.DESC_FILE.createImage();
            }
        }
        HaxeTree n = (element instanceof ModelTreeNode)
                ? (HaxeTree) ((ModelTreeNode) element).getASTNode()
                : (HaxeTree) element;
        return ImageProvider.getImageForTreeNode(n);
    }
View Full Code Here

            Declaration varDeclaration = (Declaration) n;
            return varDeclaration.getText();
        }       
        if (n instanceof Usage)
        {
            HaxeTree decl = ((Usage)n).getDeclarationNode();
            if (decl instanceof Declaration)
            {
                return n.getText();               
            }
            if (decl instanceof Class)
View Full Code Here

TOP

Related Classes of tree.HaxeTree

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.