Changes for page EOModelDoc
Last modified by Theodore Petrosky on 2012/02/11 13:36
From version 25.1
edited by Chuck Hill
on 2008/07/31 16:33
on 2008/07/31 16:33
Change comment:
There is no comment for this version
To version 26.1
edited by Chuck Hill
on 2008/08/01 14:38
on 2008/08/01 14:38
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,3 +1,13 @@ 1 +== Contents == 2 + 3 +[[||anchor="Overview"]] 4 +[[||anchor="Future Plans"]] 5 +[[||anchor="Download and Example Output"]] 6 +[[||anchor="Usage"]] 7 +[[||anchor="Running from Ant"]] 8 +[[||anchor="Template Files"]] 9 +[[||anchor="Alternate Templates"]] 10 + 1 1 == Overview == 2 2 3 3 EOModelDoc is a command line tool to generate HTML documentation of a set of EOModels. It is a replacement for [[EOReporter>>http://www.rubicode.com/Software/EOReporter/]] (which will not work on Leopard and newer releases of OS X). EOModelDoc was funded by the Apple iTunes Store and released to the community. ... ... @@ -19,26 +19,108 @@ 19 19 20 20 The command line syntax of for EOModelDoc: 21 21 22 -##eomodeldoc --output /path/to/output/folder - -model /path/to/model.eomodeld]** -modelgroup /path/to/working/dir] -templates /path/to/templates] -entityURLTemplate "http:~/~/whatever?$entity.classNamePath}.html**##32 +##java --jar eomodeldoc.jar --output /path/to/output/folder -model /path/to/model.eomodeld]** -modelgroup /path/to/working/dir] -templates /path/to/templates] -entityURLTemplate "http:~/~/domain/path/to/JavaDocs/$entity.classNamePath.html**## 23 23 24 -Still working on all the model loaders, but you should be able to do 34 +|=Parameter|=Usage / Function 35 +|output|Path to the directory where the output HTML files will be written. 36 +|model|Path to one model to generate documentation for. This parameter can be used multiple times, once for each model. 37 +|modelgroup|The path to an Eclipse or IDEA project. All models listed in the project will be documented. This defaults to the current working directory. 38 +|templates|Path to the directory where the Velocity templates are stored. See the [[||anchor="Template Files"]] section below for details on these templates. If this is not specified, the default templates inside the eomodeldoc.jar file will be used. 39 +|entityURLTemplate|URL to the JavaDocs for the classes in the model. This is used to create links from the EOModel documentation to the JavaDoc documentation. The dots in the classpath are replaced with "/" when the path is generated. 40 + 41 +=== Notes === 42 + 43 +* Only ##-output## is required 44 +* Usually only one of ##-modelGroup## or ##-model## is used (i.e. not both at the same time) 45 +* The ##-templates## path only needs to point the the templates that you have changed. If any templates are not found on that path, the defaults from the jar are used. 46 +* For ##-entityURLTemplate## the ##http:~/~/domain/path/to/JavaDocs/## the path to the index.html file that JavaDoc generates. It will be something like ##http:~/~/developer.apple.com/documentation/MacOSXServer/Reference/WO54_Reference/##. If the EOModelDocs and JavaDocs are on the same server, you can use absolute or relative paths instead of a full URL:##http:~/~/developer.apple.com/documentation/MacOSXServer/Reference/WO54_Reference/## 47 + 48 +=== Usage Examples === 49 + 50 +Document one model: 51 + 52 +{{code}} 53 + 54 +java -jar /path/to/eomodeldoc.jar -model /path/to/model.eomodeld -output /tmp/eomodeldoc 55 + 56 +{{/code}} 57 + 25 25 26 -java --jar eomodeldoc.jar --model /path/to/model.eomodeld --output /tmp/ 27 -eomodeldoc 28 -(will load all the models in the modelgroup based on your eclipse or 29 -IDEA project files ..... allegedly ... still working the kinks out on 30 -this) 31 -or 32 - 33 -java --jar eomodeldoc.jar --modelgroup /path/to/project --output /tmp/ 34 -eomodeldoc 35 -(i haven't tried that one yet) 36 - 37 -or 38 - 39 -java --jar eomodeldoc.jar --output /tmp/eomodeldoc 40 -from inside your project 59 +Document all models based on the Eclipse or IDEA project definition: 41 41 61 +{{code}} 62 + 63 +java -jar /path/to/eomodeldoc.jar -modelgroup /path/to/project -output /tmp/eomodeldoc 64 + 65 +{{/code}} 66 + 67 +Document all models based on the Eclipse/IDEA project definition (when current working directory is the top level of the project): 68 + 69 +{{code}} 70 + 71 +java -jar /path/to/eomodeldoc.jar -output /tmp/eomodeldoc 72 + 73 +{{/code}} 74 + 75 +== Running from Ant == 76 + 77 +**Note**: do not put this jar on your classpath! Chaos and Other Bad Things may ensue. 78 + 79 +There is no Ant task (yet) for EOModelDoc. You can run it with an ##java## task following this pattern: 80 + 81 +{{code value="xml"}} 82 + 83 +<java jar="/path/to/eomodeldoc.jar" 84 + fork="true" 85 + maxmemory="256m"> 86 + <arg value="-output" /> 87 + <arg value="/path/to/output/folder" /> 88 + <arg value="-modelgroup" /> 89 + <arg value="/path/to/working/dir" /> 90 + <arg value="-templates" /> 91 + <arg value="/path/to/templates" /> 92 + <arg value="-entityURLTemplate" /> 93 + <arg value="http://whatever?$${entity.classNamePath}.html" /> 94 +</java> 95 + 96 +{{/code}} 97 + 98 +{{code value="xml"}} 99 + 100 +<java jar="/path/to/eomodeldoc.jar" 101 + fork="true" 102 + maxmemory="256m"> 103 + <arg value="-output" /> 104 + <arg value="/path/to/output/folder" /> 105 + <arg value="-model" /> 106 + <arg value="/path/to/modelA.eomodeld" /> 107 + <arg value="-model" /> 108 + <arg value="/path/to/modelB.eomodeld" /> 109 + <arg value="-model" /> 110 + <arg value="/path/to/modelC.eomodeld" /> 111 + <arg value="-templates" /> 112 + <arg value="/path/to/templates" /> 113 + <arg value="-entityURLTemplate" /> 114 + <arg value="http://whatever?$${entity.classNamePath}.html" /> 115 +</java> 116 + 117 +{{/code}} 118 + 119 +If you include this in the build.xml file in the project, it can be as simple as: 120 + 121 +{{code value="xml"}} 122 + 123 +<java jar="/path/to/eomodeldoc.jar" 124 + fork="true" 125 + maxmemory="256m"> 126 + <arg value="-output" /> 127 + <arg value="Documentation" /> 128 + <arg value="-modelgroup" /> 129 + <arg value="." /> 130 +</java> 131 + 132 +{{/code}} 133 + 42 42 == Template Files == 43 43 44 44 Default templates are included in the eomodeldoc.jar file. You can extract these templates to use as a basis for your own templates with this command: ... ... @@ -49,17 +49,55 @@ 49 49 50 50 {{/code}} 51 51 144 +See the [[EOGenerator template documentation>>EOGenerator Templates and Additions]] documentation for information on customizing these templates. The ##-templates## path only needs to point the the templates that you have changed. If any templates are not found on that path, the defaults from the jar are used. 145 + 52 52 The templates and their function are: 53 53 54 54 |=Template Name|=Usage / Function 55 -|entityContent.html.vm| 56 -|eomodeldoc.css.vm| 57 -|eomodeldoc.js.vm| 58 -|index.html.vm| 59 -|indexContent.html.vm| 60 -|indexModels.html.vm| 61 -|indexOverview.html.vm| 62 -|modelContent.html.vm| | 63 -|modelOverview.html.vm| 64 -|prototype.js.vm| 65 -|storedProcedureContent.html.vm| 149 +|indexModels.html.vm|Left pane index of all models. 150 +|indexOverview.html.vm|Left pane index of the contents of all models (e.g. list of entities and stored procedures). 151 +|modelOverview.html.vm|Left pane index of the contents of one model (e.g. list of entities and stored procedures). 152 +|indexContent.html.vm|Main frame description of each model and contents of each model (e.g. list of entities and stored procedures). 153 +|modelContent.html.vm|Main frame contents of one model (list of entities and stored procedures).| 154 +|entityContent.html.vm|Main frame contents for one Entity 155 +|storedProcedureContent.html.vm|Main frame contents for one stored procedure. 156 +|index.html.vm|Top level index.html file defining frameset. You probably won't need to modify this. 157 +|prototype.js.vm|[[Prototype>>http://www.prototypejs.org/learn]] JavaScript file so that the generated documentation can use Ajax whizziness. You probably won't need to modify this. 158 +|eomodeldoc.css.vm|CSS file that controls what the generate output looks like. 159 +|eomodeldoc.js.vm|JavaScript file that cleans up the display. You probably won't need to modify this. 160 + 161 +Some pictures will illustrate this: 162 + 163 +---- 164 + 165 +[[image:EOModelDocTemplates1.png||width="800"]] 166 + 167 +---- 168 + 169 +[[image:EOModelDocTemplates2.png||width="800"]] 170 + 171 +---- 172 + 173 +[[image:EOModelDocTemplates3.png||width="800"]] 174 + 175 + 176 +---- 177 + 178 +== Alternate Templates == 179 + 180 +Have some interesting templates to share? Add them as attachements and link them here. 181 + 182 +=== Template Mark I from Chuck === 183 + 184 +[[Download>>^ChuckHillTemplates.tgz]] 185 + 186 +This is the default template with some useful (to me) changes: 187 + 188 +* individual properties can be toggled open and closed 189 +* non-class hidden by default 190 +* less blank vertical space 191 +* column name moved into details 192 + 193 +---- 194 + 195 +[[image:ChuckHillTemplate.png]]