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);
}