diff --git a/src/app/app.component.ts b/src/app/app.component.ts index e69849aa14f7831c19119abbdd5a8cb649cc6c9e..9ec8c9c4f3326015adacdf6440674e440e6bc117 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -52,7 +52,7 @@ import { Location } from '@angular/common'; ], }) export class AppComponent implements OnInit { - title = 'ExtendJ API Documentation'; + title = 'OpenLicht Eraser Documentation'; showMenu = false; packages : Package[]; filter = ''; diff --git a/src/app/doc.ts b/src/app/doc.ts index 61e60baceede82afc01e16e80fee4072271e7063..7c8394045910d1f1aa8c3e35474e23eecec45a83 100644 --- a/src/app/doc.ts +++ b/src/app/doc.ts @@ -7,6 +7,7 @@ export class Doc { line: number; description: string; apilevel: string; + relation: string; params: string[] static fromJson(json: any): Doc { @@ -21,6 +22,7 @@ export class Doc { line: json.line, description: json.description, apilevel: json.apilevel, + relation: json.relation, params: json.params, }; } diff --git a/src/app/type-details.component.html b/src/app/type-details.component.html index 6d59d542f2ffcd70d0257e8978e8d05832b23b63..7c09460f1101205a78ee20508ffac493089192db 100644 --- a/src/app/type-details.component.html +++ b/src/app/type-details.component.html @@ -69,6 +69,37 @@ </ng-container> </div> +<!-- RS: Begin relations --> + <div *ngIf="filteredMembers('rel')"> + <h3>Relations</h3> + <ul class="members"> + <li *ngFor="let member of type.groups['rel'] | nameFilter:filter"> + <details> + <summary> + <div class="doc-signature"><div class="member-type"><type-ref [type]="member.type"></type-ref></div> <span class="member-name">{{member.doc.relation}}</span> + <div class="doc-preview" *ngIf="member.doc" [innerHTML]="member.doc.description"></div></div> + </summary> + + <div class="member-details"> + <p *ngIf="member.doc" [innerHTML]="member.doc.description"></p> + <p *ngIf="member.doc && member.doc.ragFile">{{member.name}}() <declared-at [doc]="member.doc"></declared-at> + <p *ngIf="!member.isVoid"><b>Returns</b> <type-ref [type]="member.type"></type-ref><ng-container *ngIf="member.doc && member.doc.return"> : <span class="return" *ngIf="member.doc" [innerHTML]="member.doc.return"></span></ng-container> + </div> + </details> + </li> + </ul> + </div> + + <div *ngIf="type.inherited_relations"> + <ng-container *ngFor="let inherited of type.inherited_relations"> + <ng-container *ngIf="inheritedMembers(inherited)"> + <h3>Relations inherited from <type-ref [type]="inherited.superclass"></type-ref></h3> + <ng-container *ngFor="let member of inherited.members | stringFilter:filter; let isLast = last"><type-ref [type]="inherited.superclass" [name]="member" [filter]="member"></type-ref><ng-container *ngIf="!isLast">, </ng-container></ng-container> + </ng-container> + </ng-container> + </div> +<!-- RS: End relations --> + <div *ngIf="filteredMembers('field')"> <h3>Fields</h3> <ul class="members"> diff --git a/src/app/type.ts b/src/app/type.ts index c7c794bc2bd1531cc725fb6dc194c0aa8e3a4998..ad37a8b5cb9c1683e08ebe02f561a32e438d9bc8 100644 --- a/src/app/type.ts +++ b/src/app/type.ts @@ -15,6 +15,7 @@ export class Type { superclass: TypeRef; superinterfaces: TypeRef[]; inherited_methods: InheritedMembers[]; + inherited_relations: InheritedMembers[]; inherited_attributes: InheritedMembers[]; inherited_fields: InheritedMembers[]; subtypes: TypeRef[]; @@ -46,6 +47,11 @@ export class Type { inherited_methods = (json.inherited_methods as any[]).map(inherited => InheritedMembers.fromJson(inherited)); } + var inherited_relations: InheritedMembers[] = undefined; + if (json.inherited_relations) { + inherited_relations = (json.inherited_relations as any[]).map(inherited => + InheritedMembers.fromJson(inherited)); + } var inherited_attributes: InheritedMembers[] = undefined; if (json.inherited_attributes) { inherited_attributes = (json.inherited_attributes as any[]).map(inherited => @@ -76,6 +82,7 @@ export class Type { superclass: superclass, superinterfaces: superinterfaces, inherited_methods: inherited_methods, + inherited_relations: inherited_relations, inherited_attributes: inherited_attributes, inherited_fields: inherited_fields, subtypes: subtypes,