taskjuggler 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (544) hide show
  1. data/CHANGELOG +2086 -0
  2. data/benchmarks/666tasks.tjp +3183 -0
  3. data/benchmarks/booking.tjp +14 -10
  4. data/doc/AppConfig.html +95 -73
  5. data/doc/Arguments.html +22 -2
  6. data/doc/CHANGELOG.html +2587 -0
  7. data/doc/COPYING.html +21 -1
  8. data/doc/Object.html +161 -122
  9. data/doc/README.html +21 -1
  10. data/doc/RuntimeConfig.html +26 -6
  11. data/doc/String.html +38 -18
  12. data/doc/StringIO.html +579 -0
  13. data/doc/TaskJuggler.html +251 -143
  14. data/doc/TaskJuggler/Account.html +26 -6
  15. data/doc/TaskJuggler/AccountAttribute.html +28 -8
  16. data/doc/TaskJuggler/AccountScenario.html +24 -4
  17. data/doc/TaskJuggler/Allocation.html +30 -10
  18. data/doc/TaskJuggler/AllocationAttribute.html +28 -8
  19. data/doc/TaskJuggler/AttributeBase.html +46 -26
  20. data/doc/TaskJuggler/AttributeDefinition.html +22 -2
  21. data/doc/TaskJuggler/BatchProcessor.html +40 -20
  22. data/doc/TaskJuggler/Booking.html +26 -6
  23. data/doc/TaskJuggler/BookingListAttribute.html +28 -8
  24. data/doc/TaskJuggler/BooleanAttribute.html +28 -8
  25. data/doc/TaskJuggler/CSVFile.html +308 -146
  26. data/doc/TaskJuggler/CellSettingPattern.html +22 -2
  27. data/doc/TaskJuggler/CellSettingPatternList.html +26 -6
  28. data/doc/TaskJuggler/Charge.html +26 -6
  29. data/doc/TaskJuggler/ChargeListAttribute.html +26 -6
  30. data/doc/TaskJuggler/ChargeSet.html +33 -13
  31. data/doc/TaskJuggler/ChargeSetListAttribute.html +28 -8
  32. data/doc/TaskJuggler/ColumnListAttribute.html +26 -6
  33. data/doc/TaskJuggler/ColumnTable.html +24 -4
  34. data/doc/TaskJuggler/Daemon.html +26 -6
  35. data/doc/TaskJuggler/DateAttribute.html +26 -6
  36. data/doc/TaskJuggler/DefinitionListAttribute.html +22 -2
  37. data/doc/TaskJuggler/DependencyListAttribute.html +28 -8
  38. data/doc/TaskJuggler/DurationAttribute.html +28 -8
  39. data/doc/TaskJuggler/FixnumAttribute.html +24 -4
  40. data/doc/TaskJuggler/FlagListAttribute.html +28 -8
  41. data/doc/TaskJuggler/FloatAttribute.html +26 -6
  42. data/doc/TaskJuggler/FormatListAttribute.html +24 -4
  43. data/doc/TaskJuggler/GanttChart.html +147 -126
  44. data/doc/TaskJuggler/GanttContainer.html +34 -14
  45. data/doc/TaskJuggler/GanttHeader.html +28 -8
  46. data/doc/TaskJuggler/GanttHeaderScaleItem.html +24 -4
  47. data/doc/TaskJuggler/GanttLine.html +38 -18
  48. data/doc/TaskJuggler/GanttLoadStack.html +26 -6
  49. data/doc/TaskJuggler/GanttMilestone.html +34 -14
  50. data/doc/TaskJuggler/GanttRouter.html +50 -30
  51. data/doc/TaskJuggler/GanttTaskBar.html +34 -14
  52. data/doc/TaskJuggler/HTMLDocument.html +26 -6
  53. data/doc/TaskJuggler/HTMLGraphics.html +30 -10
  54. data/doc/TaskJuggler/Interval.html +40 -22
  55. data/doc/TaskJuggler/IntervalListAttribute.html +28 -8
  56. data/doc/TaskJuggler/JobInfo.html +24 -4
  57. data/doc/TaskJuggler/Journal.html +226 -147
  58. data/doc/TaskJuggler/JournalEntry.html +22 -2
  59. data/doc/TaskJuggler/JournalEntryList.html +129 -112
  60. data/doc/TaskJuggler/KeywordArray.html +26 -6
  61. data/doc/TaskJuggler/KeywordDocumentation.html +46 -26
  62. data/doc/TaskJuggler/Limits.html +152 -123
  63. data/doc/TaskJuggler/Limits/Limit.html +149 -70
  64. data/doc/TaskJuggler/LimitsAttribute.html +36 -51
  65. data/doc/TaskJuggler/ListAttributeBase.html +24 -4
  66. data/doc/TaskJuggler/Log.html +50 -32
  67. data/doc/TaskJuggler/LogFile.html +37 -17
  68. data/doc/TaskJuggler/LogicalAttribute.html +53 -33
  69. data/doc/TaskJuggler/LogicalExpression.html +26 -6
  70. data/doc/TaskJuggler/LogicalExpressionAttribute.html +32 -12
  71. data/doc/TaskJuggler/LogicalFlag.html +42 -22
  72. data/doc/TaskJuggler/LogicalFunction.html +204 -140
  73. data/doc/TaskJuggler/LogicalOperation.html +135 -111
  74. data/doc/TaskJuggler/Macro.html +22 -2
  75. data/doc/TaskJuggler/MacroParser.html +32 -12
  76. data/doc/TaskJuggler/MacroTable.html +32 -12
  77. data/doc/TaskJuggler/ManagerResponsibilities.html +24 -4
  78. data/doc/TaskJuggler/ManagerStatusRecord.html +24 -4
  79. data/doc/TaskJuggler/Message.html +24 -4
  80. data/doc/TaskJuggler/MessageHandler.html +24 -4
  81. data/doc/TaskJuggler/Navigator.html +104 -71
  82. data/doc/TaskJuggler/NavigatorElement.html +32 -12
  83. data/doc/TaskJuggler/NikuProject.html +22 -2
  84. data/doc/TaskJuggler/NikuReport.html +310 -228
  85. data/doc/TaskJuggler/NikuResource.html +22 -2
  86. data/doc/TaskJuggler/NodeListAttribute.html +615 -0
  87. data/doc/TaskJuggler/OnShiftCache.html +32 -12
  88. data/doc/TaskJuggler/ProcessIntercom.html +205 -78
  89. data/doc/TaskJuggler/ProcessIntercomIface.html +26 -6
  90. data/doc/TaskJuggler/Project.html +708 -660
  91. data/doc/TaskJuggler/ProjectBroker.html +506 -304
  92. data/doc/TaskJuggler/ProjectBrokerIface.html +61 -41
  93. data/doc/TaskJuggler/ProjectFileParser.html +429 -373
  94. data/doc/TaskJuggler/ProjectFileScanner.html +1790 -0
  95. data/doc/TaskJuggler/ProjectRecord.html +80 -60
  96. data/doc/TaskJuggler/ProjectServer.html +312 -237
  97. data/doc/TaskJuggler/ProjectServerIface.html +101 -43
  98. data/doc/TaskJuggler/PropertyAttribute.html +32 -12
  99. data/doc/TaskJuggler/PropertyList.html +166 -145
  100. data/doc/TaskJuggler/PropertySet.html +254 -224
  101. data/doc/TaskJuggler/PropertyTreeNode.html +670 -536
  102. data/doc/TaskJuggler/Query.html +169 -148
  103. data/doc/TaskJuggler/RTFHandlers.html +622 -0
  104. data/doc/TaskJuggler/RTFNavigator.html +28 -8
  105. data/doc/TaskJuggler/RTFQuery.html +40 -20
  106. data/doc/TaskJuggler/RTFReport.html +62 -25
  107. data/doc/TaskJuggler/RTFReportLink.html +765 -0
  108. data/doc/TaskJuggler/RealFormat.html +26 -6
  109. data/doc/TaskJuggler/RealFormatAttribute.html +26 -6
  110. data/doc/TaskJuggler/ReferenceAttribute.html +59 -39
  111. data/doc/TaskJuggler/Report.html +402 -251
  112. data/doc/TaskJuggler/ReportBase.html +162 -137
  113. data/doc/TaskJuggler/ReportContext.html +112 -29
  114. data/doc/TaskJuggler/ReportServer.html +89 -64
  115. data/doc/TaskJuggler/ReportServerIface.html +75 -55
  116. data/doc/TaskJuggler/ReportServerRecord.html +54 -31
  117. data/doc/TaskJuggler/ReportServlet.html +980 -0
  118. data/doc/TaskJuggler/ReportTable.html +41 -21
  119. data/doc/TaskJuggler/ReportTableCell.html +214 -170
  120. data/doc/TaskJuggler/ReportTableColumn.html +30 -10
  121. data/doc/TaskJuggler/ReportTableLegend.html +36 -16
  122. data/doc/TaskJuggler/ReportTableLine.html +32 -12
  123. data/doc/TaskJuggler/Resource.html +99 -87
  124. data/doc/TaskJuggler/ResourceListAttribute.html +59 -39
  125. data/doc/TaskJuggler/ResourceListRE.html +47 -26
  126. data/doc/TaskJuggler/ResourceScenario.html +403 -437
  127. data/doc/TaskJuggler/RichText.html +26 -6
  128. data/doc/TaskJuggler/RichTextAttribute.html +50 -30
  129. data/doc/TaskJuggler/RichTextDocument.html +37 -17
  130. data/doc/TaskJuggler/RichTextElement.html +475 -413
  131. data/doc/TaskJuggler/RichTextException.html +22 -2
  132. data/doc/TaskJuggler/RichTextFunctionExample.html +28 -8
  133. data/doc/TaskJuggler/RichTextFunctionHandler.html +24 -4
  134. data/doc/TaskJuggler/RichTextImage.html +22 -2
  135. data/doc/TaskJuggler/RichTextIntermediate.html +38 -18
  136. data/doc/TaskJuggler/RichTextParser.html +56 -34
  137. data/doc/TaskJuggler/RichTextScanner.html +82 -61
  138. data/doc/TaskJuggler/RichTextSnip.html +34 -14
  139. data/doc/TaskJuggler/RichTextSyntaxRules.html +507 -353
  140. data/doc/TaskJuggler/Scenario.html +22 -2
  141. data/doc/TaskJuggler/ScenarioData.html +30 -46
  142. data/doc/TaskJuggler/ScenarioListAttribute.html +38 -18
  143. data/doc/TaskJuggler/Scoreboard.html +42 -22
  144. data/doc/TaskJuggler/SheetHandlerBase.html +40 -20
  145. data/doc/TaskJuggler/SheetReceiver.html +333 -295
  146. data/doc/TaskJuggler/SheetSender.html +253 -230
  147. data/doc/TaskJuggler/Shift.html +26 -6
  148. data/doc/TaskJuggler/ShiftAssignment.html +89 -73
  149. data/doc/TaskJuggler/ShiftAssignments.html +226 -234
  150. data/doc/TaskJuggler/ShiftAssignmentsAttribute.html +39 -54
  151. data/doc/TaskJuggler/ShiftScenario.html +28 -8
  152. data/doc/TaskJuggler/SortListAttribute.html +34 -14
  153. data/doc/TaskJuggler/SourceFileInfo.html +24 -4
  154. data/doc/TaskJuggler/StatusSheetReceiver.html +24 -3
  155. data/doc/TaskJuggler/StatusSheetReport.html +168 -153
  156. data/doc/TaskJuggler/StatusSheetSender.html +24 -3
  157. data/doc/TaskJuggler/StringAttribute.html +38 -18
  158. data/doc/TaskJuggler/SymbolAttribute.html +32 -12
  159. data/doc/TaskJuggler/SyntaxReference.html +40 -20
  160. data/doc/TaskJuggler/TOCEntry.html +26 -6
  161. data/doc/TaskJuggler/TSResourceRecord.html +22 -2
  162. data/doc/TaskJuggler/TSTaskRecord.html +22 -2
  163. data/doc/TaskJuggler/TableColumnDefinition.html +59 -22
  164. data/doc/TaskJuggler/TableOfContents.html +26 -6
  165. data/doc/TaskJuggler/TableReport.html +937 -904
  166. data/doc/TaskJuggler/Task.html +55 -36
  167. data/doc/TaskJuggler/TaskDependency.html +24 -4
  168. data/doc/TaskJuggler/TaskListAttribute.html +50 -30
  169. data/doc/TaskJuggler/TaskListRE.html +27 -7
  170. data/doc/TaskJuggler/TaskScenario.html +1273 -1153
  171. data/doc/TaskJuggler/TextFormatter.html +28 -8
  172. data/doc/TaskJuggler/TextParser.html +585 -338
  173. data/doc/TaskJuggler/TextParser/Pattern.html +54 -34
  174. data/doc/TaskJuggler/TextParser/Rule.html +95 -73
  175. data/doc/TaskJuggler/TextParser/StackElement.html +39 -17
  176. data/doc/TaskJuggler/TextParser/TextParserResultArray.html +24 -4
  177. data/doc/TaskJuggler/TextParser/TokenDoc.html +22 -2
  178. data/doc/TaskJuggler/TextReport.html +28 -8
  179. data/doc/TaskJuggler/TextScanner.html +400 -1404
  180. data/doc/TaskJuggler/TextScanner/BufferStreamHandle.html +28 -240
  181. data/doc/TaskJuggler/TextScanner/FileStreamHandle.html +37 -184
  182. data/doc/TaskJuggler/TextScanner/MacroStackEntry.html +682 -0
  183. data/doc/TaskJuggler/TextScanner/StreamHandle.html +342 -67
  184. data/doc/TaskJuggler/TimeSheet.html +48 -28
  185. data/doc/TaskJuggler/TimeSheetReceiver.html +24 -3
  186. data/doc/TaskJuggler/TimeSheetRecord.html +47 -27
  187. data/doc/TaskJuggler/TimeSheetReport.html +154 -133
  188. data/doc/TaskJuggler/TimeSheetSender.html +24 -3
  189. data/doc/TaskJuggler/TimeSheetSummary.html +137 -91
  190. data/doc/TaskJuggler/TimeSheets.html +26 -6
  191. data/doc/TaskJuggler/Tj3AppBase.html +85 -58
  192. data/doc/TaskJuggler/Tj3Client.html +292 -238
  193. data/doc/TaskJuggler/Tj3Daemon.html +159 -74
  194. data/doc/TaskJuggler/Tj3SheetAppBase.html +26 -6
  195. data/doc/TaskJuggler/Tj3SsReceiver.html +26 -6
  196. data/doc/TaskJuggler/Tj3SsSender.html +53 -26
  197. data/doc/TaskJuggler/Tj3TsReceiver.html +28 -7
  198. data/doc/TaskJuggler/Tj3TsSender.html +26 -6
  199. data/doc/TaskJuggler/Tj3TsSummary.html +26 -6
  200. data/doc/TaskJuggler/TjException.html +22 -2
  201. data/doc/TaskJuggler/TjTime.html +216 -160
  202. data/doc/TaskJuggler/TjpExample.html +34 -14
  203. data/doc/TaskJuggler/TjpExportRE.html +403 -407
  204. data/doc/TaskJuggler/TjpSyntaxRules.html +4805 -4408
  205. data/doc/TaskJuggler/URLParameter.html +649 -0
  206. data/doc/TaskJuggler/UserManual.html +42 -22
  207. data/doc/TaskJuggler/WebServer.html +702 -0
  208. data/doc/TaskJuggler/WorkingHours.html +38 -18
  209. data/doc/TaskJuggler/WorkingHoursAttribute.html +61 -41
  210. data/doc/TaskJuggler/XMLBlob.html +24 -4
  211. data/doc/TaskJuggler/XMLComment.html +24 -4
  212. data/doc/TaskJuggler/XMLDocument.html +30 -10
  213. data/doc/TaskJuggler/XMLElement.html +34 -14
  214. data/doc/TaskJuggler/XMLNamedText.html +22 -2
  215. data/doc/TaskJuggler/XMLText.html +24 -4
  216. data/doc/index.html +1841 -1666
  217. data/doc/lib/AccountScenario_rb.html +1 -1
  218. data/doc/lib/Account_rb.html +1 -1
  219. data/doc/lib/Allocation_rb.html +1 -1
  220. data/doc/lib/AppConfig_rb.html +2 -2
  221. data/doc/lib/AttributeBase_rb.html +1 -1
  222. data/doc/lib/AttributeDefinition_rb.html +1 -1
  223. data/doc/lib/Attributes_rb.html +2 -2
  224. data/doc/lib/BatchProcessor_rb.html +1 -1
  225. data/doc/lib/Booking_rb.html +1 -1
  226. data/doc/lib/ChargeSet_rb.html +1 -1
  227. data/doc/lib/Charge_rb.html +1 -1
  228. data/doc/lib/HTMLDocument_rb.html +1 -1
  229. data/doc/lib/Interval_rb.html +1 -1
  230. data/doc/lib/Journal_rb.html +2 -2
  231. data/doc/lib/KeywordArray_rb.html +1 -1
  232. data/doc/lib/KeywordDocumentation_rb.html +1 -1
  233. data/doc/lib/Limits_rb.html +2 -2
  234. data/doc/lib/LogFile_rb.html +2 -2
  235. data/doc/lib/Log_rb.html +1 -1
  236. data/doc/lib/LogicalExpression_rb.html +1 -1
  237. data/doc/lib/LogicalFunction_rb.html +2 -2
  238. data/doc/lib/LogicalOperation_rb.html +2 -2
  239. data/doc/lib/MacroParser_rb.html +1 -1
  240. data/doc/lib/MacroTable_rb.html +1 -1
  241. data/doc/lib/MessageHandler_rb.html +1 -1
  242. data/doc/lib/Message_rb.html +1 -1
  243. data/doc/lib/ProjectFileParser_rb.html +4 -8
  244. data/doc/lib/ProjectFileScanner_rb.html +67 -0
  245. data/doc/lib/Project_rb.html +2 -2
  246. data/doc/lib/PropertyList_rb.html +2 -2
  247. data/doc/lib/PropertySet_rb.html +2 -2
  248. data/doc/lib/PropertyTreeNode_rb.html +2 -2
  249. data/doc/lib/Query_rb.html +2 -2
  250. data/doc/lib/RTFHandlers_rb.html +73 -0
  251. data/doc/lib/RTFNavigator_rb.html +1 -1
  252. data/doc/lib/RTFQuery_rb.html +1 -1
  253. data/doc/lib/RTFReportLink_rb.html +71 -0
  254. data/doc/lib/RTFReport_rb.html +2 -2
  255. data/doc/lib/RealFormat_rb.html +1 -1
  256. data/doc/lib/ResourceScenario_rb.html +2 -2
  257. data/doc/lib/Resource_rb.html +2 -2
  258. data/doc/lib/RichTextDocument_rb.html +1 -1
  259. data/doc/lib/RichTextElement_rb.html +2 -2
  260. data/doc/lib/RichTextFunctionExample_rb.html +1 -1
  261. data/doc/lib/RichTextFunctionHandler_rb.html +1 -1
  262. data/doc/lib/RichTextParser_rb.html +2 -2
  263. data/doc/lib/RichTextScanner_rb.html +2 -2
  264. data/doc/lib/RichTextSnip_rb.html +1 -1
  265. data/doc/lib/RichTextSyntaxRules_rb.html +2 -2
  266. data/doc/lib/RichText_rb.html +1 -1
  267. data/doc/lib/RuntimeConfig_rb.html +1 -1
  268. data/doc/lib/ScenarioData_rb.html +2 -2
  269. data/doc/lib/Scenario_rb.html +1 -1
  270. data/doc/lib/Scoreboard_rb.html +1 -1
  271. data/doc/lib/SheetHandlerBase_rb.html +1 -1
  272. data/doc/lib/SheetReceiver_rb.html +2 -2
  273. data/doc/lib/SheetSender_rb.html +4 -2
  274. data/doc/lib/ShiftAssignments_rb.html +4 -2
  275. data/doc/lib/ShiftScenario_rb.html +1 -1
  276. data/doc/lib/Shift_rb.html +1 -1
  277. data/doc/lib/SourceFileInfo_rb.html +1 -1
  278. data/doc/lib/StatusSheetReceiver_rb.html +2 -2
  279. data/doc/lib/StatusSheetSender_rb.html +2 -2
  280. data/doc/lib/SyntaxReference_rb.html +1 -1
  281. data/doc/lib/TOCEntry_rb.html +1 -1
  282. data/doc/lib/TableColumnDefinition_rb.html +2 -2
  283. data/doc/lib/TableOfContents_rb.html +1 -1
  284. data/doc/lib/TaskDependency_rb.html +1 -1
  285. data/doc/lib/TaskJuggler_rb.html +2 -2
  286. data/doc/lib/TaskScenario_rb.html +2 -2
  287. data/doc/lib/Task_rb.html +2 -2
  288. data/doc/lib/TextFormatter_rb.html +1 -1
  289. data/doc/lib/TextParser/Pattern_rb.html +1 -1
  290. data/doc/lib/TextParser/Rule_rb.html +2 -2
  291. data/doc/lib/TextParser/StackElement_rb.html +2 -2
  292. data/doc/lib/TextParser/TokenDoc_rb.html +1 -1
  293. data/doc/lib/TextParser_rb.html +2 -2
  294. data/doc/lib/TextScanner_rb.html +6 -2
  295. data/doc/lib/TimeSheetReceiver_rb.html +2 -2
  296. data/doc/lib/TimeSheetSender_rb.html +2 -2
  297. data/doc/lib/TimeSheetSummary_rb.html +2 -2
  298. data/doc/lib/TimeSheets_rb.html +2 -2
  299. data/doc/lib/Tj3AppBase_rb.html +2 -2
  300. data/doc/lib/Tj3Config_rb.html +2 -2
  301. data/doc/lib/Tj3SheetAppBase_rb.html +2 -2
  302. data/doc/lib/TjException_rb.html +1 -1
  303. data/doc/lib/TjTime_rb.html +2 -2
  304. data/doc/lib/TjpExample_rb.html +1 -1
  305. data/doc/lib/TjpSyntaxRules_rb.html +2 -2
  306. data/doc/lib/URLParameter_rb.html +67 -0
  307. data/doc/lib/UTF8String_rb.html +1 -1
  308. data/doc/lib/UserManual_rb.html +1 -1
  309. data/doc/lib/WorkingHours_rb.html +1 -1
  310. data/doc/lib/XMLDocument_rb.html +2 -2
  311. data/doc/lib/XMLElement_rb.html +1 -1
  312. data/doc/lib/daemon/Daemon_rb.html +1 -1
  313. data/doc/lib/daemon/ProcessIntercom_rb.html +2 -2
  314. data/doc/lib/daemon/ProjectBroker_rb.html +4 -2
  315. data/doc/lib/daemon/ProjectServer_rb.html +2 -2
  316. data/doc/lib/daemon/ReportServer_rb.html +2 -2
  317. data/doc/lib/daemon/WebServer_rb.html +75 -0
  318. data/doc/lib/deep_copy_rb.html +2 -2
  319. data/doc/lib/reports/CSVFile_rb.html +2 -2
  320. data/doc/lib/reports/ColumnTable_rb.html +1 -1
  321. data/doc/lib/reports/GanttChart_rb.html +2 -2
  322. data/doc/lib/reports/GanttContainer_rb.html +1 -1
  323. data/doc/lib/reports/GanttHeaderScaleItem_rb.html +1 -1
  324. data/doc/lib/reports/GanttHeader_rb.html +1 -1
  325. data/doc/lib/reports/GanttLine_rb.html +1 -1
  326. data/doc/lib/reports/GanttLoadStack_rb.html +1 -1
  327. data/doc/lib/reports/GanttMilestone_rb.html +1 -1
  328. data/doc/lib/reports/GanttRouter_rb.html +1 -1
  329. data/doc/lib/reports/GanttTaskBar_rb.html +1 -1
  330. data/doc/lib/reports/HTMLGraphics_rb.html +1 -1
  331. data/doc/lib/reports/Navigator_rb.html +2 -2
  332. data/doc/lib/reports/NikuReport_rb.html +2 -2
  333. data/doc/lib/reports/ReportBase_rb.html +2 -2
  334. data/doc/lib/reports/ReportContext_rb.html +2 -2
  335. data/doc/lib/reports/ReportTableCell_rb.html +2 -2
  336. data/doc/lib/reports/ReportTableColumn_rb.html +1 -1
  337. data/doc/lib/reports/ReportTableLegend_rb.html +1 -1
  338. data/doc/lib/reports/ReportTableLine_rb.html +1 -1
  339. data/doc/lib/reports/ReportTable_rb.html +2 -2
  340. data/doc/lib/reports/Report_rb.html +2 -2
  341. data/doc/lib/reports/ResourceListRE_rb.html +2 -2
  342. data/doc/lib/reports/StatusSheetReport_rb.html +2 -2
  343. data/doc/lib/reports/TableReport_rb.html +2 -2
  344. data/doc/lib/reports/TaskListRE_rb.html +2 -2
  345. data/doc/lib/reports/TextReport_rb.html +1 -1
  346. data/doc/lib/reports/TimeSheetReport_rb.html +2 -2
  347. data/doc/lib/reports/TjpExportRE_rb.html +2 -2
  348. data/doc/lib/ruby-signal-bug_rb.html +1 -1
  349. data/doc/lib/taskjuggler3_rb.html +2 -2
  350. data/doc/lib/tj3client_rb.html +2 -2
  351. data/doc/lib/tj3d_rb.html +2 -2
  352. data/doc/lib/tj3man_rb.html +1 -1
  353. data/doc/lib/tj3ss_receiver_rb.html +1 -1
  354. data/doc/lib/tj3ss_sender_rb.html +2 -2
  355. data/doc/lib/tj3ts_receiver_rb.html +2 -2
  356. data/doc/lib/tj3ts_sender_rb.html +1 -1
  357. data/doc/lib/tj3ts_summary_rb.html +1 -1
  358. data/doc/rdoc.css +9 -4
  359. data/examples/tutorial.tjp +17 -15
  360. data/gem_spec.rb +3 -0
  361. data/lib/AppConfig.rb +3 -1
  362. data/lib/Attributes.rb +10 -8
  363. data/lib/Journal.rb +55 -20
  364. data/lib/Limits.rb +72 -46
  365. data/lib/LogFile.rb +3 -3
  366. data/lib/LogicalFunction.rb +19 -6
  367. data/lib/LogicalOperation.rb +5 -1
  368. data/lib/Project.rb +37 -9
  369. data/lib/ProjectFileParser.rb +25 -22
  370. data/lib/ProjectFileScanner.rb +365 -0
  371. data/lib/PropertyList.rb +2 -1
  372. data/lib/PropertySet.rb +14 -4
  373. data/lib/PropertyTreeNode.rb +42 -29
  374. data/lib/Query.rb +3 -1
  375. data/lib/RTFHandlers.rb +35 -0
  376. data/lib/RTFReport.rb +23 -6
  377. data/lib/RTFReportLink.rb +72 -0
  378. data/lib/Resource.rb +8 -16
  379. data/lib/ResourceScenario.rb +1 -22
  380. data/lib/RichTextElement.rb +42 -0
  381. data/lib/RichTextParser.rb +6 -4
  382. data/lib/RichTextScanner.rb +5 -5
  383. data/lib/RichTextSyntaxRules.rb +48 -10
  384. data/lib/ScenarioData.rb +5 -3
  385. data/lib/SheetReceiver.rb +24 -6
  386. data/lib/SheetSender.rb +17 -13
  387. data/lib/ShiftAssignments.rb +56 -52
  388. data/lib/StatusSheetReceiver.rb +1 -0
  389. data/lib/StatusSheetSender.rb +1 -0
  390. data/lib/TableColumnDefinition.rb +4 -2
  391. data/lib/Task.rb +8 -9
  392. data/lib/TaskJuggler.rb +21 -11
  393. data/lib/TaskScenario.rb +61 -26
  394. data/lib/TextParser.rb +268 -106
  395. data/lib/TextParser/Rule.rb +4 -2
  396. data/lib/TextParser/StackElement.rb +6 -4
  397. data/lib/TextScanner.rb +283 -700
  398. data/lib/TimeSheetReceiver.rb +1 -0
  399. data/lib/TimeSheetSender.rb +1 -0
  400. data/lib/TimeSheetSummary.rb +51 -26
  401. data/lib/TimeSheets.rb +1 -1
  402. data/lib/Tj3AppBase.rb +8 -1
  403. data/lib/Tj3Config.rb +1 -1
  404. data/lib/TjTime.rb +5 -0
  405. data/lib/TjpSyntaxRules.rb +360 -144
  406. data/lib/URLParameter.rb +30 -0
  407. data/lib/XMLDocument.rb +2 -2
  408. data/lib/daemon/ProcessIntercom.rb +50 -9
  409. data/lib/daemon/ProjectBroker.rb +63 -10
  410. data/lib/daemon/ProjectServer.rb +47 -16
  411. data/lib/daemon/ReportServer.rb +9 -4
  412. data/lib/daemon/WebServer.rb +204 -0
  413. data/lib/deep_copy.rb +4 -1
  414. data/lib/reports/CSVFile.rb +150 -66
  415. data/lib/reports/GanttChart.rb +2 -1
  416. data/lib/reports/Navigator.rb +18 -5
  417. data/lib/reports/NikuReport.rb +32 -2
  418. data/lib/reports/Report.rb +65 -37
  419. data/lib/reports/ReportBase.rb +14 -9
  420. data/lib/reports/ReportContext.rb +19 -4
  421. data/lib/reports/ReportTable.rb +2 -2
  422. data/lib/reports/ReportTableCell.rb +54 -30
  423. data/lib/reports/ResourceListRE.rb +4 -3
  424. data/lib/reports/StatusSheetReport.rb +8 -13
  425. data/lib/reports/TableReport.rb +47 -32
  426. data/lib/reports/TaskListRE.rb +3 -3
  427. data/lib/reports/TimeSheetReport.rb +14 -5
  428. data/lib/reports/TjpExportRE.rb +14 -19
  429. data/lib/taskjuggler3.rb +15 -0
  430. data/lib/tj3client.rb +9 -7
  431. data/lib/tj3d.rb +38 -10
  432. data/lib/tj3ss_sender.rb +7 -0
  433. data/lib/tj3ts_receiver.rb +1 -0
  434. data/manual/Day_To_Day_Juggling +1 -1
  435. data/manual/Rich_Text_Attributes +8 -0
  436. data/manual/TaskJuggler_2x_Migration +7 -0
  437. data/manual/The_TaskJuggler_Syntax +20 -6
  438. data/prj_cfg.rb +3 -2
  439. data/tasks/changelog.rake +36 -0
  440. data/tasks/csts.rake +2 -3
  441. data/tasks/gem.rake +10 -0
  442. data/tasks/missing.rake +0 -17
  443. data/test/TestSuite/ReportGenerator/Correct/Journal.html +63 -0
  444. data/test/TestSuite/ReportGenerator/Correct/Journal.tjp +14 -0
  445. data/test/TestSuite/{HTML-Reports/LogicalFunctions.tjp → ReportGenerator/Correct/LogicalFunctions1.tjp} +2 -2
  446. data/test/TestSuite/ReportGenerator/Correct/LogicalFunctions2.csv +3 -0
  447. data/test/TestSuite/ReportGenerator/Correct/LogicalFunctions2.tjp +19 -0
  448. data/test/TestSuite/ReportGenerator/Correct/css/tjmanual.css +66 -0
  449. data/test/TestSuite/ReportGenerator/Correct/css/tjreport.css +407 -0
  450. data/test/TestSuite/ReportGenerator/Correct/icons/details.png +0 -0
  451. data/test/TestSuite/ReportGenerator/Correct/icons/flag-green.png +0 -0
  452. data/test/TestSuite/ReportGenerator/Correct/icons/flag-red.png +0 -0
  453. data/test/TestSuite/ReportGenerator/Correct/icons/flag-yellow.png +0 -0
  454. data/test/TestSuite/ReportGenerator/Correct/icons/resource.png +0 -0
  455. data/test/TestSuite/ReportGenerator/Correct/icons/resourcegroup.png +0 -0
  456. data/test/TestSuite/ReportGenerator/Correct/icons/task.png +0 -0
  457. data/test/TestSuite/ReportGenerator/Correct/icons/taskgroup.png +0 -0
  458. data/test/TestSuite/ReportGenerator/Correct/icons/trend-down.png +0 -0
  459. data/test/TestSuite/ReportGenerator/Correct/icons/trend-flat.png +0 -0
  460. data/test/TestSuite/ReportGenerator/Correct/icons/trend-up.png +0 -0
  461. data/test/TestSuite/ReportGenerator/Correct/opennodes.csv +2 -0
  462. data/test/TestSuite/ReportGenerator/Correct/opennodes.tjp +26 -0
  463. data/test/TestSuite/ReportGenerator/Correct/refs/Journal-1.csv +6 -0
  464. data/test/TestSuite/ReportGenerator/Correct/refs/LogicalFunctions1-1.csv +7 -0
  465. data/test/TestSuite/ReportGenerator/Correct/refs/LogicalFunctions2-1.csv +2 -0
  466. data/test/TestSuite/ReportGenerator/Correct/refs/opennodes-1.csv +2 -0
  467. data/test/TestSuite/ReportGenerator/Correct/scripts/wz_tooltip.js +1301 -0
  468. data/test/TestSuite/ReportGenerator/Errors/rtp_report_recursion.tjp +20 -0
  469. data/test/TestSuite/Scheduler/Correct/Container.html +349 -0
  470. data/test/TestSuite/Scheduler/Correct/Limits.tjp +11 -4
  471. data/test/TestSuite/Scheduler/Correct/Shift2.html +464 -150
  472. data/test/TestSuite/Scheduler/Correct/TimeSheet2.html +108 -0
  473. data/test/TestSuite/Scheduler/Correct/TimeSheet2.tjp +7 -0
  474. data/test/TestSuite/Scheduler/Correct/css/tjmanual.css +14 -0
  475. data/test/TestSuite/Scheduler/Correct/css/tjreport.css +233 -21
  476. data/test/TestSuite/Scheduler/Correct/scripts/wz_tooltip.js +20 -20
  477. data/test/TestSuite/StatusSheetTemplates/project.tji +35 -0
  478. data/test/TestSuite/StatusSheetTemplates/project.tjp +56 -0
  479. data/test/TestSuite/StatusSheets/run +3 -2
  480. data/test/TestSuite/Syntax/Correct/Include.tjp +1 -1
  481. data/test/TestSuite/Syntax/Correct/Macro-1.tjp +1 -1
  482. data/test/TestSuite/Syntax/Correct/Macro-2.tjp +6 -0
  483. data/test/TestSuite/Syntax/Correct/Macro-3.tjp +14 -0
  484. data/test/TestSuite/Syntax/Correct/ResourcePrefix.html +32 -0
  485. data/test/TestSuite/Syntax/Correct/css/tjmanual.css +66 -0
  486. data/test/TestSuite/Syntax/Correct/css/tjreport.css +407 -0
  487. data/test/TestSuite/Syntax/Correct/icons/details.png +0 -0
  488. data/test/TestSuite/Syntax/Correct/icons/flag-green.png +0 -0
  489. data/test/TestSuite/Syntax/Correct/icons/flag-red.png +0 -0
  490. data/test/TestSuite/Syntax/Correct/icons/flag-yellow.png +0 -0
  491. data/test/TestSuite/Syntax/Correct/icons/resource.png +0 -0
  492. data/test/TestSuite/Syntax/Correct/icons/resourcegroup.png +0 -0
  493. data/test/TestSuite/Syntax/Correct/icons/task.png +0 -0
  494. data/test/TestSuite/Syntax/Correct/icons/taskgroup.png +0 -0
  495. data/test/TestSuite/Syntax/Correct/icons/trend-down.png +0 -0
  496. data/test/TestSuite/Syntax/Correct/icons/trend-flat.png +0 -0
  497. data/test/TestSuite/Syntax/Correct/icons/trend-up.png +0 -0
  498. data/test/TestSuite/Syntax/Correct/include/dir1/file2.tji +3 -0
  499. data/test/TestSuite/Syntax/Correct/include/dir1/file5.tji +2 -0
  500. data/test/TestSuite/Syntax/Correct/include/dir3/all.tji +3 -0
  501. data/test/TestSuite/Syntax/Correct/include/dir3/file1.tji +2 -0
  502. data/test/TestSuite/Syntax/Correct/include/dir3/file2.tji +1 -0
  503. data/test/TestSuite/Syntax/Correct/scripts/wz_tooltip.js +1301 -0
  504. data/test/TestSuite/Syntax/Correct/tutorial.tjp +13 -13
  505. data/test/TestSuite/Syntax/Errors/empty.tjp +1 -1
  506. data/test/TestSuite/Syntax/Errors/include_recursion.tjp +1 -0
  507. data/test/TestSuite/Syntax/Errors/macro_stack_overflow.tjp +2 -1
  508. data/test/TestSuite/Syntax/Errors/{eof_in_istring1.tjp → no_token_match1.tjp} +2 -2
  509. data/test/TestSuite/Syntax/Errors/{eof_in_istring2.tjp → no_token_match2.tjp} +2 -2
  510. data/test/TestSuite/Syntax/Errors/{eof_in_istring3.tjp → no_token_match3.tjp} +1 -1
  511. data/test/TestSuite/Syntax/Errors/{eof_in_istring4.tjp → no_token_match4.tjp} +1 -1
  512. data/test/TestSuite/Syntax/Errors/{eof_in_istring5.tjp → no_token_match5.tjp} +1 -1
  513. data/test/TestSuite/Syntax/Errors/not_scheduled.tjp +13 -0
  514. data/test/TestSuite/Syntax/Errors/unsupported_token.tjp +1 -1
  515. data/test/TestSuite/TimeSheets/run +5 -5
  516. data/test/test_CSVFile.rb +75 -0
  517. data/test/test_Limits.rb +63 -5
  518. data/test/test_ProjectFileScanner.rb +163 -0
  519. data/test/test_ReportGenerator.rb +81 -0
  520. data/test/test_RichText.rb +21 -3
  521. data/test/test_Scheduler.rb +1 -1
  522. data/test/test_ShiftAssignments.rb +4 -4
  523. data/test/test_Syntax.rb +1 -1
  524. data/test/test_URLParameter.rb +30 -0
  525. metadata +126 -32
  526. data/test/TestSuite/Scheduler/Errors/not_scheduled.tjp +0 -8
  527. data/test/TestSuite/Syntax/Errors/bad_comment.tjp +0 -7
  528. data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/boss_2002-03-01.tji +0 -36
  529. data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/dev1_2002-03-01.tji +0 -48
  530. data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/dev2_2002-03-01.tji +0 -67
  531. data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/dev3_2002-03-01.tji +0 -67
  532. data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/doc_2002-03-01.tji +0 -48
  533. data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/resources.yml +0 -31
  534. data/test/TestSuite/TimeSheets/TimeSheetTemplates/2002-03-01/test_2002-03-01.tji +0 -36
  535. data/test/TestSuite/TimeSheets/TimeSheetTemplates/acceptable_intervals +0 -1
  536. data/test/TestSuite/TimeSheets/TimeSheets/2002-03-01/all.tji +0 -1
  537. data/test/TestSuite/TimeSheets/TimeSheets/2002-03-01/dev2_2002-03-01.tji +0 -54
  538. data/test/TestSuite/TimeSheets/TimeSheets/all.tji +0 -2
  539. data/test/TestSuite/TimeSheets/receiver.log +0 -102
  540. data/test/TestSuite/TimeSheets/sender.log +0 -794
  541. data/test/TestSuite/TimeSheets/summary.log +0 -884
  542. data/test/TestSuite/TimeSheets/timesheets.log +0 -45
  543. data/test/TestSuite/TimeSheets/tj3d.log +0 -292
  544. data/test/test_TextScanner.rb +0 -95
@@ -0,0 +1,365 @@
1
+ #!/usr/bin/env ruby -w
2
+ # encoding: UTF-8
3
+ #
4
+ # = ProjectFileScanner.rb -- The TaskJuggler III Project Management Software
5
+ #
6
+ # Copyright (c) 2006, 2007, 2008, 2009, 2010 by Chris Schlaeger <cs@kde.org>
7
+ #
8
+ # This program is free software; you can redistribute it and/or modify
9
+ # it under the terms of version 2 of the GNU General Public License as
10
+ # published by the Free Software Foundation.
11
+ #
12
+
13
+ require 'TextScanner'
14
+
15
+ class TaskJuggler
16
+
17
+ # This class specializes the TextScanner class to detect the tokens of the
18
+ # TJP syntax.
19
+ class ProjectFileScanner < TextScanner
20
+
21
+ def initialize(masterFile, messageHandler)
22
+ super
23
+
24
+ tokenPatterns = [
25
+ # Any white spaces
26
+ [ nil, /\s+/, :tjp, method('newPos') ],
27
+
28
+ # Single line comments starting with #
29
+ [ nil, /#.*\n?/, :tjp, method('newPos') ],
30
+
31
+ # C++ style single line comments starting with //
32
+ [ nil, /\/\/.*\n?/, :tjp, method('newPos') ],
33
+
34
+ # C style single line comment /* .. */.
35
+ [ nil, /\/\*.*\*\//, :tjp, method('newPos') ],
36
+
37
+ # C style multi line comment: We need three patterns here. The first
38
+ # one is for the start of the string. It switches the scanner mode to
39
+ # the :cppComment mode.
40
+ [ nil, /\/\*([^*]*[^\/]|.*)\n/, :tjp, method('startComment') ],
41
+ # This is the string end pattern. It switches back to tjp mode.
42
+ [ nil, /.*\*\//, :cppComment, method('endComment') ],
43
+ # This pattern matches string lines that contain neither the start,
44
+ # nor the end of the string.
45
+ [ nil, /^.*\n/, :cppComment ],
46
+
47
+ # Macro Call: This case is more complicated because we want to replace
48
+ # macro calls inside of numbers, strings and identifiers. For this to
49
+ # work, macro calls may have a prefix that looks like a number, a part
50
+ # of a string or an identifier. This prefix is preserved and
51
+ # re-injected into the scanner together with the expanded text. Macro
52
+ # calls may span multiple lines. The ${ and the macro name must be in
53
+ # the first line. Arguments that span multiple lines are not
54
+ # supported. As above, we need rules for the start, the end and lines
55
+ # with neither start nor end. Macro calls inside of strings need a
56
+ # special start pattern that is active in the string modes. Both
57
+ # patterns switch the scanner to macroCall mode.
58
+ [ nil, /([-a-zA-Z_0-9>:.+]*|"(\\"|[^"])*|'(\\'|[^'])*|-8<-.*)?\$\{\s*([a-zA-Z_]\w*)(\s*"(\\"|[^"])*")*/,
59
+ :tjp, method('startMacroCall') ],
60
+ # This pattern is similar to the previous one, but is active inside of
61
+ # multi-line strings. The corresponding rule for sizzors strings
62
+ # can be found below.
63
+ [ nil, /(\\"|[^"])*\$\{\s*([a-zA-Z_]\w*)(\s*"(\\"|[^"])*")*/,
64
+ :dqString, method('startMacroCall') ],
65
+ [ nil, /(\\'|[^'])*\$\{\s*([a-zA-Z_]\w*)(\s*"(\\"|[^"])*")*/,
66
+ :sqString, method('startMacroCall') ],
67
+ # This pattern matches the end of a macro call. It injects the prefix
68
+ # and the expanded macro into the scanner again. The mode is restored
69
+ # to the previous mode.
70
+ [ nil, /(\s*"(\\"|[^"])*")*\s*\}/, :macroCall, method('endMacroCall') ],
71
+ # This pattern collects macro call arguments in lines that contain
72
+ # neither the start nor the end of the macro.
73
+ [ nil, /.*\n/, :macroCall, method('midMacroCall') ],
74
+
75
+ # An ID with a colon suffix: foo:
76
+ [ 'ID_WITH_COLON', /[a-zA-Z_]\w*:/, :tjp, method('chop') ],
77
+
78
+ # An absolute ID: a.b.c
79
+ [ 'ABSOLUTE_ID', /[a-zA-Z_]\w*(\.[a-zA-Z_]\w*)+/ ],
80
+
81
+ # A normal ID: bar
82
+ [ 'ID', /[a-zA-Z_]\w*/ ],
83
+
84
+ # A date
85
+ [ 'DATE', /\d{4}-\d{1,2}-\d{1,2}(-\d{1,2}:\d{1,2}(:\d{1,2})?(-[-+]?\d{4})?)?/, :tjp, method('to_date') ],
86
+
87
+ # A time of day
88
+ [ 'TIME', /\d{1,2}:\d{2}/, :tjp, method('to_time') ],
89
+
90
+ # A floating point number (e. g. 3.143)
91
+ [ 'FLOAT', /\d*\.\d+/, :tjp, method('to_f') ],
92
+
93
+ # An integer number
94
+ [ 'INTEGER', /\d+/, :tjp, method('to_i') ],
95
+
96
+ # Multi line string enclosed with double quotes. The string may
97
+ # contain double quotes prefixed by a backslash. The first rule
98
+ # switches the scanner to dqString mode.
99
+ [ 'nil', /"(\\"|[^"])*/, :tjp, method('startStringDQ') ],
100
+ # Any line not containing the start or end.
101
+ [ 'nil', /^(\\"|[^"])*\n/, :dqString, method('midStringDQ') ],
102
+ # The end of the string.
103
+ [ 'STRING', /(\\"|[^"])*"/, :dqString, method('endStringDQ') ],
104
+
105
+ # Multi line string enclosed with single quotes.
106
+ [ 'nil', /'(\\'|[^'])*/, :tjp, method('startStringSQ') ],
107
+ # Any line not containing the start or end.
108
+ [ 'nil', /^(\\'|[^'])*\n/, :sqString, method('midStringSQ') ],
109
+ # The end of the string.
110
+ [ 'STRING', /(\\'|[^'])*'/, :sqString, method('endStringSQ') ],
111
+
112
+ # Scizzors marked string -8<- ... ->8-: The opening mark must be the
113
+ # last thing in the line. The indentation of the first line after the
114
+ # opening mark determines the indentation for all following lines. So,
115
+ # we first switch the scanner to szrString1 mode.
116
+ [ 'nil', /-8<-.*\n/, :tjp, method('startStringSZR') ],
117
+ # Since the first line can be the last line (empty string case), we
118
+ # need to detect the end in szrString1 and szrString mode. The
119
+ # patterns switch the scanner back to tjp mode.
120
+ [ 'STRING', /\s*->8-/, :szrString1, method('endStringSZR') ],
121
+ [ 'STRING', /\s*->8-/, :szrString, method('endStringSZR') ],
122
+ # This rule handles macros inside of sizzors strings.
123
+ [ nil, /.*\$\{\s*([a-zA-Z_]\w*)(\s*"(\\"|[^"])*")*/,
124
+ [ :szrString, :szrString1 ], method('startMacroCall') ],
125
+ # Any line not containing the start or end.
126
+ [ 'nil', /.*\n/, :szrString1, method('firstStringSZR') ],
127
+ [ 'nil', /.*\n/, :szrString, method('midStringSZR') ],
128
+
129
+ # Single line macro definition
130
+ [ 'MACRO', /\[.*\]\n/, :tjp, method('chop2nl') ],
131
+
132
+ # Multi line macro definition: The pattern switches the scanner into
133
+ # macroDef mode.
134
+ [ nil, /\[.*\n/, :tjp, method('startMacroDef') ],
135
+ # The end of the macro is marked by a ']' that is immediately followed
136
+ # by a line break. It switches the scanner back to tjp mode.
137
+ [ 'MACRO', /.*\]\n/, :macroDef, method('endMacroDef') ],
138
+ # Any line not containing the start or end.
139
+ [ nil, /.*\n/, :macroDef, method('midMacroDef') ],
140
+
141
+ # Some multi-char literals.
142
+ [ 'LITERAL', /<=?/ ],
143
+ [ 'LITERAL', />=?/ ],
144
+ [ 'LITERAL', /!=?/ ],
145
+
146
+ # Everything else is returned as a single-char literal.
147
+ [ 'LITERAL', /./ ]
148
+ ]
149
+
150
+ tokenPatterns.each do |pat|
151
+ type = pat[0]
152
+ regExp = pat[1]
153
+ mode = pat[2] || :tjp
154
+ postProc = pat[3]
155
+ addPattern(type, regExp, mode, postProc)
156
+ end
157
+ self.mode = :tjp
158
+ end
159
+
160
+ private
161
+
162
+ def to_i(type, match)
163
+ [ type, match.to_i ]
164
+ end
165
+
166
+ def to_f(type, match)
167
+ [ type, match.to_f ]
168
+ end
169
+
170
+ def to_time(type, match)
171
+ h, m, s = match.split(':')
172
+ h = h.to_i
173
+ m = m.to_i
174
+ s = 0 if s.nil?
175
+ [ type, h * 3600 + m * 60 + s ]
176
+ end
177
+
178
+ def to_date(type, match)
179
+ [ type, TjTime.new(match) ]
180
+ end
181
+
182
+ def newPos(type, match)
183
+ @startOfToken = sourceFileInfo
184
+ [ nil, '' ]
185
+ end
186
+
187
+ def chop(type, match)
188
+ [ type, match[0..-2] ]
189
+ end
190
+
191
+ def chop2(type, match)
192
+ # Remove first and last character.
193
+ [ type, match[1..-2] ]
194
+ end
195
+
196
+ def chop2nl(type, match)
197
+ # remove first and last 2 characters.
198
+ [ type, match[1..-3] ]
199
+ end
200
+
201
+ def startComment(type, match)
202
+ self.mode = :cppComment
203
+ [ nil, '' ]
204
+ end
205
+
206
+ def endComment(type, match)
207
+ self.mode = :tjp
208
+ [ nil, '' ]
209
+ end
210
+
211
+ def startStringDQ(type, match)
212
+ self.mode = :dqString
213
+ # Remove the opening " and remove the backslashes from escaped ".
214
+ @string = match[1..-1].gsub(/\\"/, '"')
215
+ [ nil, '' ]
216
+ end
217
+
218
+ def midStringDQ(type, match)
219
+ # Remove the backslashes from escaped ".
220
+ @string += match.gsub(/\\"/, '"')
221
+ [ nil, '' ]
222
+ end
223
+
224
+ def endStringDQ(type, match)
225
+ self.mode = :tjp
226
+ # Remove the trailing " and remove the backslashes from escaped ".
227
+ @string += match[0..-2].gsub(/\\"/, '"')
228
+ [ 'STRING', @string ]
229
+ end
230
+
231
+ def startStringSQ(type, match)
232
+ self.mode = :sqString
233
+ # Remove the opening ' and remove the backslashes from escaped '.
234
+ @string = match[1..-1].gsub(/\\'/, "'")
235
+ [ nil, '' ]
236
+ end
237
+
238
+ def midStringSQ(type, match)
239
+ # Remove the backslashes from escaped '.
240
+ @string += match.gsub(/\\'/, "'")
241
+ [ nil, '' ]
242
+ end
243
+
244
+ def endStringSQ(type, match)
245
+ self.mode = :tjp
246
+ # Remove the trailing ' and remove the backslashes from escaped '.
247
+ @string += match[0..-2].gsub(/\\'/, "'")
248
+ [ 'STRING', @string ]
249
+ end
250
+
251
+ def startStringSZR(type, match)
252
+ # There should be a line break after the cut mark, but we allow some
253
+ # spaces between the mark and the line break as well.
254
+ if match.length != 5 && /-8<-\s*\n$/.match(match).nil?
255
+ @lineDelta = 1
256
+ error('junk_after_cut',
257
+ 'The cut mark -8<- must be immediately followed by a ' +
258
+ 'line break.')
259
+ end
260
+ self.mode = :szrString1
261
+ @startOfToken = sourceFileInfo
262
+ @string = ''
263
+ [ nil, '' ]
264
+ end
265
+
266
+ def firstStringSZR(type, match)
267
+ self.mode = :szrString
268
+ # Split the leading indentation and the rest of the string.
269
+ foo, @indent, @string = */(\s*)(.*\n)/.match(match)
270
+ [ nil, '' ]
271
+ end
272
+
273
+ def midStringSZR(type, match)
274
+ # Ignore all the characters from the begining of match that are the same
275
+ # in @indent.
276
+ i = 0
277
+ while i < @indent.length && @indent[i] == match[i]
278
+ i += 1
279
+ end
280
+ @string += match[i..-1]
281
+ [ nil, '' ]
282
+ end
283
+
284
+ def endStringSZR(type, match)
285
+ self.mode = :tjp
286
+ [ 'STRING', @string ]
287
+ end
288
+
289
+ def startMacroDef(type, match)
290
+ self.mode = :macroDef
291
+ # Remove the opening '['
292
+ @macroDef = match[1..-1]
293
+ [ nil, '' ]
294
+ end
295
+
296
+ def midMacroDef(type, match)
297
+ @macroDef += match
298
+ [ nil, '' ]
299
+ end
300
+
301
+ def endMacroDef(type, match)
302
+ self.mode = :tjp
303
+ # Remove "]\n"
304
+ @macroDef += match[0..-3]
305
+ [ 'MACRO', @macroDef ]
306
+ end
307
+
308
+ def startMacroCall(type, match)
309
+ @macroCallPreviousMode = @scannerMode
310
+ self.mode = :macroCall
311
+ @macroCall = match
312
+ [ nil, '' ]
313
+ end
314
+
315
+ def midMacroCall(type, match)
316
+ @macroCall += match
317
+ [ nil, '' ]
318
+ end
319
+
320
+ def endMacroCall(type, match)
321
+ self.mode = @macroCallPreviousMode
322
+ @macroCall += match
323
+
324
+ # Store any characters that precede the ${ in prefix and remove it from
325
+ # @macroCall.
326
+ if (macroStart = @macroCall.index('${')) > 0
327
+ prefix = @macroCall[0..(macroStart - 1)]
328
+ @macroCall = @macroCall[macroStart..-1]
329
+ else
330
+ prefix = ''
331
+ end
332
+
333
+ # Remove '${' and '}'
334
+ argsStr = @macroCall[2..-2]
335
+ # Extract the macro name.
336
+ if (nameEnd = argsStr.index(' ')).nil?
337
+ expandMacro(prefix, [ argsStr ])
338
+ else
339
+ macroName = argsStr[0, argsStr.index(' ')]
340
+ # Remove the name part from argsStr
341
+ argsStr = argsStr[macroName.length..-1]
342
+ # Array to hold the arguments
343
+ args = []
344
+ # We use another StringScanner to clean the double quotes.
345
+ scanner = StringScanner.new(argsStr)
346
+ while (scanner.scan(/\s*"/))
347
+ args << scanner.scan(/(\\"|[^"])*/).gsub(/\\"/, '"')
348
+ scanner.scan(/"\s*/)
349
+ end
350
+
351
+ unless scanner.eos?
352
+ raise "Junk found at end of macro: #{argsStr[scanner.pos..-1]}"
353
+ end
354
+
355
+ # Expand the macro and inject it into the scanner.
356
+ expandMacro(prefix, [ macroName ] + args)
357
+ end
358
+
359
+ [ nil, '' ]
360
+ end
361
+
362
+ end
363
+
364
+ end
365
+
data/lib/PropertyList.rb CHANGED
@@ -111,7 +111,8 @@ class TaskJuggler
111
111
  raise TjException.new, "Unknown scenario index #{scIdx} used."
112
112
  end
113
113
  if !@propertySet.scenarioSpecific?(criteria)
114
- raise TjException.new, "Attribute #{criteria} is not scenario specific"
114
+ raise TjException.new, "Attribute #{criteria} is not scenario " +
115
+ "specific"
115
116
  end
116
117
  end
117
118
  @sortingCriteria.push(criteria)
data/lib/PropertySet.rb CHANGED
@@ -113,10 +113,20 @@ class TaskJuggler
113
113
 
114
114
  # Return whether the attribute with _attrId_ is scenario specific or not.
115
115
  def scenarioSpecific?(attrId)
116
- # All hardwired attributes are not scenario specific.
117
- return false if @attributeDefinitions[attrId].nil?
118
-
119
- @attributeDefinitions[attrId].scenarioSpecific
116
+ if @attributeDefinitions[attrId]
117
+ # Check the 'scenarioSpecific' flag of the attribute definition.
118
+ @attributeDefinitions[attrId].scenarioSpecific
119
+ elsif (property = @properties.first) &&
120
+ property && property.data &&
121
+ property.data[0].respond_to?("query_#{attrId}")
122
+ # We've found a query_ function for the attrId that is scenario
123
+ # specific.
124
+ true
125
+ else
126
+ # All hardwired, non-existing and non-scenario-specific query_
127
+ # candidates.
128
+ false
129
+ end
120
130
  end
121
131
 
122
132
  # Return whether the attribute with _attrId_ is inherited from the global
@@ -26,9 +26,9 @@ class TaskJuggler
26
26
  # attribute like an URL that contains more details about the task.
27
27
  class PropertyTreeNode
28
28
 
29
- attr_reader :propertySet, :id, :name, :parent, :project, :sequenceNo,
29
+ attr_reader :propertySet, :id, :parent, :project, :sequenceNo,
30
30
  :children
31
- attr_accessor :sourceFileInfo
31
+ attr_accessor :name, :sourceFileInfo
32
32
  attr_reader :data
33
33
 
34
34
  # Create a new PropertyTreeNode object. _propertySet_ is the PropertySet
@@ -93,6 +93,18 @@ class TaskJuggler
93
93
  self
94
94
  end
95
95
 
96
+ # This method creates a shallow copy of all attributes and returns them as
97
+ # an Array that can be used with restoreAttributes().
98
+ def backupAttributes
99
+ [ @attributes.clone, @scenarioAttributes.clone ]
100
+ end
101
+
102
+ # Restore the attributes to a previously saved state. _backup_ is an Array
103
+ # generated by backupAttributes().
104
+ def restoreAttributes(backup)
105
+ @attributes, @scenarioAttributes = backup
106
+ end
107
+
96
108
  # Return the index of the child _node_.
97
109
  def levelSeqNo(node)
98
110
  @children.index(node) + 1
@@ -320,11 +332,11 @@ class TaskJuggler
320
332
  def declareAttribute(attributeType)
321
333
  if attributeType.scenarioSpecific
322
334
  @project.scenarioCount.times do |i|
323
- attribute = newAttribute(attributeType)
335
+ attribute = attributeType.objClass.new(self, attributeType)
324
336
  @scenarioAttributes[i][attribute.id] = attribute
325
337
  end
326
338
  else
327
- attribute = newAttribute(attributeType)
339
+ attribute = attributeType.objClass.new(self, attributeType)
328
340
  @attributes[attribute.id] = attribute
329
341
  end
330
342
  end
@@ -380,14 +392,14 @@ class TaskJuggler
380
392
  def getAttribute(attributeId, scenarioIdx = nil)
381
393
  case attributeId
382
394
  when 'id'
383
- StringAttribute.new(self, @id)
395
+ StringAttribute.new(self, fullId)
384
396
  when 'name'
385
397
  StringAttribute.new(self, @name)
386
398
  when 'seqno'
387
399
  FixnumAttribute.new(self, @sequenceNo)
388
400
  else
389
401
  @attributes[attributeId] ||
390
- @scenarioAttributes[scenarioIdx][attributeId]
402
+ (scenarioIdx && @scenarioAttributes[scenarioIdx][attributeId])
391
403
  end
392
404
  end
393
405
 
@@ -467,12 +479,28 @@ class TaskJuggler
467
479
  query.string = @project.alertLevelName(alert)
468
480
  end
469
481
 
470
- def query_alertsummary(query)
471
- alertMessages(query, false)
482
+ def query_alertmessages(query)
483
+ journalMessages(@project['journal'].alertEntries(query.end, self, 1,
484
+ query.start),
485
+ query, true)
486
+ end
487
+
488
+ def query_alertsummaries(query)
489
+ journalMessages(@project['journal'].alertEntries(query.end, self, 1,
490
+ query.start),
491
+ query, false)
472
492
  end
473
493
 
474
- def query_alertmessage(query)
475
- alertMessages(query, true)
494
+ def query_journalmessages(query)
495
+ journalMessages(@project['journal'].currentEntries(query.end, self, 0,
496
+ query.start),
497
+ query, true)
498
+ end
499
+
500
+ def query_journalsummaries(query)
501
+ journalMessages(@project['journal'].currentEntries(query.end, self, 0,
502
+ query.start),
503
+ query, false)
476
504
  end
477
505
 
478
506
  def query_alerttrend(query)
@@ -537,13 +565,12 @@ class TaskJuggler
537
565
  private
538
566
 
539
567
  # Create a blog-style list of all alert messages that match the Query.
540
- def alertMessages(query, longVersion)
568
+ def journalMessages(entries, query, longVersion)
541
569
  # The components of the message are either UTF-8 text or RichText. For
542
570
  # the RichText components, we use the originally provided markup since
543
571
  # we compose the result as RichText markup first.
544
572
  rText = ''
545
- @project['journal'].currentEntries(query.end, self, 0,
546
- query.start).each do |entry|
573
+ entries.each do |entry|
547
574
  rText += "=== <nowiki>" + entry.headline + "</nowiki> ===\n"
548
575
  rText += "''Reported on #{entry.date.to_s(query.timeFormat)}'' "
549
576
  if entry.author
@@ -559,13 +586,9 @@ class TaskJuggler
559
586
  end
560
587
  # Now convert the RichText markup String into RichTextIntermediate
561
588
  # format.
562
- handlers = [
563
- RTFNavigator.new(@project),
564
- RTFQuery.new(@project),
565
- RTFReport.new(@project)
566
- ]
567
589
  begin
568
- rti = RichText.new(rText, handlers).generateIntermediateFormat
590
+ rti = RichText.new(rText, RTFHandlers.create(@project)).
591
+ generateIntermediateFormat
569
592
  rescue RichTextException => msg
570
593
  $stderr.puts "Error while processing Rich Text\n" +
571
594
  "Line #{msg.lineNo}: #{msg.text}\n" +
@@ -579,16 +602,6 @@ class TaskJuggler
579
602
  query.rti = rti
580
603
  end
581
604
 
582
- def newAttribute(attributeType)
583
- attribute = attributeType.objClass.new(self, attributeType)
584
- # If the attribute requires a pointer to the project, we'll hand it over.
585
- if !attribute.value.nil? && attribute.respond_to?('setProject')
586
- attribute.setProject(@project)
587
- end
588
-
589
- attribute
590
- end
591
-
592
605
  def indent(tag, str)
593
606
  tag + str.gsub(/\n/, "\n#{' ' * tag.length}") + "\n"
594
607
  end