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
No related branches found
No related tags found
No related merge requests found
...@@ -52,7 +52,7 @@ import { Location } from '@angular/common'; ...@@ -52,7 +52,7 @@ import { Location } from '@angular/common';
], ],
}) })
export class AppComponent implements OnInit { export class AppComponent implements OnInit {
title = 'ExtendJ API Documentation'; title = 'OpenLicht Eraser Documentation';
showMenu = false; showMenu = false;
packages : Package[]; packages : Package[];
filter = ''; filter = '';
......
...@@ -7,6 +7,7 @@ export class Doc { ...@@ -7,6 +7,7 @@ export class Doc {
line: number; line: number;
description: string; description: string;
apilevel: string; apilevel: string;
relation: string;
params: string[] params: string[]
static fromJson(json: any): Doc { static fromJson(json: any): Doc {
...@@ -21,6 +22,7 @@ export class Doc { ...@@ -21,6 +22,7 @@ export class Doc {
line: json.line, line: json.line,
description: json.description, description: json.description,
apilevel: json.apilevel, apilevel: json.apilevel,
relation: json.relation,
params: json.params, params: json.params,
}; };
} }
......
...@@ -69,6 +69,37 @@ ...@@ -69,6 +69,37 @@
</ng-container> </ng-container>
</div> </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')"> <div *ngIf="filteredMembers('field')">
<h3>Fields</h3> <h3>Fields</h3>
<ul class="members"> <ul class="members">
......
...@@ -15,6 +15,7 @@ export class Type { ...@@ -15,6 +15,7 @@ export class Type {
superclass: TypeRef; superclass: TypeRef;
superinterfaces: TypeRef[]; superinterfaces: TypeRef[];
inherited_methods: InheritedMembers[]; inherited_methods: InheritedMembers[];
inherited_relations: InheritedMembers[];
inherited_attributes: InheritedMembers[]; inherited_attributes: InheritedMembers[];
inherited_fields: InheritedMembers[]; inherited_fields: InheritedMembers[];
subtypes: TypeRef[]; subtypes: TypeRef[];
...@@ -46,6 +47,11 @@ export class Type { ...@@ -46,6 +47,11 @@ export class Type {
inherited_methods = (json.inherited_methods as any[]).map(inherited => inherited_methods = (json.inherited_methods as any[]).map(inherited =>
InheritedMembers.fromJson(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; var inherited_attributes: InheritedMembers[] = undefined;
if (json.inherited_attributes) { if (json.inherited_attributes) {
inherited_attributes = (json.inherited_attributes as any[]).map(inherited => inherited_attributes = (json.inherited_attributes as any[]).map(inherited =>
...@@ -76,6 +82,7 @@ export class Type { ...@@ -76,6 +82,7 @@ export class Type {
superclass: superclass, superclass: superclass,
superinterfaces: superinterfaces, superinterfaces: superinterfaces,
inherited_methods: inherited_methods, inherited_methods: inherited_methods,
inherited_relations: inherited_relations,
inherited_attributes: inherited_attributes, inherited_attributes: inherited_attributes,
inherited_fields: inherited_fields, inherited_fields: inherited_fields,
subtypes: subtypes, subtypes: subtypes,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment