Examples of ExpressionTypeGoal


Examples of org.eclipse.dltk.ti.goals.ExpressionTypeGoal

  public FormalParameterEvaluator(IGoal goal) {
    super(goal);
  }

  public IGoal[] init() {
    ExpressionTypeGoal typedGoal = (ExpressionTypeGoal) goal;
    FormalParameter parameter = (FormalParameter) typedGoal.getExpression();

    SimpleReference type = parameter.getParameterType();
    if (type != null && "array".equals(type.getName()) == false) { //$NON-NLS-1$
      result = PHPClassType.fromSimpleReference(type);
    } else {
      IContext context = typedGoal.getContext();
      if (context instanceof MethodContext) {
        MethodContext methodContext = (MethodContext) context;
        PHPMethodDeclaration methodDeclaration = (PHPMethodDeclaration) methodContext
            .getMethodNode();
        PHPDocBlock[] docBlocks = new PHPDocBlock[0];
View Full Code Here

Examples of org.eclipse.dltk.ti.goals.ExpressionTypeGoal

    }
    return null;
  }

  public IGoal[] init() {
    ExpressionTypeGoal typedGoal = (ExpressionTypeGoal) goal;
    ConditionalExpression conditionalExpression = (ConditionalExpression) typedGoal
        .getExpression();
    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=339405
    List<IGoal> result = new ArrayList<IGoal>();
    if (conditionalExpression.getIfTrue() != null) {
      result.add(new ExpressionTypeGoal(goal.getContext(),
          conditionalExpression.getIfTrue()));
    }
    if (conditionalExpression.getIfFalse() != null) {
      result.add(new ExpressionTypeGoal(goal.getContext(),
          conditionalExpression.getIfFalse()));
    }
    return result.toArray(new IGoal[result.size()]);
  }
View Full Code Here

Examples of org.eclipse.dltk.ti.goals.ExpressionTypeGoal

              ReturnStatement statement = (ReturnStatement) node;
              Expression expr = statement.getExpr();
              if (expr == null) {
                evaluated.add(PHPSimpleTypes.VOID);
              } else {
                subGoals.add(new ExpressionTypeGoal(
                    innerContext, expr));
              }
            } else if (node instanceof YieldExpression) {
              YieldExpression statement = (YieldExpression) node;
              Expression expr = statement.getExpr();
              if (expr == null) {
                yieldEvaluated.add(PHPSimpleTypes.NULL);
              } else {
                final ExpressionTypeGoal yg = new ExpressionTypeGoal(
                    innerContext, expr);
                subGoals.add(yg);
                yieldGoals.add(yg);
              }
            }
View Full Code Here

Examples of org.eclipse.dltk.ti.goals.ExpressionTypeGoal

  @Override
  public GoalEvaluator createEvaluator(IGoal goal) {

    if (goal instanceof ExpressionTypeGoal) {

      ExpressionTypeGoal expressionGoal = (ExpressionTypeGoal) goal;
     
      if (expressionGoal.getContext() instanceof FileContext) {

        FileContext context = (FileContext) expressionGoal.getContext();
       
        ASTNode node = expressionGoal.getExpression();
       
        if (node instanceof VariableReference) {
         
          VariableReference variable = (VariableReference) node;
          TemplateField element = SymfonyModelAccess.getDefault().findTemplateVariableType(variable.toString(), context.getSourceModule());
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.