Changeset 592
- Timestamp:
- 04/21/09 15:46:34 (3 years ago)
- Location:
- trunk/idldoc
- Files:
-
- 5 modified
-
docs/RELEASE (modified) (1 diff)
-
src/doc_system__define.pro (modified) (4 diffs)
-
src/tree/doctreeclass__define.pro (modified) (1 diff)
-
src/tree/doctreeprofile__define.pro (modified) (2 diffs)
-
src/tree/doctreeroutine__define.pro (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/idldoc/docs/RELEASE
r578 r592 22 22 2 for level 1 items plus parameters, keywords, fields, properties, and sav 23 23 file variables 24 25 * Adds links to names of routines and classes found in the Uses section for 26 routines and files. 24 27 25 28 * Miscellaneous small bug fixes. -
trunk/idldoc/src/doc_system__define.pro
r550 r592 549 549 550 550 ;+ 551 ; Add a routine to the visible routines list. 552 ; 553 ; :Params: 554 ; name : in, required, type=string 555 ; name of routine 556 ; routine : in, required, type=object 557 ; DOCtreeRoutine object 558 ;- 559 pro doc_system::addVisibleRoutine, name, routine 560 compile_opt strictarr 561 562 self.visibleRoutines->put, strlowcase(name), routine 563 end 564 565 566 ;+ 567 ; Find link to given resource. 568 ; 569 ; :Returns: 570 ; string, returns empty string if no resource found 571 ; 572 ; :Params: 573 ; resource : in, required, type=string 574 ;- 575 function doc_system::_findResourceLink, resource 576 compile_opt strictarr 577 578 class = self.classes->get(strlowcase(resource), found=found) 579 if (found) then begin 580 if (class->hasUrl()) then return, class->getUrl() 581 endif 582 583 routine = self.visibleRoutines->get(strlowcase(resource), found=found) 584 if (found) then begin 585 return, routine->getVariable('index_url') 586 endif 587 588 return, '' 589 end 590 591 592 ;+ 593 ; Convert the uses clause into a string array using the current comment style. 594 ; 595 ; :Returns: 596 ; strarr 597 ; 598 ; :Params: 599 ; tree : in, required, type=object 600 ; parse tree object 601 ; 602 ; :Keywords: 603 ; root : in, required, type=string 604 ; relative location of root from the calling routine or file 605 ;- 606 function doc_system::processUses, tree, root=root 607 compile_opt strictarr 608 609 if (~obj_valid(tree)) then return, '' 610 611 ; get plain text 612 crlf = string(!version.os_family eq 'unix' ? [10B] : [13B, 10B]) 613 plainParser = self->getParser('plainoutput') 614 s = plainParser->process(tree) 615 s = strjoin(s, crlf) 616 resources = strsplit(s, '[[:space:],]', /regex, /extract, count=nresources) 617 618 ; get new tree based with links to resources used 619 _tree = obj_new('MGtmTag', type='paragraph') 620 for r = 0L, nresources - 1L do begin 621 href = self->_findResourceLink(resources[r]) 622 if (href eq '') then begin 623 parent = _tree 624 endif else begin 625 link = obj_new('MGtmTag', type='link') 626 link->addAttribute, 'reference', root + '/' + href 627 _tree->addchild, link 628 parent = link 629 endelse 630 631 resourceName = obj_new('MGtmText', text=resources[r]) 632 parent->addChild, resourceName 633 634 if (r ne nresources - 1L) then begin 635 comma = obj_new('MGtmText', text=', ') 636 _tree->addChild, comma 637 endif 638 endfor 639 640 ; create output using current comment style 641 commentParser = self->getParser(self.commentStyle + 'output') 642 comments = commentParser->process(_tree) 643 644 ; destroy new tree 645 obj_destroy, _tree 646 647 return, comments 648 end 649 650 651 ;+ 551 652 ; Convert a parse tree into a string array using the plain output parser. 552 653 ; … … 968 1069 969 1070 obj_destroy, [self.index, self.proFiles, self.dlmFiles, self.savFiles, self.idldocFiles] 1071 obj_destroy, self.visibleRoutines 970 1072 971 1073 classes = self.classes->values(count=nClasses) … … 1187 1289 self.savFiles = obj_new('MGcoArrayList', type=11, block_size=20) 1188 1290 self.idldocFiles = obj_new('MGcoArrayList', type=11, block_size=20) 1291 1292 self.visibleRoutines = obj_new('MGcoHashTable', key_type=7, value_type=11) 1189 1293 1190 1294 self.requiresItems = obj_new('MGcoArrayList', type=11, block_size=20) … … 1377 1481 idldocFiles: obj_new(), $ 1378 1482 1483 visibleRoutines: obj_new(), $ 1484 1379 1485 requiresVersion: '', $ 1380 1486 requiresItems: obj_new() $ -
trunk/idldoc/src/tree/doctreeclass__define.pro
r586 r592 103 103 104 104 ;+ 105 ; Easy to use accessor for URL. 106 ; 107 ; :Returns: string 105 ; Easy to use accessor for URL to class file relative to doc root. 106 ; 107 ; :Returns: 108 ; string 108 109 ;- 109 110 function doctreeclass::getUrl -
trunk/idldoc/src/tree/doctreeprofile__define.pro
r565 r592 372 372 373 373 'has_uses': return, obj_valid(self.uses) 374 'uses': return, self.system->processComments(self.uses) 374 'uses': begin 375 self.directory->getProperty, url=dirUrl 376 if (dirUrl eq './') then begin 377 root = '.' 378 endif else begin 379 dummy = strsplit(dirUrl, '/', count=ndirs) 380 root = strjoin(strarr(ndirs) + '..', '/') 381 endelse 382 return, self.system->processUses(self.uses, root=root) 383 end 375 384 376 385 'plain_attributes': begin … … 529 538 routine->markArguments 530 539 routine->checkDocumentation 540 routine->getProperty, name=routineName 541 if (routine->isVisible()) then begin 542 self.system->addVisibleRoutine, routineName, routine 543 endif 531 544 endfor 532 545 end -
trunk/idldoc/src/tree/doctreeroutine__define.pro
r561 r592 342 342 343 343 'has_uses': return, obj_valid(self.uses) 344 'uses': return, self.system->processComments(self.uses) 345 344 'uses': begin 345 self.file->getProperty, directory=directory 346 directory->getProperty, url=dirUrl 347 if (dirUrl eq './') then begin 348 root = '.' 349 endif else begin 350 dummy = strsplit(dirUrl, '/', count=ndirs) 351 root = strjoin(strarr(ndirs) + '..', '/') 352 endelse 353 return, self.system->processUses(self.uses, root=root) 354 end 355 346 356 'has_requires': return, obj_valid(self.requires) 347 357 'requires': return, self.system->processComments(self.requires)
