Package org.eclipse.php.core.codeassist

Examples of org.eclipse.php.core.codeassist.ICompletionContext


    super(context);
  }

  public void apply(ICompletionReporter reporter) throws BadLocationException {

    ICompletionContext context = getContext();
    AbstractCompletionContext abstractContext = (AbstractCompletionContext) context;
    SourceRange replacementRange = getReplacementRange(abstractContext);

    IType[] types = getTypes(abstractContext);
View Full Code Here


  @Override
  protected boolean filterKeyword(KeywordData keyword) {
    // if the class does not have parent
    if ((keyword.context & PHPKeywords.METHOD_BODY) != 0
        && isParent(keyword)) {
      ICompletionContext context = getContext();
      if (context instanceof GlobalMethodStatementContext) {
        GlobalMethodStatementContext globalContext = (GlobalMethodStatementContext) context;
        IType type = globalContext.getEnclosingType();
        try {
          if (type != null && PHPFlags.isClass(type.getFlags())) {
View Full Code Here

  public TypeCastingStrategy(ICompletionContext context) {
    super(context);
  }

  public void apply(ICompletionReporter reporter) throws BadLocationException {
    ICompletionContext context = getContext();
    SourceRange range = getReplacementRange(context);
    TypeCastingContext typeCastingContext = (TypeCastingContext) context;
    String prefix = typeCastingContext.getPrefix().toLowerCase();
    for (String cast : TYPE_CASTS) {
      if (cast.startsWith(prefix)) {
View Full Code Here

      int falseFlag) {
    super(context, trueFlag, falseFlag);
  }

  public void apply(ICompletionReporter reporter) throws BadLocationException {
    ICompletionContext context = getContext();
    if (!(context instanceof PHPDocTagContext)) {
      return;
    }
    super.apply(reporter);
    String prefix = ((PHPDocTagContext) context).getPrefix();
View Full Code Here

  public IncludeStatementStrategy(ICompletionContext context) {
    super(context);
  }

  public void apply(ICompletionReporter reporter) throws Exception {
    ICompletionContext context = getContext();
    if (!(context instanceof IncludeStatementContext)) {
      return;
    }

    IncludeStatementContext includeContext = (IncludeStatementContext) context;
View Full Code Here

    if (!container.isAccessible()) {
      return;
    }

    ICompletionContext context = getContext();
    if (container instanceof IProject) {
      for (IContainer con : getContainers(container)) {
        findResource(reporter, replaceRange, con, lastSegmant, context,
            con);
      }
View Full Code Here

    super(context);
  }

  public void apply(ICompletionReporter reporter)
      throws BadLocationException, ModelException {
    ICompletionContext context = getContext();
    if (!(context instanceof GlobalMethodStatementContext)) {
      return;
    }

    GlobalMethodStatementContext concreteContext = (GlobalMethodStatementContext) context;
View Full Code Here

    super(context);
  }

  public void apply(ICompletionReporter reporter) throws BadLocationException {

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

    SourceRange replaceRange = getReplacementRange(context);

    String suffix = "";//$NON-NLS-1$
View Full Code Here

    super(context);
  }

  public void apply(ICompletionReporter reporter) throws BadLocationException {

    ICompletionContext context = getContext();
    AbstractCompletionContext concreteContext = (AbstractCompletionContext) context;
    ISourceModule sourceModule = concreteContext.getSourceModule();
    String prefix = concreteContext.getPrefix();
    SourceRange replaceRange = getReplacementRange(concreteContext);
    boolean withoutSemicolon = concreteContext.getNextWord().trim()
View Full Code Here

  public ClassDeclarationKeywordsStrategy(ICompletionContext context) {
    super(context);
  }

  public void apply(ICompletionReporter reporter) throws BadLocationException {
    ICompletionContext context = getContext();
    if (!(context instanceof ClassDeclarationKeywordContext)) {
      return;
    }

    ClassDeclarationKeywordContext concreteContext = (ClassDeclarationKeywordContext) context;
View Full Code Here

TOP

Related Classes of org.eclipse.php.core.codeassist.ICompletionContext

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.