+sub get_links {
+
+ my $data = {};
+
+ foreach my $blockid (sort keys %{$fileinfo->{blockid_target}->{default}}) {
+ my $link = $fileinfo->{blockid_target}->{default}->{$blockid};
+ my $reftitle = $fileinfo->{reftitle}->{default}->{$blockid};
+ my $reftext = $fileinfo->{reftext}->{default}->{$blockid};
+ die "internal error" if $link !~ m/^link:/;
+ $link =~ s/^link://;
+
+ my $file = $fileinfo->{blockid}->{default}->{$blockid};
+ die "internal error - no filename" if ! defined($file);
+ my $title = $fileinfo->{titles}->{default}->{$file} ||
+ die "internal error - no title";
+
+ $data->{$blockid}->{title} = $title;
+ $data->{$blockid}->{link} = $link;
+ my $subtitle = $reftitle || $reftext;
+ $data->{$blockid}->{subtitle} = $subtitle
+ if $subtitle && ($title ne $subtitle);
+ }
+
+ return $data;
+}
+
+sub scan_extjs_file {
+ my ($filename, $res_data) = @_;
+
+ my $fh = IO::File->new($filename, "r") ||
+ die "unable to open '$filename' - $!\n";
+
+ debug("scan-extjs $filename");
+
+ while(defined(my $line = <$fh>)) {
+ if ($line =~ m/\s+onlineHelp:\s*[\'\"](.*?)[\'\"]/) {
+ my $blockid = $1;
+ my $link = $fileinfo->{blockid_target}->{default}->{$blockid};
+ die "undefined blockid '$blockid' ($filename, line $.)\n"
+ if !(defined($link) || defined($online_help_links->{$blockid}));
+
+ $res_data->{$blockid} = 1;
+ }
+ }
+}
+