Skip to content
Snippets Groups Projects
Commit 02d3315b authored by René Schöne's avatar René Schöne
Browse files

Changes for relations (long ago and probably incomplete)

parent 4bb8afb1
Branches
No related tags found
No related merge requests found
......@@ -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 = '';
......
......@@ -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,
};
}
......
......@@ -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">
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment