Commit 988764b5 authored by Miklos Magyari's avatar Miklos Magyari
Browse files

Get @member info from parent for inherited members (issue #466)


Signed-off-by: Miklos Magyari's avatarMiklos Magyari <miklos.magyari@sigmatechnology.se>
parent 4db77a85
......@@ -39,6 +39,7 @@ import org.eclipse.titan.designer.AST.TTCN3.IIncrementallyUpdateable;
import org.eclipse.titan.designer.AST.TTCN3.TTCN3Scope;
import org.eclipse.titan.designer.AST.TTCN3.definitions.Def_Function;
import org.eclipse.titan.designer.AST.TTCN3.definitions.Def_Timer;
import org.eclipse.titan.designer.AST.TTCN3.definitions.Def_Type;
import org.eclipse.titan.designer.AST.TTCN3.definitions.Definition;
import org.eclipse.titan.designer.AST.TTCN3.definitions.VisibilityModifier;
import org.eclipse.titan.designer.editors.controls.Ttcn3HoverContent;
......@@ -628,6 +629,17 @@ public final class ClassTypeBody extends TTCN3Scope implements IReferenceChainEl
content.addStyledText(" (overridden)", SWT.ITALIC);
} else if (def.isInherited()) {
content.addStyledText(" (inherited)", SWT.ITALIC);
if (def.getMyScope() instanceof ClassTypeBody) {
final ClassTypeBody parentBody = (ClassTypeBody)def.getMyScope();
if (! parentBody.equals(this)) {
final Class_Type parentClass = parentBody.getMyType();
final Def_Type parentType = (Def_Type)parentClass.getNameParent();
final Map<String,String> parentMembers = parentType.getDocumentComment().getMembers();
if (parentMembers != null) {
memberText = parentMembers.get(id);
}
}
}
}
content.addText(" ").addText(memberText != null ? memberText : "").addText("<br>");
}
......
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