/[classpath]/gjdoc/src/gnu/classpath/tools/doclets/xmldoclet/Driver.java
ViewVC logotype

Diff of /gjdoc/src/gnu/classpath/tools/doclets/xmldoclet/Driver.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.34 by julian, Tue Nov 23 13:33:58 2004 UTC revision 1.35 by julian, Tue Nov 23 13:53:37 2004 UTC
# Line 54  import gnu.classpath.tools.doclets.xmldo Line 54  import gnu.classpath.tools.doclets.xmldo
54  import gnu.classpath.tools.taglets.AuthorTaglet;  import gnu.classpath.tools.taglets.AuthorTaglet;
55  import gnu.classpath.tools.taglets.VersionTaglet;  import gnu.classpath.tools.taglets.VersionTaglet;
56  import gnu.classpath.tools.taglets.SinceTaglet;  import gnu.classpath.tools.taglets.SinceTaglet;
57    import gnu.classpath.tools.taglets.GenericTaglet;
58    
59  import gnu.classpath.tools.java2xhtml.Java2xhtml;  import gnu.classpath.tools.java2xhtml.Java2xhtml;
60    
# Line 977  public class Driver { Line 978  public class Driver {
978                 else if ("-stylesheetfile".equals(optionTag)) {                 else if ("-stylesheetfile".equals(optionTag)) {
979                    docTransletOptions.stylesheetfile = new File(option[1]).toURL().toString();                    docTransletOptions.stylesheetfile = new File(option[1]).toURL().toString();
980                 }                 }
981                   else if ("-tag".equals(optionTag)) {
982                      String tagSpec = option[1];
983                      boolean validTagSpec = false;
984                      int ndx1 = tagSpec.indexOf(':');
985                      if (ndx1 >= 0) {
986                         int ndx2 = tagSpec.indexOf(':', ndx1 + 1);
987                         if (ndx2 > ndx1 && ndx2 < tagSpec.length() - 1) {
988                            String tagName = tagSpec.substring(0, ndx1);
989                            String tagHead = null;
990                            if (tagSpec.charAt(ndx2 + 1) == '\"') {
991                               if (tagSpec.charAt(tagSpec.length() - 1) == '\"') {
992                                  tagHead = tagSpec.substring(ndx2 + 2, tagSpec.length() - 1);
993                                  validTagSpec = true;
994                               }
995                            }
996                            else {
997                               tagHead = tagSpec.substring(ndx2 + 1);
998                               validTagSpec = true;
999                            }
1000    
1001                            boolean tagScopeOverview = false;
1002                            boolean tagScopePackages = false;
1003                            boolean tagScopeTypes = false;
1004                            boolean tagScopeConstructors = false;
1005                            boolean tagScopeMethods = false;
1006                            boolean tagScopeFields = false;
1007                            boolean tagDisabled = false;
1008                            
1009                         tag_option_loop:
1010                            for (int n=ndx1+1; n<ndx2; ++n) {
1011                               switch (tagSpec.charAt(n)) {
1012                               case 'X':
1013                                  tagDisabled = true;
1014                                  break;
1015                               case 'a':
1016                                  tagScopeOverview = true;
1017                                  tagScopePackages = true;
1018                                  tagScopeTypes = true;
1019                                  tagScopeConstructors = true;
1020                                  tagScopeMethods = true;
1021                                  tagScopeFields = true;
1022                                  break;
1023                               case 'o':
1024                                  tagScopeOverview = true;
1025                                  break;
1026                               case 'p':
1027                                  tagScopePackages = true;
1028                                  break;
1029                               case 't':
1030                                  tagScopeTypes = true;
1031                                  break;
1032                               case 'c':
1033                                  tagScopeConstructors = true;
1034                                  break;
1035                               case 'm':
1036                                  tagScopeMethods = true;
1037                                  break;
1038                               case 'f':
1039                                  tagScopeFields = true;
1040                                  break;
1041                               default:
1042                                  validTagSpec = false;
1043                                  break tag_option_loop;
1044                               }
1045                            }
1046                            
1047                            if (validTagSpec) {
1048                               GenericTaglet taglet
1049                                  = new GenericTaglet(tagName,
1050                                                      tagHead,
1051                                                      tagScopeOverview,
1052                                                      tagScopePackages,
1053                                                      tagScopeTypes,
1054                                                      tagScopeConstructors,
1055                                                      tagScopeMethods,
1056                                                      tagScopeFields);
1057                               taglet.setTagletEnabled(!tagDisabled);
1058                               taglet.register(tagletMap);
1059                            }
1060                         }
1061                      }
1062                      if (!validTagSpec) {
1063                         printError("Value for option -tag must be in format \"<tagname>:Xaoptcmf:<taghead>\".");
1064                      }
1065                   }
1066              }              }
1067    
1068              // Use current directory if target directory hasn't been set.              // Use current directory if target directory hasn't been set.
# Line 1456  public class Driver { Line 1542  public class Driver {
1542        else if ("-windowtitle".equals(option)) return 2;        else if ("-windowtitle".equals(option)) return 2;
1543        else if ("-helpfile".equals(option)) return 2;        else if ("-helpfile".equals(option)) return 2;
1544        else if ("-stylesheet".equals(option)) return 2;        else if ("-stylesheet".equals(option)) return 2;
1545          else if ("-tag".equals(option)) return 2;
1546    
1547        else return -1;        else return -1;
1548     }     }

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26