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

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


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

    ClassDeclarationKeywordContext concreteContext = (ClassDeclarationKeywordContext) context;
    SourceRange replaceRange = getReplacementRange(concreteContext);
    String prefix = concreteContext.getPrefix();
    String statementText = concreteContext.getStatementText().toString();
    if (CodeAssistUtils.startsWithIgnoreCase(EXTENDS, prefix)
        && statementText.indexOf(EXTENDS_WITH_BLANK) < 0) {
      reporter.reportKeyword(EXTENDS, getSuffix(concreteContext),
          replaceRange);
    }
    if (CodeAssistUtils.startsWithIgnoreCase(IMPLEMENTS, prefix)
        && concreteContext.getPhpVersion().isGreaterThan(
            PHPVersion.PHP4)
        && statementText.indexOf(IMPLEMENTS_WITH_BLANK) < 0) {
      reporter.reportKeyword(IMPLEMENTS, getSuffix(concreteContext),
          replaceRange);
    }
View Full Code Here

TOP

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

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.