Examples of PHPDocMethodReturnTypeGoal


Examples of org.eclipse.php.internal.core.typeinference.goals.phpdoc.PHPDocMethodReturnTypeGoal

      return EMPTY_TYPES;
    }
  }

  private static IType[] getFunctionReturnTypes(PHPCallExpression expression, ISourceModule sourceModule, IType[] receiverTypes, IContext context) {
    IEvaluatedType evaluatedType = TYPE_INFERENCER.evaluateTypePHPDoc(new PHPDocMethodReturnTypeGoal(context, receiverTypes, expression.getName()));
    IType[] modelElements = PHPTypeInferenceUtils.getModelElements(evaluatedType, (ISourceModuleContext) context, expression.sourceStart());
    if (modelElements != null) {
      return modelElements;
    }
View Full Code Here

Examples of org.eclipse.php.internal.core.typeinference.goals.phpdoc.PHPDocMethodReturnTypeGoal

    return EMPTY_TYPES;
  }

  private static IType[] getFunctionArrayReturnTypes(PHPCallExpression expression, ISourceModule sourceModule, IType[] receiverTypes, IContext context) {
    IEvaluatedType evaluatedType = TYPE_INFERENCER.evaluateTypePHPDoc(new PHPDocMethodReturnTypeGoal(context, receiverTypes, expression.getName()));
    if (evaluatedType instanceof MultiTypeType) {
      List<IType> collectingTypes = new LinkedList<IType>();
      for (IEvaluatedType possibleType : ((MultiTypeType) evaluatedType).getTypes()) {
        IType[] types = PHPTypeInferenceUtils.getModelElements(possibleType, (ISourceModuleContext) context, expression.sourceStart(), (IModelAccessCache) null);
        if (types != null) {
View Full Code Here

Examples of org.eclipse.php.internal.core.typeinference.goals.phpdoc.PHPDocMethodReturnTypeGoal

    IEvaluatedType evaluatedType;
    IType[] modelElements;
    boolean usePhpDoc = (mask & USE_PHPDOC) != 0;
    if (usePhpDoc) {
      PHPDocMethodReturnTypeGoal phpDocGoal = new PHPDocMethodReturnTypeGoal(
          context, types, method);
      evaluatedType = typeInferencer.evaluateTypePHPDoc(phpDocGoal);

      modelElements = PHPTypeInferenceUtils.getModelElements(
          evaluatedType, (ISourceModuleContext) context, offset);
View Full Code Here

Examples of org.eclipse.php.internal.core.typeinference.goals.phpdoc.PHPDocMethodReturnTypeGoal

    }

    IEvaluatedType evaluatedType;
    boolean usePhpDoc = (mask & USE_PHPDOC) != 0;
    if (usePhpDoc) {
      PHPDocMethodReturnTypeGoal phpDocGoal = new PHPDocMethodReturnTypeGoal(
          context, types, method);
      evaluatedType = typeInferencer.evaluateTypePHPDoc(phpDocGoal);
      List<IEvaluatedType> possibleTypes = null;
      if (!PHPTypeInferenceUtils.isSimple(evaluatedType)) {
        if (evaluatedType instanceof MultiTypeType) {
View Full Code Here

Examples of org.eclipse.php.internal.core.typeinference.goals.phpdoc.PHPDocMethodReturnTypeGoal

    // we've evaluated receiver, lets evaluate the method return type now
    // (using PHP Doc first):
    if (state == STATE_GOT_RECEIVER) {
      state = STATE_WAITING_METHOD_PHPDOC;
      return new PHPDocMethodReturnTypeGoal(typedGoal.getContext(),
          receiverType, expression.getName());
    }

    // PHPDoc logic is done, start evaluating 'return' statements here:
    if (state == STATE_WAITING_METHOD_PHPDOC) {
View Full Code Here

Examples of org.eclipse.php.internal.core.typeinference.goals.phpdoc.PHPDocMethodReturnTypeGoal

              if (isImplementedIterator(superTypes)) {
                subGoals.add(new MethodElementReturnTypeGoal(
                    subgoal.getContext(),
                    new IType[] { type }, "current")); //$NON-NLS-1$
                subGoals.add(new PHPDocMethodReturnTypeGoal(
                    subgoal.getContext(),
                    new IType[] { type }, "current")); //$NON-NLS-1$
              }
            }
            if (subGoals.size() == 0) {
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.