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

Examples of org.eclipse.php.internal.core.codeassist.contexts.NamespaceMemberContext


  }

  public void apply(ICompletionReporter reporter) throws BadLocationException {

    ICompletionContext context = getContext();
    NamespaceMemberContext concreteContext = (NamespaceMemberContext) context;
    CompletionRequestor requestor = concreteContext
        .getCompletionRequestor();

    IType enclosingClass = null;
    try {
      IModelElement enclosingElement = concreteContext.getSourceModule()
          .getElementAt(concreteContext.getOffset());
      while (enclosingElement instanceof IField) {
        enclosingElement = enclosingElement.getParent();
      }
      if (enclosingElement instanceof IMethod) {
        IModelElement parent = ((IMethod) enclosingElement).getParent();
View Full Code Here


    ICompletionContext context = getContext();
    if (!(context instanceof NamespaceMemberContext)) {
      return;
    }

    NamespaceMemberContext concreteContext = (NamespaceMemberContext) context;
    String prefix = concreteContext.getPrefix();
    String suffix = getSuffix(concreteContext);
    SourceRange replaceRange = getReplacementRange(concreteContext);

    for (IType ns : concreteContext.getNamespaces()) {
      try {
        for (IField field : ns.getFields()) {
          if (!PHPFlags.isConstant(field.getFlags())) {
            continue;
          }
View Full Code Here

    ICompletionContext context = getContext();
    if (!(context instanceof NamespaceMemberContext)) {
      return;
    }

    NamespaceMemberContext concreteContext = (NamespaceMemberContext) context;
    // now we compute type suffix in PHPCompletionProposalCollector
    String suffix = "";//$NON-NLS-1$
    SourceRange replaceRange = getReplacementRange(concreteContext);

    for (IType type : getTypes(concreteContext)) {
View Full Code Here

  }

  public void apply(ICompletionReporter reporter) throws BadLocationException {

    ICompletionContext context = getContext();
    NamespaceMemberContext concreteContext = (NamespaceMemberContext) context;

    SourceRange replaceRange = getReplacementRange(context);

    String suffix = "";//$NON-NLS-1$
    String nsSuffix = getNSSuffix(concreteContext);
View Full Code Here

    ICompletionContext context = getContext();
    if (!(context instanceof NamespaceMemberContext)) {
      return;
    }

    NamespaceMemberContext concreteContext = (NamespaceMemberContext) context;
    String prefix = concreteContext.getPrefix();
    String suffix = getSuffix(concreteContext);
    SourceRange replaceRange = getReplacementRange(concreteContext);

    for (IType ns : concreteContext.getNamespaces()) {
      try {
        for (IMethod method : ns.getMethods()) {
          if (CodeAssistUtils.startsWithIgnoreCase(method.getElementName(), prefix)) {
            reporter.reportMethod(method, suffix, replaceRange);
          }
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.core.codeassist.contexts.NamespaceMemberContext

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.