1.
Method JQueryTyRuBaAPI#_getJavaModelElement(Object) does not work for inner classes/interfaces and their members. Parts like this:
result = p.findType(getPackage(target), JQueryAPI.getElementLabel(target));
should be replaced by
result = p.findType(_getQualifiedElementLabel(target));
where _getQualifiedElementLabel returns the qualified name of the targe. One could even consider to add getQualifiedElementLabel to the public API.
private String _getQualifiedElementLabel(Object target) {
return _getStringProperty(target, "qname"); //works for classes/interfaces only
}
2.
The p.findType() call should not be used for fields and methods. According to the documentation it is only intended for types. So in the field and method section I suggest to replace
IType t = p.findType(getPackage(target), getParent(target));
with
Object parent = getParent(target); //changed the existing getParent method to return the real parent object, not just the name
String parentQualifiedName = _getQualifiedElementLabel(parent);
IType t = p.findType(parentQualifiedName);
3.
Sometimes a false method is returned. Suppose there are 2 methods in a class: meth() and secondmeth().
The following code might return secondmeth() if actually meth() is searched:
for (int i = 0; i < m.length; i++) {
if (getMethodName(m[i]).contains(mName)) {
result = m[i];
}
}
If there is no reason to check the method names with contains(), I suggest to replace it wit equals(), as in the fields section.
The complete (documented) changes can be found in the RuBaDoc project here on Sourceforge.