Package org.eclipse.php.internal.core.codeassist

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


  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

   */
  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

  @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

        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

        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

TOP

Related Classes of org.eclipse.php.internal.core.codeassist.AliasType

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.