Changeset 751 for trunk

Show
Ignore:
Timestamp:
02/18/11 13:02:51 (15 months ago)
Author:
mgalloy
Message:

Fix for Ticket #73: added private and hidden attributes to directories listed in the Dirs tag of an overview file.

Location:
trunk
Files:
10 modified

Legend:

Unmodified
Added
Removed
  • trunk/docs/idldoc-reference.rst

    r710 r751  
    225225                                            library 
    226226  `:Dirs:`          dirs         none       lists directories in the library 
    227                                             along with a description for each 
     227                                            along with a description for each; 
     228                                            excepts ``private`` and ``hidden`` 
     229                                            attributes in the same manner as  
     230                                            the `:Params:` and `:Keywords:` 
     231                                            tags for routines 
    228232  `:History:`       comments     none       specifies the history of the  
    229233                                            library 
  • trunk/Makefile

    r742 r751  
    1 VERSION=3.3.2dev 
     1VERSION=3.4alpha 
    22REVISION=-r`svn info | sed -n 's/Revision: \(.*\)/\1/p'` 
    33IDL=idl64 
  • trunk/RELEASE

    r747 r751  
    1515  in rst markup syntax. 
    1616   
     17* Added private and hidden attributes to directory names in overview file. 
     18 
    1719 
    1820IDLdoc 3.3.1 
  • trunk/src/doc_system__define.pro

    r750 r751  
    143143    'n_pro_files': return, self.proFiles->count() 
    144144    'pro_files': return, self.proFiles->get(/all) 
    145     'just_files': return, self.directories->count() le 1 
     145    'just_files': begin 
     146        dirs = self.directories->get(/all, count=nDirs) 
     147        if (nDirs eq 0L) then return, -1L 
     148         
     149        isVisibleDirs = bytarr(nDirs) 
     150        for d = 0L, nDirs - 1L do begin 
     151          isVisibleDirs[d] = dirs[d]->isVisible() 
     152        endfor 
     153         
     154        ind = where(isVisibleDirs eq 1B, nVisibleDirs)       
     155        return, nVisibleDirs le 1 
     156      end 
    146157    'n_visible_pro_files': begin 
    147158        nVisible = 0L 
     
    166177        return, files[ind] 
    167178      end 
     179       
    168180    'n_dlm_files': return, self.dlmFiles->count() 
    169181    'dlm_files': return, self.dlmFiles->get(/all) 
     182    'n_visible_dlm_files': begin 
     183        nVisible = 0L 
     184        for f = 0L, self.dlmFiles->count() - 1L do begin 
     185          file = self.dlmFiles->get(position=f)           
     186          nVisible += file->isVisible()           
     187        endfor 
     188        return, nVisible 
     189      end 
     190    'visible_dlm_files': begin         
     191        files = self.dlmFiles->get(/all, count=nFiles) 
     192        if (nFiles eq 0L) then return, -1L 
     193         
     194        isVisibleFiles = bytarr(nFiles) 
     195        for f = 0L, nFiles - 1L do begin 
     196          isVisibleFiles[f] = files[f]->isVisible() 
     197        endfor 
     198         
     199        ind = where(isVisibleFiles eq 1B, nVisibleFiles) 
     200        if (nVisibleFiles eq 0L) then return, -1L 
     201         
     202        return, files[ind] 
     203      end 
     204       
    170205    'n_sav_files': return, self.savFiles->count() 
    171206    'sav_files': return, self.savFiles->get(/all) 
     207    'n_visible_sav_files': begin 
     208        nVisible = 0L 
     209        for f = 0L, self.savFiles->count() - 1L do begin 
     210          file = self.savFiles->get(position=f)           
     211          nVisible += file->isVisible()           
     212        endfor 
     213        return, nVisible 
     214      end 
     215    'visible_sav_files': begin         
     216        files = self.savFiles->get(/all, count=nFiles) 
     217        if (nFiles eq 0L) then return, -1L 
     218         
     219        isVisibleFiles = bytarr(nFiles) 
     220        for f = 0L, nFiles - 1L do begin 
     221          isVisibleFiles[f] = files[f]->isVisible() 
     222        endfor 
     223         
     224        ind = where(isVisibleFiles eq 1B, nVisibleFiles) 
     225        if (nVisibleFiles eq 0L) then return, -1L 
     226         
     227        return, files[ind] 
     228      end 
     229           
    172230    'n_idldoc_files': return, self.idldocFiles->count() 
    173231    'idldoc_files': return, self.idldocFiles->get(/all) 
    174  
     232    'n_visible_idldoc_files': begin 
     233        nVisible = 0L 
     234        for f = 0L, self.idldocFiles->count() - 1L do begin 
     235          file = self.idldocFiles->get(position=f)           
     236          nVisible += file->isVisible()           
     237        endfor 
     238        return, nVisible 
     239      end 
     240    'visible_idldoc_files': begin         
     241        files = self.idldocFiles->get(/all, count=nFiles) 
     242        if (nFiles eq 0L) then return, -1L 
     243         
     244        isVisibleFiles = bytarr(nFiles) 
     245        for f = 0L, nFiles - 1L do begin 
     246          isVisibleFiles[f] = files[f]->isVisible() 
     247        endfor 
     248         
     249        ind = where(isVisibleFiles eq 1B, nVisibleFiles) 
     250        if (nVisibleFiles eq 0L) then return, -1L 
     251         
     252        return, files[ind] 
     253      end 
     254       
    175255    'css_location': return, filepath('main.css', $ 
    176256                                     subdir='resources', $ 
  • trunk/src/idldoc_version.pro

    r744 r751  
    1515  compile_opt strictarr, hidden 
    1616   
    17   version = '3.3.2dev' 
    18   revision = '-r743' 
     17  version = '3.4alpha' 
     18  revision = '-r744' 
    1919   
    2020  return, version + (keyword_set(full) ? (' ' + revision) : '') 
  • trunk/src/parser/docparrstformatparser__define.pro

    r647 r751  
    785785              dirName += path_sep() 
    786786            endif                                                                   
    787              
     787           
    788788            dd = 0L 
    789789            done = 0B 
    790790            while (dd lt directories->count() && ~done) do begin 
    791791              dir = directories->get(position=dd) 
    792               dir->getProperty, location=location 
     792              dir->getProperty, location=location               
    793793               
    794794              if (dirName eq location) then begin 
    795  
     795                def_line = dirLines[dirDefinitionLines[d]] 
     796                colon_pos = strpos(def_line, ':') 
     797                if (colon_pos ne -1) then begin 
     798                  attributes = strmid(def_line, colon_pos + 1L) 
     799                  attrs = strsplit(attributes, ', ', /extract, count=nAttributes) 
     800                  for a = 0L, nAttributes - 1L do begin 
     801                    case strlowcase(attrs[a]) of 
     802                      'private': dir->setProperty, is_private=1B 
     803                      'hidden': dir->setProperty, is_hidden=1B 
     804                      else: begin 
     805                        system->getProperty, overview=overview 
     806                        system->warning, 'unknown attribute "' + attrs[a] + '" for directory ' + location + ' in overview file ' + overview                         
     807                      end 
     808                    endcase 
     809                  endfor 
     810                endif 
     811                 
    796812                dirDefinitionEnd = d eq nDirs - 1L $ 
    797813                                     ? n_elements(dirLines) - 1L $ 
  • trunk/src/templates/all-files.tt

    r666 r751  
    3636    [% END %] 
    3737 
    38     [% IF n_dlm_files gt 0 %] 
    39     <h1>.dlm files &nbsp;&nbsp; <span>[% n_dlm_files %] files</span></h1> 
     38    [% IF n_visible_dlm_files gt 0 %] 
     39    <h1>.dlm files &nbsp;&nbsp; <span>[% n_visible_dlm_files %] files</span></h1> 
    4040      <ul> 
    41         [% FOREACH f IN dlm_files %] 
     41        [% FOREACH f IN visible_dlm_files %] 
    4242          <li>[% SCOPE f %]<a href="[% url %][% local_url %]" target="main_frame">[% basename %]</a>[% END %]</li> 
    4343        [% END %] 
     
    4545    [% END %] 
    4646         
    47     [% IF n_sav_files gt 0 %] 
    48     <h1>.sav files &nbsp;&nbsp; <span>[% n_sav_files %] files</span></h1> 
     47    [% IF n_visible_sav_files gt 0 %] 
     48    <h1>.sav files &nbsp;&nbsp; <span>[% n_visible_sav_files %] files</span></h1> 
    4949      <ul> 
    50         [% FOREACH f IN sav_files %] 
     50        [% FOREACH f IN visible_sav_files %] 
    5151          <li>[% SCOPE f %]<a href="[% url %][% local_url %]" target="main_frame">[% basename %]</a>[% END %]</li> 
    5252        [% END %] 
     
    5454    [% END %] 
    5555     
    56     [% IF n_idldoc_files %] 
    57     <h1>.idldoc files &nbsp;&nbsp; <span>[% n_idldoc_files %] files</span></h1> 
     56    [% IF n_visible_idldoc_files %] 
     57    <h1>.idldoc files &nbsp;&nbsp; <span>[% n_visible_idldoc_files %] files</span></h1> 
    5858      <ul> 
    59         [% FOREACH f IN idldoc_files %] 
     59        [% FOREACH f IN visible_idldoc_files %] 
    6060          <li>[% SCOPE f %]<a href="[% url %][% local_url %]" target="main_frame">[% file_title %]</a>[% END %]</li> 
    6161        [% END %] 
  • trunk/src/templates/dir-overview.tt

    r744 r751  
    7777      <h2>Contents</h2> 
    7878       
    79       [% IF n_dlm_files gt 0 %] 
     79      [% IF n_visible_dlm_files gt 0 %] 
    8080        <h3>.dlm files</h3> 
    8181         
    8282        <dl class="file_listing"> 
    83           [% FOREACH f IN dlm_files %][% SCOPE f %] 
     83          [% FOREACH f IN visible_dlm_files %][% SCOPE f %] 
    8484          <dt class="filename"><a href="[% local_url %]">[% basename %]</a></dt> 
    8585          <dd class="smaller">[% description %]</dd>   
     
    8888      [% END %] 
    8989       
    90       [% IF n_sav_files gt 0 %] 
     90      [% IF n_visible_sav_files gt 0 %] 
    9191        <h3>.sav files</h3> 
    9292         
    9393        <dl class="file_listing"> 
    94           [% FOREACH f IN sav_files %][% SCOPE f %] 
     94          [% FOREACH f IN visible_sav_files %][% SCOPE f %] 
    9595          <dt class="filename"><a href="[% local_url %]">[% basename %]</a></dt> 
    9696          <dd class="smaller">[% description %]</dd>   
     
    9999      [% END %] 
    100100 
    101       [% IF n_idldoc_files gt 0 %] 
     101      [% IF n_visible_idldoc_files gt 0 %] 
    102102      <h3>.idldoc files</h3> 
    103103       
    104104        <dl class="file_listing"> 
    105           [% FOREACH f IN idldoc_files %][% SCOPE f %] 
     105          [% FOREACH f IN visible_idldoc_files %][% SCOPE f %] 
    106106          <dt class="filename">[% file_title %]</dt> 
    107107          <dd class="smaller"></dd>   
  • trunk/src/templates/file-listing.tt

    r666 r751  
    3636    [% END %] 
    3737 
    38     [% IF n_dlm_files gt 0 %] 
    39     <h1>.dlm files &nbsp;&nbsp; <span>[% n_dlm_files %] files</span></h1> 
     38    [% IF n_visible_dlm_files gt 0 %] 
     39    <h1>.dlm files &nbsp;&nbsp; <span>[% n_visible_dlm_files %] files</span></h1> 
    4040      <ul> 
    41         [% FOREACH f IN dlm_files %] 
     41        [% FOREACH f IN visible_dlm_files %] 
    4242          <li>[% SCOPE f %]<a href="[% local_url %]" target="main_frame">[% basename %]</a>[% END %]</li> 
    4343        [% END %] 
     
    4545    [% END %] 
    4646         
    47     [% IF n_sav_files gt 0 %] 
    48     <h1>.sav files &nbsp;&nbsp; <span>[% n_sav_files %] files</span></h1> 
     47    [% IF n_visible_sav_files gt 0 %] 
     48    <h1>.sav files &nbsp;&nbsp; <span>[% n_visible_sav_files %] files</span></h1> 
    4949      <ul> 
    50         [% FOREACH f IN sav_files %] 
     50        [% FOREACH f IN visible_sav_files %] 
    5151          <li>[% SCOPE f %]<a href="[% local_url %]" target="main_frame">[% basename %]</a>[% END %]</li> 
    5252        [% END %] 
     
    5454    [% END %] 
    5555     
    56     [% IF n_idldoc_files %] 
    57     <h1>.idldoc files &nbsp;&nbsp; <span>[% n_idldoc_files %] files</span></h1> 
     56    [% IF n_visible_idldoc_files %] 
     57    <h1>.idldoc files &nbsp;&nbsp; <span>[% n_visible_idldoc_files %] files</span></h1> 
    5858      <ul> 
    59         [% FOREACH f IN idldoc_files %] 
     59        [% FOREACH f IN visible_idldoc_files %] 
    6060          <li>[% SCOPE f %]<a href="[% local_url %]" target="main_frame">[% file_title %]</a>[% END %]</li> 
    6161        [% END %] 
  • trunk/src/tree/doctreedirectory__define.pro

    r741 r751  
    193193        return, files[ind] 
    194194      end 
     195       
    195196    'n_dlm_files' : return, self.dlmFiles->count() 
    196197    'dlm_files' : return, self.dlmFiles->get(/all) 
     198    'n_visible_dlm_files': begin 
     199        nVisible = 0L 
     200        for f = 0L, self.dlmFiles->count() - 1L do begin 
     201          file = self.dlmFiles->get(position=f)           
     202          nVisible += file->isVisible()           
     203        endfor 
     204        return, nVisible 
     205      end 
     206    'visible_dlm_files': begin         
     207        files = self.dlmFiles->get(/all, count=nFiles) 
     208        if (nFiles eq 0L) then return, -1L 
     209         
     210        isVisibleFiles = bytarr(nFiles) 
     211        for f = 0L, nFiles - 1L do begin 
     212          isVisibleFiles[f] = files[f]->isVisible() 
     213        endfor 
     214         
     215        ind = where(isVisibleFiles eq 1B, nVisibleFiles) 
     216        if (nVisibleFiles eq 0L) then return, -1L 
     217         
     218        return, files[ind] 
     219      end 
     220           
    197221    'n_sav_files' : return, self.savFiles->count() 
    198222    'sav_files' : return, self.savFiles->get(/all) 
     223    'n_visible_sav_files': begin 
     224        nVisible = 0L 
     225        for f = 0L, self.savFiles->count() - 1L do begin 
     226          file = self.savFiles->get(position=f)           
     227          nVisible += file->isVisible()           
     228        endfor 
     229        return, nVisible 
     230      end 
     231    'visible_sav_files': begin         
     232        files = self.savFiles->get(/all, count=nFiles) 
     233        if (nFiles eq 0L) then return, -1L 
     234         
     235        isVisibleFiles = bytarr(nFiles) 
     236        for f = 0L, nFiles - 1L do begin 
     237          isVisibleFiles[f] = files[f]->isVisible() 
     238        endfor 
     239         
     240        ind = where(isVisibleFiles eq 1B, nVisibleFiles) 
     241        if (nVisibleFiles eq 0L) then return, -1L 
     242         
     243        return, files[ind] 
     244      end 
     245           
    199246    'n_idldoc_files' : return, self.idldocFiles->count() 
    200247    'idldoc_files' : return, self.idldocFiles->get(/all) 
    201      
     248    'n_visible_idldoc_files': begin 
     249        nVisible = 0L 
     250        for f = 0L, self.idldocFiles->count() - 1L do begin 
     251          file = self.idldocFiles->get(position=f)           
     252          nVisible += file->isVisible()           
     253        endfor 
     254        return, nVisible 
     255      end 
     256    'visible_idldoc_files': begin         
     257        files = self.idldocFiles->get(/all, count=nFiles) 
     258        if (nFiles eq 0L) then return, -1L 
     259         
     260        isVisibleFiles = bytarr(nFiles) 
     261        for f = 0L, nFiles - 1L do begin 
     262          isVisibleFiles[f] = files[f]->isVisible() 
     263        endfor 
     264         
     265        ind = where(isVisibleFiles eq 1B, nVisibleFiles) 
     266        if (nVisibleFiles eq 0L) then return, -1L 
     267         
     268        return, files[ind] 
     269      end 
     270           
    202271    'fullname' : return, strjoin(strsplit(self.location, path_sep(), /extract), '.') 
    203272