Examples of aliasType


Examples of org.eclipse.php.internal.core.codeassist.AliasType

    IMethod method = (IMethod) methodProposal.getModelElement();

    if (method instanceof FakeConstructor) {
      IType type = (IType) method.getParent();
      if (type instanceof AliasType) {
        AliasType aliasType = (AliasType) type;
        nameBuffer.append(aliasType.getAlias());
        nameBuffer.append("()"); //$NON-NLS-1$
        return nameBuffer.toString();
      }
    }
View Full Code Here

Examples of org.eclipse.php.internal.core.codeassist.AliasType

  public String createTypeProposalLabel(CompletionProposal typeProposal) {
    StringBuffer nameBuffer = new StringBuffer();

    IType type = (IType) typeProposal.getModelElement();
    if (type instanceof AliasType) {
      AliasType aliasType = (AliasType) type;
      nameBuffer.append(aliasType.getAlias());
      return nameBuffer.toString();
    }
    nameBuffer.append(typeProposal.getName());

    if (type.getParent() != null) {
View Full Code Here

Examples of org.eclipse.php.internal.core.codeassist.AliasType

   */
  private IMethod getProperMethod(IMethod modelElement) {
    if (modelElement instanceof FakeConstructor) {
      FakeConstructor fc = (FakeConstructor) modelElement;
      if (fc.getParent() instanceof AliasType) {
        AliasType aliasType = (AliasType) fc.getParent();
        alias = aliasType.getAlias();
        if (aliasType.getParent() instanceof IType) {
          fc = FakeConstructor.createFakeConstructor(null,
              (IType) aliasType.getParent(), false);
        }
      }
      IType type = fc.getDeclaringType();
      IMethod[] ctors = FakeConstructor.getConstructors(type,
          fc.isEnclosingClass());
View Full Code Here

Examples of org.eclipse.php.internal.core.codeassist.AliasType

  @Override
  protected void reportAlias(ICompletionReporter reporter,
      IDLTKSearchScope scope, IModuleSource module,
      SourceRange replacementRange, IType type,
      String fullyQualifiedName, String alias, String suffix) {
    IType aliasType = new AliasType((ModelElement) type,
        fullyQualifiedName, alias);
    IMethod ctorMethod = FakeConstructor.createFakeConstructor(null,
        aliasType, type.equals(enclosingClass));
    reporter.reportMethod(ctorMethod, "", replacementRange); //$NON-NLS-1$
  }
View Full Code Here

Examples of org.eclipse.php.internal.core.codeassist.AliasType

        String fullName = ns.getElementName();
        String alias = getAlias(ns, context.getNsPrefix());
        if (alias == null) {
          result.add(ns);
        } else {
          result.add(new AliasType((ModelElement) ns, fullName, alias));
        }
      }
    }
    return (IType[]) result.toArray(new IType[result.size()]);
  }
View Full Code Here

Examples of org.eclipse.php.internal.core.codeassist.AliasType

        getRealParent(this.parent).hashCode());
  }

  public IModelElement getRealParent(IModelElement type) {
    if (type instanceof AliasType) {
      AliasType at = (AliasType) type;
      return at.getType();

    }
    return this.parent;
  }
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.aliasType

            case JJTDOTTED_AS_NAME:
                NameTok asname = null;
                if (arity > 1) {
                    asname = makeName(NameTok.ImportName);
                }
                return new aliasType(makeName(NameTok.ImportName), asname);

            case JJTIMPORT_AS_NAME:
                asname = null;
                if (arity > 1) {
                    asname = makeName(NameTok.ImportName);
                }
                return new aliasType(makeName(NameTok.ImportName), asname);

            case JJTSTAR_EXPR:
                Starred s = (Starred) n;
                s.value = (exprType) this.stack.popNode();
                ctx.setStore(s);
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.aliasType

        //check on actual file
        requestCompl(new File(TestDependent.TEST_PYSRC_LOC + "/testlib/unittest/guitestcase.py"), "guite", -1, 0,
                new String[] {});

        Import importTok = new Import(new aliasType[] { new aliasType(new NameTok("unittest", NameTok.ImportModule),
                null) });
        this.imports = new ArrayList<IToken>();
        this.imports.add(new SourceToken(importTok, "unittest", "", "", ""));

        requestCompl("import unittest\nunittest", new String[] {}); //none because the import for unittest is already there
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.aliasType

        for (int i = 0; i < node.names.length; i++) {
            if (i > 0) {
                this.doc.addRequire(",", lastNode);
            }
            aliasType alias = node.names[i];
            handleAlias(alias);
        }

        afterNode(node);
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.aliasType

        this.doc.addRequire(" import ", lastNode);
        if (node.names.length == 0) {
            this.doc.addRequire("*", lastNode);
        } else {
            for (int i = 0; i < node.names.length; i++) {
                aliasType alias = node.names[i];
                if (i > 0) {
                    doc.addRequire(",", lastNode);
                }
                handleAlias(alias);
            }
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.