Examples of PHPTraitType


Examples of org.eclipse.php.internal.core.typeinference.evaluators.PHPTraitType

    final ModuleDeclaration moduleDeclaration = SourceParserUtil
        .getModuleDeclaration(sourceModule);
    if (PHPModelUtils.isInUseTraitStatement(moduleDeclaration, offset)) {

      if (namespace != null) {
        return new PHPTraitType(namespace,
            PHPModelUtils.extractElementName(typeName));
      }
      return new PHPTraitType(typeName);
    } else {

      if (namespace != null) {
        return new PHPClassType(namespace,
            PHPModelUtils.extractElementName(typeName));
View Full Code Here

Examples of org.eclipse.php.internal.core.typeinference.evaluators.PHPTraitType

      ISourceModule sourceModule, int offset) {
    String namespace = PHPModelUtils.extractNamespaceName(typeName,
        sourceModule, offset);

    if (namespace != null) {
      return new PHPTraitType(namespace,
          PHPModelUtils.extractElementName(typeName));
    }
    return new PHPTraitType(typeName);
  }
View Full Code Here

Examples of org.eclipse.php.internal.core.typeinference.evaluators.PHPTraitType

    String elementName = type.getElementName();
    try {
      if (PHPFlags.isTrait(type.getFlags())) {
        IType namespace = type.getDeclaringType();
        if (namespace != null) {
          return new PHPTraitType(namespace.getElementName(),
              elementName);
        }
        return new PHPTraitType(elementName);
      }
    } catch (ModelException e) {
    }
    IType namespace = type.getDeclaringType();
    if (namespace != null) {
View Full Code Here

Examples of org.eclipse.php.internal.core.typeinference.evaluators.PHPTraitType

          .peek();
      PHPClassType instanceType;
      if (parentContext instanceof INamespaceContext
          && ((INamespaceContext) parentContext).getNamespace() != null) {
        if (node instanceof TraitDeclaration) {
          instanceType = new PHPTraitType(
              ((INamespaceContext) parentContext).getNamespace(),
              node.getName());
        } else {
          instanceType = new PHPClassType(
              ((INamespaceContext) parentContext).getNamespace(),
              node.getName());
        }
      } else {
        if (node instanceof TraitDeclaration) {
          if (declaringType != null
              && realType != null
              && declaringType.getElementName().equals(
                  node.getName())) {
            if (realType.getParent() instanceof IType) {
              IType ns = (IType) realType.getParent();
              instanceType = new PHPThisClassType(
                  ns.getElementName(),
                  realType.getElementName(), realType);
            } else {
              instanceType = new PHPThisClassType(
                  realType.getElementName(), realType);
            }
          } else {
            instanceType = new PHPTraitType(node.getName());
          }
        } else {
          instanceType = new PHPClassType(node.getName());
        }
      }
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.