|
@@ -552,6 +552,8 @@ constructor THTMLWriter.Create(APackage: TPasPackage; AEngine: TFPDocEngine);
|
|
|
ALink : DOMString;
|
|
|
DidAutolink: Boolean;
|
|
|
begin
|
|
|
+ if not assigned(Amodule.Interfacesection) then
|
|
|
+ exit;
|
|
|
AddPage(AModule, 0);
|
|
|
AddPage(AModule,IndexSubIndex);
|
|
|
AddTopicPages(AModule);
|
|
@@ -2454,7 +2456,7 @@ begin
|
|
|
For I:=0 to Package.Modules.Count-1 do
|
|
|
begin
|
|
|
M:=TPasModule(Package.Modules[i]);
|
|
|
- if Not (M is TPasExternalModule) then
|
|
|
+ if Not (M is TPasExternalModule) and assigned(M.InterfaceSection) then
|
|
|
Self.AddElementsFromList(L,M.InterfaceSection.Classes,True)
|
|
|
end;
|
|
|
AppendMenuBar(ClassHierarchySubIndex);
|
|
@@ -2632,12 +2634,15 @@ end;
|
|
|
procedure THTMLWriter.AddModuleIdentifiers(AModule : TPasModule; L : TStrings);
|
|
|
|
|
|
begin
|
|
|
- AddElementsFromList(L,AModule.InterfaceSection.Consts);
|
|
|
- AddElementsFromList(L,AModule.InterfaceSection.Types);
|
|
|
- AddElementsFromList(L,AModule.InterfaceSection.Functions);
|
|
|
- AddElementsFromList(L,AModule.InterfaceSection.Classes);
|
|
|
- AddElementsFromList(L,AModule.InterfaceSection.Variables);
|
|
|
- AddElementsFromList(L,AModule.InterfaceSection.ResStrings);
|
|
|
+ if assigned(AModule.InterfaceSection) Then
|
|
|
+ begin
|
|
|
+ AddElementsFromList(L,AModule.InterfaceSection.Consts);
|
|
|
+ AddElementsFromList(L,AModule.InterfaceSection.Types);
|
|
|
+ AddElementsFromList(L,AModule.InterfaceSection.Functions);
|
|
|
+ AddElementsFromList(L,AModule.InterfaceSection.Classes);
|
|
|
+ AddElementsFromList(L,AModule.InterfaceSection.Variables);
|
|
|
+ AddElementsFromList(L,AModule.InterfaceSection.ResStrings);
|
|
|
+ end;
|
|
|
end;
|
|
|
|
|
|
|
|
@@ -3146,6 +3151,8 @@ var
|
|
|
ThisInterface,
|
|
|
ThisClass: TPasClassType;
|
|
|
HaveSeenTObject: Boolean;
|
|
|
+ LName : String;
|
|
|
+ ThisNode : TPasUnresolvedTypeRef;
|
|
|
begin
|
|
|
AppendMenuBar(-1);
|
|
|
AppendTitle(AClass.Name);
|
|
@@ -3321,15 +3328,24 @@ var
|
|
|
AppendText(CreateH2(BodyElement), SDocInheritance);
|
|
|
TableEl := CreateTable(BodyElement);
|
|
|
HaveSeenTObject := AClass.ObjKind <> okClass;
|
|
|
- ThisClass := AClass;
|
|
|
+ // we try to track classes. But imported classes
|
|
|
+ // are TLinkNode's not the TPasClassType generated by the parser.
|
|
|
+ ThisClass := AClass; ThisNode := Nil;
|
|
|
while True do
|
|
|
begin
|
|
|
TREl := CreateTR(TableEl);
|
|
|
TDEl := CreateTD_vtop(TREl);
|
|
|
TDEl['align'] := 'center';
|
|
|
CodeEl := CreateCode(CreatePara(TDEl));
|
|
|
- AppendHyperlink(CodeEl, ThisClass);
|
|
|
- if ThisClass.Interfaces.count>0 then
|
|
|
+ if Assigned(ThisClass) then
|
|
|
+ LName:=ThisClass.Name
|
|
|
+ Else
|
|
|
+ LName:=ThisNode.Name;
|
|
|
+ if Assigned(ThisClass) Then
|
|
|
+ AppendHyperlink(CodeEl, ThisClass)
|
|
|
+ else
|
|
|
+ AppendHyperlink(CodeEl, ThisNode);
|
|
|
+ if Assigned(ThisClass) and (ThisClass.Interfaces.count>0) then
|
|
|
begin
|
|
|
for i:=0 to ThisClass.interfaces.count-1 do
|
|
|
begin
|
|
@@ -3339,7 +3355,7 @@ var
|
|
|
end;
|
|
|
end;
|
|
|
AppendShortDescrCell(TREl, ThisClass);
|
|
|
- if HaveSeenTObject or (CompareText(ThisClass.Name, 'TObject') = 0) then
|
|
|
+ if HaveSeenTObject or (CompareText(LName, 'TObject') = 0) then
|
|
|
HaveSeenTObject := True
|
|
|
else
|
|
|
begin
|