Package org.eclipse.dltk.ast.declarations

Examples of org.eclipse.dltk.ast.declarations.ModuleDeclaration


   * @param position
   * @return
   */
  public static IType[] getArrayVariableType(ISourceModule sourceModule,
      String variableName, int position) {
    ModuleDeclaration moduleDeclaration = SourceParserUtil
        .getModuleDeclaration(sourceModule, null);
    IContext context = ASTUtils.findContext(sourceModule,
        moduleDeclaration, position);
    if (context != null) {
      VariableReference varReference = getVariableReference(variableName,
View Full Code Here


   * @param position
   * @return
   */
  public static IType[] getVariableType(ISourceModule sourceModule,
      String variableName, int position) {
    ModuleDeclaration moduleDeclaration = SourceParserUtil
        .getModuleDeclaration(sourceModule, null);
    IContext context = ASTUtils.findContext(sourceModule,
        moduleDeclaration, position);
    if (context != null) {
      VariableReference varReference = getVariableReference(variableName,
View Full Code Here

   */
  public static IType[] getFunctionReturnType(IType[] types, String method,
      int mask, org.eclipse.dltk.core.ISourceModule sourceModule,
      int offset, String[] argNames) {
    PHPTypeInferencer typeInferencer = new PHPTypeInferencer();
    ModuleDeclaration moduleDeclaration = SourceParserUtil
        .getModuleDeclaration(sourceModule, null);
    IContext context = ASTUtils.findContext(sourceModule,
        moduleDeclaration, offset);

    IEvaluatedType evaluatedType;
View Full Code Here

    // .toString();
    int classNameStart = PHPTextSequenceUtilities.readIdentifierStartIndex(
        phpVersion, statementText, propertyEndPosition, true);
    String className = statementText.subSequence(classNameStart,
        propertyEndPosition).toString();
    ModuleDeclaration moduleDeclaration = SourceParserUtil
        .getModuleDeclaration(sourceModule, null);
    FileContext context = new FileContext(sourceModule, moduleDeclaration,
        offset);
    IEvaluatedType type = PHPClassType.fromTraitName(className,
        sourceModule, offset);
View Full Code Here

   */
  private static IType[] getFunctionArrayReturnType(IType[] types,
      String method, int mask, ISourceModule sourceModule, int offset,
      String[] argNames) {
    PHPTypeInferencer typeInferencer = new PHPTypeInferencer();
    ModuleDeclaration moduleDeclaration = SourceParserUtil
        .getModuleDeclaration(sourceModule, null);
    IContext context = ASTUtils.findContext(sourceModule,
        moduleDeclaration, offset);
    // XXX context cannot be null
    if (context == null) {
View Full Code Here

          int statementStart = statementText
              .getOriginalOffset(classNameStart);
          return getVariableType(sourceModule, className,
              statementStart);
        } else {
          ModuleDeclaration moduleDeclaration = SourceParserUtil
              .getModuleDeclaration(sourceModule, null);
          FileContext context = new FileContext(sourceModule,
              moduleDeclaration, offset);
          IEvaluatedType type = PHPClassType.fromTypeName(className,
              sourceModule, offset);
View Full Code Here

   */
  public static IModelElement[] resolve(ISourceModule sourceModule, int offset) {
    IModelElement[] modelElements = null;

    ContextFinder visitor = new ContextFinder(sourceModule, offset);
    ModuleDeclaration moduleDeclaration = SourceParserUtil
        .getModuleDeclaration(sourceModule);
    try {
      moduleDeclaration.traverse(visitor);
    } catch (Exception e) {
      Logger.logException(e);
    }

    if (visitor.getNode() != null) {
View Full Code Here

    }

    if (!isParent || !isSelf) {
      IType[] types = getLhsTypes();
      if (types != null && types.length > 0) {
        ModuleDeclaration moduleDeclaration = SourceParserUtil
            .getModuleDeclaration(sourceModule);
        if (moduleDeclaration != null) {
          IContext context = ASTUtils.findContext(sourceModule,
              moduleDeclaration, offset);
          if (context instanceof MethodContext) {
View Full Code Here

      // https://bugs.eclipse.org/bugs/show_bug.cgi?id=316077
      if (DEBUG) {
        e.printStackTrace();
      }
      // XXX: add recovery
      return new ModuleDeclaration(0);
    }

  }
View Full Code Here

      // https://bugs.eclipse.org/bugs/show_bug.cgi?id=316077
      if (DEBUG) {
        e.printStackTrace();
      }
      // XXX: add recovery
      return new ModuleDeclaration(0);
    }
    return parser.getModuleDeclaration();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.ast.declarations.ModuleDeclaration

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.