if (element == null || !(element instanceof SourceType)) {
return;
}
IDLTKSearchScope scope = SearchEngine.createSearchScope(module.getScriptProject());
SourceType type = (SourceType) element;
SourceRange range = getReplacementRange(context);
String prefix = context.getPrefix();
IType[] projectTypes = PhpModelAccess.getDefault().findTypes(type.getElementName(), MatchRule.EXACT, 0, 0, scope, null);
if (projectTypes.length != 1) {
return;
}
IType currentType = projectTypes[0];
ITypeHierarchy hierarchy = this.getCompanion().getSuperTypeHierarchy(type, new NullProgressMonitor());
IType[] superTypes = hierarchy.getAllSupertypes(currentType);
List<String> reported = new ArrayList<String>();
for (IType superType : superTypes) {
for (IMethod method : superType.getMethods()) {
IMethod moduleMethod = type.getMethod(method.getElementName());
try {
// throws a ModelException for methods not declared inside this sourcemodule,
// hence when it passes we can safely continue
moduleMethod.getUnderlyingResource();