Commit 3068817d authored by Miklos Magyari's avatar Miklos Magyari
Browse files

Fixed possible null exception when hovering over a definition


Signed-off-by: Miklos Magyari's avatarMiklos Magyari <miklos.magyari@sigmatechnology.se>
parent 813a29e1
......@@ -1313,14 +1313,17 @@ public final class Class_Type extends Type implements ITypeWithComponents {
// if (isDefintionInherited(def)) {
// content.addStyledText(" (inherited)", SWT.ITALIC);
// }
final Class_Type parentBody = (Class_Type)def.getNameParent();
if (! parentBody.equals(this)) {
final Class_Type parentClass = baseClass;
final Def_Type parentType = (Def_Type)parentClass.getNameParent();
if (parentType.hasDocumentComment()) {
final Map<String,String> parentMembers = parentType.getDocumentComment().getMembers();
if (parentMembers != null) {
memberText = parentMembers.get(id);
if (def.getNameParent() instanceof Class_Type) {
final Class_Type parentBody = (Class_Type)def.getNameParent();
if (! parentBody.equals(this)) {
final Class_Type parentClass = baseClass;
final Def_Type parentType = (Def_Type)parentClass.getNameParent();
if (parentType.hasDocumentComment()) {
final Map<String,String> parentMembers = parentType.getDocumentComment().getMembers();
if (parentMembers != null) {
memberText = parentMembers.get(id);
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment