mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
More indexing tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11804 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
52e04e800e
commit
f02d1c4666
4 changed files with 34 additions and 8 deletions
|
@ -1,10 +1,11 @@
|
|||
2001-12-18 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Tools/gsdoc-0_6_7.dtd: add scope to index element
|
||||
* Tools/gsdoc-0_6_7.dtd: added 'scope' to index element and
|
||||
added a 'title' type to list files in a project.
|
||||
* Tools/AGSHtml.h:
|
||||
* Tools/AGSHtml.m: Output tidyups and general format improvements.
|
||||
Add links to other documents in project. Add support for 'index'
|
||||
element with bioth file and project scope.
|
||||
element with both file and project scope.
|
||||
* Tools/autogsdoc.m: Clean up a little and handle gsdoc files
|
||||
listed as source files better .... now looks for them in the
|
||||
source directory.
|
||||
|
|
|
@ -761,9 +761,10 @@ static NSMutableSet *textNodes = nil;
|
|||
{
|
||||
dict = [projectRefs refs];
|
||||
}
|
||||
|
||||
|
||||
dict = [dict objectForKey: type];
|
||||
if ([dict count] > 0)
|
||||
if ([dict count] > 1
|
||||
|| ([dict count] > 0 && [type isEqual: @"title"] == NO))
|
||||
{
|
||||
NSArray *a = [dict allKeys];
|
||||
unsigned c = [a count];
|
||||
|
@ -806,6 +807,23 @@ static NSMutableSet *textNodes = nil;
|
|||
NSString *ref = [a objectAtIndex: i];
|
||||
NSString *file = [dict objectForKey: ref];
|
||||
|
||||
/*
|
||||
* Special case ... title listings are done in reverse
|
||||
* order, with the name of the file being the unique key
|
||||
* and the value being the title string.
|
||||
*/
|
||||
if ([type isEqual: @"title"] == YES)
|
||||
{
|
||||
NSString *tmp = ref;
|
||||
|
||||
ref = file;
|
||||
file = tmp;
|
||||
if ([file isEqual: base] == YES)
|
||||
{
|
||||
continue; // Don't list current file.
|
||||
}
|
||||
}
|
||||
|
||||
[buf appendString: indent];
|
||||
[buf appendFormat:
|
||||
@"<li><a href=\"%@.html#%@$%@\">%@</a></li>\n",
|
||||
|
|
|
@ -277,8 +277,8 @@
|
|||
</section>
|
||||
</chapter>
|
||||
<back>
|
||||
<index type="title" scope="project" />
|
||||
<index type="class" scope="project" />
|
||||
<index type="method" scope="project" />
|
||||
</back>
|
||||
*/
|
||||
|
||||
|
|
|
@ -485,11 +485,18 @@
|
|||
<!-- Table of contents. -->
|
||||
<!ELEMENT contents EMPTY>
|
||||
|
||||
<!-- Index ... generates an index of the specified type of elements. -->
|
||||
<!-- Index ... generates an index of the specified type of elements.
|
||||
'scope' determines whether the index is generated for the current file
|
||||
or for the whole of the current project ... if the document is
|
||||
processed in a standalone manner, the scope if always project.
|
||||
'type' determines the type of entry listed in the index. The 'title'
|
||||
type really only makes sense for a project scope index as it produces
|
||||
a list of the files in the project (by title).
|
||||
-->
|
||||
<!ELEMENT index EMPTY>
|
||||
<!ATTLIST index
|
||||
type (class | protocol | method | ivariable | function | type | macro | variable | constant | label) "label"
|
||||
scope (file | project) "file"
|
||||
type (class | protocol | method | ivariable | function | type | macro | variable | constant | label | title) "label"
|
||||
scope (title | project) "file"
|
||||
>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue