taskjuggler 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +280 -0
- data/README +31 -0
- data/Rakefile +20 -0
- data/benchmarks/UTF-8-Strings.rb +58 -0
- data/benchmarks/allocate.tjp +30 -0
- data/benchmarks/booking.tjp +62 -0
- data/benchmarks/depends.tjp +112 -0
- data/benchmarks/htmltaskreport.tjp +45 -0
- data/benchmarks/runbench.rb +24 -0
- data/bin/tj3 +3 -0
- data/bin/tj3man +3 -0
- data/doc/classes/AppConfig.html +808 -0
- data/doc/classes/Arguments.html +226 -0
- data/doc/classes/String.html +395 -0
- data/doc/classes/TaskJuggler.html +1358 -0
- data/doc/classes/TaskJuggler/Account.html +257 -0
- data/doc/classes/TaskJuggler/AccountScenario.html +218 -0
- data/doc/classes/TaskJuggler/Allocation.html +419 -0
- data/doc/classes/TaskJuggler/AllocationAttribute.html +291 -0
- data/doc/classes/TaskJuggler/AttributeBase.html +608 -0
- data/doc/classes/TaskJuggler/AttributeDefinition.html +259 -0
- data/doc/classes/TaskJuggler/Booking.html +307 -0
- data/doc/classes/TaskJuggler/BookingListAttribute.html +263 -0
- data/doc/classes/TaskJuggler/BooleanAttribute.html +261 -0
- data/doc/classes/TaskJuggler/CSVFile.html +325 -0
- data/doc/classes/TaskJuggler/Charge.html +279 -0
- data/doc/classes/TaskJuggler/ChargeListAttribute.html +229 -0
- data/doc/classes/TaskJuggler/ChargeSet.html +440 -0
- data/doc/classes/TaskJuggler/ChargeSetListAttribute.html +276 -0
- data/doc/classes/TaskJuggler/ColumnTable.html +260 -0
- data/doc/classes/TaskJuggler/DateAttribute.html +194 -0
- data/doc/classes/TaskJuggler/DependencyListAttribute.html +267 -0
- data/doc/classes/TaskJuggler/DurationAttribute.html +229 -0
- data/doc/classes/TaskJuggler/FixnumAttribute.html +194 -0
- data/doc/classes/TaskJuggler/FlagListAttribute.html +263 -0
- data/doc/classes/TaskJuggler/FloatAttribute.html +229 -0
- data/doc/classes/TaskJuggler/GanttChart.html +667 -0
- data/doc/classes/TaskJuggler/GanttContainer.html +441 -0
- data/doc/classes/TaskJuggler/GanttHeader.html +280 -0
- data/doc/classes/TaskJuggler/GanttHeaderScaleItem.html +245 -0
- data/doc/classes/TaskJuggler/GanttLine.html +398 -0
- data/doc/classes/TaskJuggler/GanttLoadStack.html +327 -0
- data/doc/classes/TaskJuggler/GanttMilestone.html +415 -0
- data/doc/classes/TaskJuggler/GanttRouter.html +425 -0
- data/doc/classes/TaskJuggler/GanttTaskBar.html +429 -0
- data/doc/classes/TaskJuggler/HTMLDocument.html +240 -0
- data/doc/classes/TaskJuggler/HTMLGraphics.html +231 -0
- data/doc/classes/TaskJuggler/Interval.html +552 -0
- data/doc/classes/TaskJuggler/IntervalListAttribute.html +267 -0
- data/doc/classes/TaskJuggler/KeywordDocumentation.html +796 -0
- data/doc/classes/TaskJuggler/Limits.html +416 -0
- data/doc/classes/TaskJuggler/Limits/Limit.html +381 -0
- data/doc/classes/TaskJuggler/LimitsAttribute.html +261 -0
- data/doc/classes/TaskJuggler/Log.html +613 -0
- data/doc/classes/TaskJuggler/LogicalAttribute.html +226 -0
- data/doc/classes/TaskJuggler/LogicalExpression.html +251 -0
- data/doc/classes/TaskJuggler/LogicalFlag.html +229 -0
- data/doc/classes/TaskJuggler/LogicalFunction.html +324 -0
- data/doc/classes/TaskJuggler/LogicalOperation.html +299 -0
- data/doc/classes/TaskJuggler/Macro.html +194 -0
- data/doc/classes/TaskJuggler/MacroParser.html +360 -0
- data/doc/classes/TaskJuggler/MacroTable.html +366 -0
- data/doc/classes/TaskJuggler/Message.html +281 -0
- data/doc/classes/TaskJuggler/MessageHandler.html +215 -0
- data/doc/classes/TaskJuggler/Project.html +1606 -0
- data/doc/classes/TaskJuggler/ProjectFileParser.html +412 -0
- data/doc/classes/TaskJuggler/PropertyList.html +597 -0
- data/doc/classes/TaskJuggler/PropertySet.html +1200 -0
- data/doc/classes/TaskJuggler/PropertyTreeNode.html +1449 -0
- data/doc/classes/TaskJuggler/Query.html +600 -0
- data/doc/classes/TaskJuggler/RealFormat.html +252 -0
- data/doc/classes/TaskJuggler/ReferenceAttribute.html +194 -0
- data/doc/classes/TaskJuggler/Report.html +528 -0
- data/doc/classes/TaskJuggler/ReportElement.html +1070 -0
- data/doc/classes/TaskJuggler/ReportTable.html +497 -0
- data/doc/classes/TaskJuggler/ReportTableCell.html +518 -0
- data/doc/classes/TaskJuggler/ReportTableColumn.html +364 -0
- data/doc/classes/TaskJuggler/ReportTableElement.html +644 -0
- data/doc/classes/TaskJuggler/ReportTableLegend.html +343 -0
- data/doc/classes/TaskJuggler/ReportTableLine.html +431 -0
- data/doc/classes/TaskJuggler/Resource.html +211 -0
- data/doc/classes/TaskJuggler/ResourceListAttribute.html +267 -0
- data/doc/classes/TaskJuggler/ResourceListRE.html +249 -0
- data/doc/classes/TaskJuggler/ResourceScenario.html +1137 -0
- data/doc/classes/TaskJuggler/RichText.html +537 -0
- data/doc/classes/TaskJuggler/RichTextAttribute.html +229 -0
- data/doc/classes/TaskJuggler/RichTextDocument.html +418 -0
- data/doc/classes/TaskJuggler/RichTextElement.html +829 -0
- data/doc/classes/TaskJuggler/RichTextException.html +212 -0
- data/doc/classes/TaskJuggler/RichTextParser.html +317 -0
- data/doc/classes/TaskJuggler/RichTextProtocolExample.html +303 -0
- data/doc/classes/TaskJuggler/RichTextProtocolHandler.html +194 -0
- data/doc/classes/TaskJuggler/RichTextScanner.html +561 -0
- data/doc/classes/TaskJuggler/RichTextSnip.html +364 -0
- data/doc/classes/TaskJuggler/RichTextSyntaxRules.html +883 -0
- data/doc/classes/TaskJuggler/Scenario.html +163 -0
- data/doc/classes/TaskJuggler/ScenarioData.html +354 -0
- data/doc/classes/TaskJuggler/Scoreboard.html +638 -0
- data/doc/classes/TaskJuggler/Shift.html +255 -0
- data/doc/classes/TaskJuggler/ShiftAssignment.html +488 -0
- data/doc/classes/TaskJuggler/ShiftAssignments.html +715 -0
- data/doc/classes/TaskJuggler/ShiftAssignmentsAttribute.html +261 -0
- data/doc/classes/TaskJuggler/ShiftScenario.html +282 -0
- data/doc/classes/TaskJuggler/SourceFileInfo.html +247 -0
- data/doc/classes/TaskJuggler/StringAttribute.html +229 -0
- data/doc/classes/TaskJuggler/SymbolAttribute.html +194 -0
- data/doc/classes/TaskJuggler/SyntaxReference.html +516 -0
- data/doc/classes/TaskJuggler/TOCEntry.html +242 -0
- data/doc/classes/TaskJuggler/TableColumnDefinition.html +273 -0
- data/doc/classes/TaskJuggler/TableOfContents.html +256 -0
- data/doc/classes/TaskJuggler/Task.html +203 -0
- data/doc/classes/TaskJuggler/TaskDependency.html +251 -0
- data/doc/classes/TaskJuggler/TaskListAttribute.html +267 -0
- data/doc/classes/TaskJuggler/TaskListRE.html +250 -0
- data/doc/classes/TaskJuggler/TaskScenario.html +2206 -0
- data/doc/classes/TaskJuggler/TextParser.html +670 -0
- data/doc/classes/TaskJuggler/TextParser/Pattern.html +923 -0
- data/doc/classes/TaskJuggler/TextParser/Rule.html +779 -0
- data/doc/classes/TaskJuggler/TextParser/StackElement.html +267 -0
- data/doc/classes/TaskJuggler/TextParser/TextParserResultArray.html +212 -0
- data/doc/classes/TaskJuggler/TextParser/TokenDoc.html +221 -0
- data/doc/classes/TaskJuggler/TextScanner.html +708 -0
- data/doc/classes/TaskJuggler/TextScanner/BufferStreamHandle.html +355 -0
- data/doc/classes/TaskJuggler/TextScanner/FileStreamHandle.html +341 -0
- data/doc/classes/TaskJuggler/TextScanner/StreamHandle.html +260 -0
- data/doc/classes/TaskJuggler/TjException.html +185 -0
- data/doc/classes/TaskJuggler/TjTime.html +1845 -0
- data/doc/classes/TaskJuggler/TjpExample.html +310 -0
- data/doc/classes/TaskJuggler/TjpExportRE.html +329 -0
- data/doc/classes/TaskJuggler/TjpSyntaxRules.html +8928 -0
- data/doc/classes/TaskJuggler/UserManual.html +606 -0
- data/doc/classes/TaskJuggler/WorkingHours.html +582 -0
- data/doc/classes/TaskJuggler/WorkingHoursAttribute.html +284 -0
- data/doc/classes/TaskJuggler/XMLBlob.html +207 -0
- data/doc/classes/TaskJuggler/XMLComment.html +206 -0
- data/doc/classes/TaskJuggler/XMLDocument.html +293 -0
- data/doc/classes/TaskJuggler/XMLElement.html +341 -0
- data/doc/classes/TaskJuggler/XMLNamedText.html +174 -0
- data/doc/classes/TaskJuggler/XMLText.html +221 -0
- data/doc/files/COPYING.html +448 -0
- data/doc/files/README.html +134 -0
- data/doc/files/lib/AccountScenario_rb.html +116 -0
- data/doc/files/lib/Account_rb.html +118 -0
- data/doc/files/lib/Allocation_rb.html +118 -0
- data/doc/files/lib/AppConfig_rb.html +116 -0
- data/doc/files/lib/AttributeBase_rb.html +106 -0
- data/doc/files/lib/AttributeDefinition_rb.html +106 -0
- data/doc/files/lib/Attributes_rb.html +130 -0
- data/doc/files/lib/Booking_rb.html +106 -0
- data/doc/files/lib/ChargeSet_rb.html +116 -0
- data/doc/files/lib/Charge_rb.html +116 -0
- data/doc/files/lib/HTMLDocument_rb.html +116 -0
- data/doc/files/lib/Interval_rb.html +116 -0
- data/doc/files/lib/KeywordDocumentation_rb.html +122 -0
- data/doc/files/lib/Limits_rb.html +116 -0
- data/doc/files/lib/Log_rb.html +116 -0
- data/doc/files/lib/LogicalExpression_rb.html +122 -0
- data/doc/files/lib/LogicalFlag_rb.html +116 -0
- data/doc/files/lib/LogicalFunction_rb.html +116 -0
- data/doc/files/lib/LogicalOperation_rb.html +116 -0
- data/doc/files/lib/MacroParser_rb.html +118 -0
- data/doc/files/lib/MacroTable_rb.html +122 -0
- data/doc/files/lib/MessageHandler_rb.html +106 -0
- data/doc/files/lib/Message_rb.html +116 -0
- data/doc/files/lib/ProjectFileParser_rb.html +122 -0
- data/doc/files/lib/Project_rb.html +148 -0
- data/doc/files/lib/PropertyList_rb.html +106 -0
- data/doc/files/lib/PropertySet_rb.html +118 -0
- data/doc/files/lib/PropertyTreeNode_rb.html +106 -0
- data/doc/files/lib/Query_rb.html +116 -0
- data/doc/files/lib/RealFormat_rb.html +106 -0
- data/doc/files/lib/ResourceScenario_rb.html +116 -0
- data/doc/files/lib/Resource_rb.html +118 -0
- data/doc/files/lib/RichTextDocument_rb.html +120 -0
- data/doc/files/lib/RichTextElement_rb.html +120 -0
- data/doc/files/lib/RichTextParser_rb.html +120 -0
- data/doc/files/lib/RichTextProtocolExample_rb.html +120 -0
- data/doc/files/lib/RichTextProtocolHandler_rb.html +106 -0
- data/doc/files/lib/RichTextScanner_rb.html +116 -0
- data/doc/files/lib/RichTextSnip_rb.html +118 -0
- data/doc/files/lib/RichTextSyntaxRules_rb.html +106 -0
- data/doc/files/lib/RichText_rb.html +118 -0
- data/doc/files/lib/ScenarioData_rb.html +118 -0
- data/doc/files/lib/Scenario_rb.html +116 -0
- data/doc/files/lib/Scoreboard_rb.html +106 -0
- data/doc/files/lib/ShiftAssignments_rb.html +116 -0
- data/doc/files/lib/ShiftScenario_rb.html +116 -0
- data/doc/files/lib/Shift_rb.html +118 -0
- data/doc/files/lib/SourceFileInfo_rb.html +106 -0
- data/doc/files/lib/SyntaxReference_rb.html +122 -0
- data/doc/files/lib/TOCEntry_rb.html +118 -0
- data/doc/files/lib/TableColumnDefinition_rb.html +106 -0
- data/doc/files/lib/TableOfContents_rb.html +118 -0
- data/doc/files/lib/TaskDependency_rb.html +106 -0
- data/doc/files/lib/TaskJuggler_rb.html +120 -0
- data/doc/files/lib/TaskScenario_rb.html +116 -0
- data/doc/files/lib/Task_rb.html +118 -0
- data/doc/files/lib/TextParser/Pattern_rb.html +116 -0
- data/doc/files/lib/TextParser/Rule_rb.html +106 -0
- data/doc/files/lib/TextParser/StackElement_rb.html +106 -0
- data/doc/files/lib/TextParser/TokenDoc_rb.html +106 -0
- data/doc/files/lib/TextParser_rb.html +124 -0
- data/doc/files/lib/TextScanner_rb.html +128 -0
- data/doc/files/lib/Tj3Config_rb.html +118 -0
- data/doc/files/lib/TjException_rb.html +106 -0
- data/doc/files/lib/TjTime_rb.html +118 -0
- data/doc/files/lib/TjpExample_rb.html +116 -0
- data/doc/files/lib/TjpSyntaxRules_rb.html +106 -0
- data/doc/files/lib/UTF8String_rb.html +132 -0
- data/doc/files/lib/UserManual_rb.html +124 -0
- data/doc/files/lib/WorkingHours_rb.html +116 -0
- data/doc/files/lib/XMLDocument_rb.html +116 -0
- data/doc/files/lib/XMLElement_rb.html +116 -0
- data/doc/files/lib/reports/CSVFile_rb.html +116 -0
- data/doc/files/lib/reports/ColumnTable_rb.html +116 -0
- data/doc/files/lib/reports/GanttChart_rb.html +122 -0
- data/doc/files/lib/reports/GanttContainer_rb.html +116 -0
- data/doc/files/lib/reports/GanttHeaderScaleItem_rb.html +106 -0
- data/doc/files/lib/reports/GanttHeader_rb.html +116 -0
- data/doc/files/lib/reports/GanttLine_rb.html +126 -0
- data/doc/files/lib/reports/GanttLoadStack_rb.html +116 -0
- data/doc/files/lib/reports/GanttMilestone_rb.html +116 -0
- data/doc/files/lib/reports/GanttRouter_rb.html +106 -0
- data/doc/files/lib/reports/GanttTaskBar_rb.html +116 -0
- data/doc/files/lib/reports/HTMLGraphics_rb.html +106 -0
- data/doc/files/lib/reports/ReportElement_rb.html +118 -0
- data/doc/files/lib/reports/ReportTableCell_rb.html +106 -0
- data/doc/files/lib/reports/ReportTableColumn_rb.html +106 -0
- data/doc/files/lib/reports/ReportTableElement_rb.html +122 -0
- data/doc/files/lib/reports/ReportTableLegend_rb.html +106 -0
- data/doc/files/lib/reports/ReportTableLine_rb.html +116 -0
- data/doc/files/lib/reports/ReportTable_rb.html +118 -0
- data/doc/files/lib/reports/Report_rb.html +126 -0
- data/doc/files/lib/reports/ResourceListRE_rb.html +122 -0
- data/doc/files/lib/reports/TaskListRE_rb.html +122 -0
- data/doc/files/lib/reports/TjpExportRE_rb.html +116 -0
- data/doc/files/lib/taskjuggler3_rb.html +276 -0
- data/doc/files/lib/tj3man_rb.html +189 -0
- data/doc/fr_class_index.html +285 -0
- data/doc/fr_file_index.html +223 -0
- data/doc/fr_method_index.html +1953 -0
- data/doc/index.html +21 -0
- data/doc/rdoc-style.css +299 -0
- data/examples/tutorial.tjp +361 -0
- data/gem_spec.rb +30 -0
- data/lib/Account.rb +50 -0
- data/lib/AccountScenario.rb +39 -0
- data/lib/Allocation.rb +102 -0
- data/lib/AppConfig.rb +134 -0
- data/lib/AttributeBase.rb +131 -0
- data/lib/AttributeDefinition.rb +47 -0
- data/lib/Attributes.rb +478 -0
- data/lib/BatchProcessor.rb +209 -0
- data/lib/Booking.rb +59 -0
- data/lib/Charge.rb +71 -0
- data/lib/ChargeSet.rb +126 -0
- data/lib/HTMLDocument.rb +59 -0
- data/lib/Interval.rb +127 -0
- data/lib/KeywordDocumentation.rb +560 -0
- data/lib/Limits.rb +219 -0
- data/lib/Log.rb +160 -0
- data/lib/LogicalExpression.rb +71 -0
- data/lib/LogicalFlag.rb +34 -0
- data/lib/LogicalFunction.rb +102 -0
- data/lib/LogicalOperation.rb +118 -0
- data/lib/MacroParser.rb +77 -0
- data/lib/MacroTable.rb +84 -0
- data/lib/Message.rb +56 -0
- data/lib/MessageHandler.rb +34 -0
- data/lib/Project.rb +662 -0
- data/lib/ProjectFileParser.rb +333 -0
- data/lib/PropertyList.rb +181 -0
- data/lib/PropertySet.rb +304 -0
- data/lib/PropertyTreeNode.rb +461 -0
- data/lib/Query.rb +227 -0
- data/lib/RealFormat.rb +73 -0
- data/lib/Resource.rb +42 -0
- data/lib/ResourceScenario.rb +511 -0
- data/lib/RichText.rb +147 -0
- data/lib/RichTextDocument.rb +139 -0
- data/lib/RichTextElement.rb +391 -0
- data/lib/RichTextParser.rb +66 -0
- data/lib/RichTextProtocolExample.rb +65 -0
- data/lib/RichTextProtocolHandler.rb +35 -0
- data/lib/RichTextScanner.rb +390 -0
- data/lib/RichTextSnip.rb +104 -0
- data/lib/RichTextSyntaxRules.rb +265 -0
- data/lib/Scenario.rb +27 -0
- data/lib/ScenarioData.rb +65 -0
- data/lib/Scoreboard.rb +141 -0
- data/lib/Shift.rb +48 -0
- data/lib/ShiftAssignments.rb +291 -0
- data/lib/ShiftScenario.rb +46 -0
- data/lib/SourceFileInfo.rb +37 -0
- data/lib/SyntaxReference.rb +284 -0
- data/lib/TOCEntry.rb +76 -0
- data/lib/TableColumnDefinition.rb +54 -0
- data/lib/TableOfContents.rb +46 -0
- data/lib/Task.rb +37 -0
- data/lib/TaskDependency.rb +39 -0
- data/lib/TaskJuggler.rb +84 -0
- data/lib/TaskScenario.rb +1622 -0
- data/lib/TextParser.rb +416 -0
- data/lib/TextParser/Pattern.rb +263 -0
- data/lib/TextParser/Rule.rb +171 -0
- data/lib/TextParser/StackElement.rb +45 -0
- data/lib/TextParser/TokenDoc.rb +38 -0
- data/lib/TextScanner.rb +682 -0
- data/lib/Tj3Config.rb +27 -0
- data/lib/TjException.rb +27 -0
- data/lib/TjTime.rb +395 -0
- data/lib/TjpExample.rb +119 -0
- data/lib/TjpSyntaxRules.rb +4022 -0
- data/lib/UTF8String.rb +100 -0
- data/lib/UserManual.rb +282 -0
- data/lib/WorkingHours.rb +323 -0
- data/lib/XMLDocument.rb +54 -0
- data/lib/XMLElement.rb +175 -0
- data/lib/reports/CSVFile.rb +146 -0
- data/lib/reports/ColumnTable.rb +66 -0
- data/lib/reports/GanttChart.rb +308 -0
- data/lib/reports/GanttContainer.rb +107 -0
- data/lib/reports/GanttHeader.rb +141 -0
- data/lib/reports/GanttHeaderScaleItem.rb +42 -0
- data/lib/reports/GanttLine.rb +329 -0
- data/lib/reports/GanttLoadStack.rb +113 -0
- data/lib/reports/GanttMilestone.rb +80 -0
- data/lib/reports/GanttRouter.rb +375 -0
- data/lib/reports/GanttTaskBar.rb +95 -0
- data/lib/reports/HTMLGraphics.rb +65 -0
- data/lib/reports/Report.rb +344 -0
- data/lib/reports/ReportElement.rb +427 -0
- data/lib/reports/ReportTable.rb +144 -0
- data/lib/reports/ReportTableCell.rb +142 -0
- data/lib/reports/ReportTableColumn.rb +82 -0
- data/lib/reports/ReportTableElement.rb +852 -0
- data/lib/reports/ReportTableLegend.rb +167 -0
- data/lib/reports/ReportTableLine.rb +87 -0
- data/lib/reports/ResourceListRE.rb +72 -0
- data/lib/reports/TaskListRE.rb +73 -0
- data/lib/reports/TjpExportRE.rb +394 -0
- data/lib/taskjuggler3.rb +106 -0
- data/lib/tj3man.rb +88 -0
- data/manual/Day_To_Day_Juggling +168 -0
- data/manual/Getting_Started +61 -0
- data/manual/How_To_Contribute +185 -0
- data/manual/Installation +68 -0
- data/manual/Intro +102 -0
- data/manual/Reporting_Bugs +26 -0
- data/manual/Rich_Text_Attributes +90 -0
- data/manual/TaskJuggler_2x_Migration +40 -0
- data/manual/Tutorial +579 -0
- data/manual/fdl +450 -0
- data/prj_cfg.rb +43 -0
- data/setup.rb +1585 -0
- data/tasks/csts.rake +72 -0
- data/tasks/gem.rake +14 -0
- data/tasks/manual.rake +10 -0
- data/tasks/missing.rake +21 -0
- data/tasks/rcov.rake +14 -0
- data/tasks/rdoc.rake +17 -0
- data/tasks/rexml_fix.rb +16 -0
- data/tasks/rexml_fix_19.rb +49 -0
- data/tasks/show.rake +21 -0
- data/tasks/stats.rake +25 -0
- data/tasks/test.rake +11 -0
- data/test/MessageChecker.rb +53 -0
- data/test/TestSuite/CSV-Reports/celltext-Reference.csv +14 -0
- data/test/TestSuite/CSV-Reports/celltext.tjp +7 -0
- data/test/TestSuite/CSV-Reports/genrefs +6 -0
- data/test/TestSuite/CSV-Reports/project-1.tji +57 -0
- data/test/TestSuite/CSV-Reports/resourcereport-Reference.csv +4 -0
- data/test/TestSuite/CSV-Reports/resourcereport.tjp +10 -0
- data/test/TestSuite/CSV-Reports/resourcereport_with_tasks-Reference.csv +22 -0
- data/test/TestSuite/CSV-Reports/resourcereport_with_tasks.tjp +11 -0
- data/test/TestSuite/CSV-Reports/sortByTree-Reference.csv +14 -0
- data/test/TestSuite/CSV-Reports/sortByTree.tjp +8 -0
- data/test/TestSuite/CSV-Reports/sortBy_duration.down-Reference.csv +14 -0
- data/test/TestSuite/CSV-Reports/sortBy_duration.down.tjp +10 -0
- data/test/TestSuite/CSV-Reports/sortBy_effort.up-Reference.csv +14 -0
- data/test/TestSuite/CSV-Reports/sortBy_effort.up.tjp +10 -0
- data/test/TestSuite/CSV-Reports/sortBy_plan.start.down-Reference.csv +14 -0
- data/test/TestSuite/CSV-Reports/sortBy_plan.start.down.tjp +10 -0
- data/test/TestSuite/CSV-Reports/taskreport-Reference.csv +14 -0
- data/test/TestSuite/CSV-Reports/taskreport.tjp +10 -0
- data/test/TestSuite/CSV-Reports/taskreport_with_resources-Reference.csv +24 -0
- data/test/TestSuite/CSV-Reports/taskreport_with_resources.tjp +11 -0
- data/test/TestSuite/Scheduler/Correct/Allocate.tjp +86 -0
- data/test/TestSuite/Scheduler/Correct/AutomaticMilestones.tjp +63 -0
- data/test/TestSuite/Scheduler/Correct/Booking.tjp +161 -0
- data/test/TestSuite/Scheduler/Correct/Depends.tjp +50 -0
- data/test/TestSuite/Scheduler/Correct/Duration.tjp +34 -0
- data/test/TestSuite/Scheduler/Correct/InheritStartEnd.tjp +129 -0
- data/test/TestSuite/Scheduler/Correct/Limits.tjp +81 -0
- data/test/TestSuite/Scheduler/Correct/MultipleMandatories.tjp +43 -0
- data/test/TestSuite/Scheduler/Correct/Optimize-1.tjp +28 -0
- data/test/TestSuite/Scheduler/Correct/Optimize-2.tjp +33 -0
- data/test/TestSuite/Scheduler/Correct/Optimize-3.tjp +33 -0
- data/test/TestSuite/Scheduler/Correct/Optimize-4.tjp +34 -0
- data/test/TestSuite/Scheduler/Correct/Optimize-5.tjp +62 -0
- data/test/TestSuite/Scheduler/Correct/Precedes.tjp +50 -0
- data/test/TestSuite/Scheduler/Correct/Shift.tjp +102 -0
- data/test/TestSuite/Scheduler/Errors/account_no_leaf.tjp +13 -0
- data/test/TestSuite/Scheduler/Errors/booking_conflict.tjp +10 -0
- data/test/TestSuite/Scheduler/Errors/booking_no_duty.tjp +9 -0
- data/test/TestSuite/Scheduler/Errors/booking_on_vacation.tjp +9 -0
- data/test/TestSuite/Scheduler/Errors/container_booking.tjp +14 -0
- data/test/TestSuite/Scheduler/Errors/container_duration.tjp +11 -0
- data/test/TestSuite/Scheduler/Errors/effort_no_allocations.tjp +7 -0
- data/test/TestSuite/Scheduler/Errors/loop_detected_1.tjp +19 -0
- data/test/TestSuite/Scheduler/Errors/loop_detected_10.tjp +36 -0
- data/test/TestSuite/Scheduler/Errors/loop_detected_11.tjp +27 -0
- data/test/TestSuite/Scheduler/Errors/loop_detected_12.tjp +20 -0
- data/test/TestSuite/Scheduler/Errors/loop_detected_13.tjp +27 -0
- data/test/TestSuite/Scheduler/Errors/loop_detected_14.tjp +26 -0
- data/test/TestSuite/Scheduler/Errors/loop_detected_2.tjp +24 -0
- data/test/TestSuite/Scheduler/Errors/loop_detected_3.tjp +18 -0
- data/test/TestSuite/Scheduler/Errors/loop_detected_4.tjp +36 -0
- data/test/TestSuite/Scheduler/Errors/loop_detected_5.tjp +37 -0
- data/test/TestSuite/Scheduler/Errors/loop_detected_6.tjp +35 -0
- data/test/TestSuite/Scheduler/Errors/loop_detected_7.tjp +46 -0
- data/test/TestSuite/Scheduler/Errors/loop_detected_8.tjp +51 -0
- data/test/TestSuite/Scheduler/Errors/loop_detected_9.tjp +20 -0
- data/test/TestSuite/Scheduler/Errors/maxend.tjp +8 -0
- data/test/TestSuite/Scheduler/Errors/maxstart.tjp +8 -0
- data/test/TestSuite/Scheduler/Errors/milestone_booking.tjp +10 -0
- data/test/TestSuite/Scheduler/Errors/milestone_duration.tjp +8 -0
- data/test/TestSuite/Scheduler/Errors/milestone_start_end.tjp +8 -0
- data/test/TestSuite/Scheduler/Errors/minend.tjp +8 -0
- data/test/TestSuite/Scheduler/Errors/minstart.tjp +8 -0
- data/test/TestSuite/Scheduler/Errors/multiple_durations.tjp +11 -0
- data/test/TestSuite/Scheduler/Errors/no_tasks.tjp +6 -0
- data/test/TestSuite/Scheduler/Errors/not_scheduled.tjp +8 -0
- data/test/TestSuite/Scheduler/Errors/task_depend_child.tjp +10 -0
- data/test/TestSuite/Scheduler/Errors/task_depend_multi.tjp +13 -0
- data/test/TestSuite/Scheduler/Errors/task_depend_parent.tjp +11 -0
- data/test/TestSuite/Scheduler/Errors/task_depend_self.tjp +10 -0
- data/test/TestSuite/Scheduler/Errors/task_depend_unknown.tjp +10 -0
- data/test/TestSuite/Scheduler/Errors/task_overspecified_1.tjp +9 -0
- data/test/TestSuite/Scheduler/Errors/task_overspecified_2.tjp +14 -0
- data/test/TestSuite/Scheduler/Errors/task_overspecified_3.tjp +14 -0
- data/test/TestSuite/Scheduler/Errors/task_underspecified_1.tjp +8 -0
- data/test/TestSuite/Scheduler/Errors/task_underspecified_2.tjp +8 -0
- data/test/TestSuite/Scheduler/Errors/task_underspecified_3.tjp +9 -0
- data/test/TestSuite/Syntax/Correct/Account.tjp +53 -0
- data/test/TestSuite/Syntax/Correct/Allocate-1.tjp +24 -0
- data/test/TestSuite/Syntax/Correct/Alternative.tjp +13 -0
- data/test/TestSuite/Syntax/Correct/AutoMacros.tjp +14 -0
- data/test/TestSuite/Syntax/Correct/Booking.tjp +26 -0
- data/test/TestSuite/Syntax/Correct/Caption.tjp +33 -0
- data/test/TestSuite/Syntax/Correct/Celltext.tjp +28 -0
- data/test/TestSuite/Syntax/Correct/Comments.tjp +29 -0
- data/test/TestSuite/Syntax/Correct/Complete.tjp +16 -0
- data/test/TestSuite/Syntax/Correct/CompletedWork.tji +20 -0
- data/test/TestSuite/Syntax/Correct/CriticalPath.tjp +31 -0
- data/test/TestSuite/Syntax/Correct/Currencyformat.tjp +12 -0
- data/test/TestSuite/Syntax/Correct/CustomAttributes.tjp +14 -0
- data/test/TestSuite/Syntax/Correct/Depends1.tjp +22 -0
- data/test/TestSuite/Syntax/Correct/Durations.tjp +29 -0
- data/test/TestSuite/Syntax/Correct/Efficiency.tjp +19 -0
- data/test/TestSuite/Syntax/Correct/Export.tjp +40 -0
- data/test/TestSuite/Syntax/Correct/Flags.tjp +32 -0
- data/test/TestSuite/Syntax/Correct/Freeze.tjp +28 -0
- data/test/TestSuite/Syntax/Correct/Gap.tjp +15 -0
- data/test/TestSuite/Syntax/Correct/HtmlTaskReport.tjp +33 -0
- data/test/TestSuite/Syntax/Correct/Limits-1.tjp +71 -0
- data/test/TestSuite/Syntax/Correct/LoadUnits.tjp +31 -0
- data/test/TestSuite/Syntax/Correct/Macro-1.tjp +19 -0
- data/test/TestSuite/Syntax/Correct/Mandatory.tjp +17 -0
- data/test/TestSuite/Syntax/Correct/Milestone.tjp +12 -0
- data/test/TestSuite/Syntax/Correct/MinMax.tjp +17 -0
- data/test/TestSuite/Syntax/Correct/Numberformat.tjp +12 -0
- data/test/TestSuite/Syntax/Correct/Period.tjp +16 -0
- data/test/TestSuite/Syntax/Correct/Persistent.tjp +11 -0
- data/test/TestSuite/Syntax/Correct/Precedes1.tjp +17 -0
- data/test/TestSuite/Syntax/Correct/Priority.tjp +30 -0
- data/test/TestSuite/Syntax/Correct/Project.tjp +21 -0
- data/test/TestSuite/Syntax/Correct/ProjectIDs.tjp +23 -0
- data/test/TestSuite/Syntax/Correct/RawHTML.tjp +29 -0
- data/test/TestSuite/Syntax/Correct/Reports.tjp +54 -0
- data/test/TestSuite/Syntax/Correct/Resource.tjp +20 -0
- data/test/TestSuite/Syntax/Correct/Responsible.tjp +16 -0
- data/test/TestSuite/Syntax/Correct/Scenario.tjp +15 -0
- data/test/TestSuite/Syntax/Correct/Scheduling.tjp +26 -0
- data/test/TestSuite/Syntax/Correct/Select.tjp +27 -0
- data/test/TestSuite/Syntax/Correct/Shift.tjp +55 -0
- data/test/TestSuite/Syntax/Correct/Simple.tjp +25 -0
- data/test/TestSuite/Syntax/Correct/String.tjp +12 -0
- data/test/TestSuite/Syntax/Correct/Supplement.tjp +24 -0
- data/test/TestSuite/Syntax/Correct/TaskRoot.tjp +34 -0
- data/test/TestSuite/Syntax/Correct/TimeFrame.tjp +19 -0
- data/test/TestSuite/Syntax/Correct/Timezone.tjp +8 -0
- data/test/TestSuite/Syntax/Correct/Vacation.tjp +33 -0
- data/test/TestSuite/Syntax/Correct/csvtest +16 -0
- data/test/TestSuite/Syntax/Correct/manual2example.rb +24 -0
- data/test/TestSuite/Syntax/Correct/tutorial.tjp +485 -0
- data/test/TestSuite/Syntax/Errors/bad_include.tjp +11 -0
- data/test/TestSuite/Syntax/Errors/booking_group.tjp +14 -0
- data/test/TestSuite/Syntax/Errors/booking_milestone.tjp +13 -0
- data/test/TestSuite/Syntax/Errors/booking_no_leaf.tjp +13 -0
- data/test/TestSuite/Syntax/Errors/chargeset.tjp +14 -0
- data/test/TestSuite/Syntax/Errors/chargeset_master.tjp +15 -0
- data/test/TestSuite/Syntax/Errors/container_attribute.tjp +13 -0
- data/test/TestSuite/Syntax/Errors/cost_acct_no_top.tjp +24 -0
- data/test/TestSuite/Syntax/Errors/cost_rev_same.tjp +24 -0
- data/test/TestSuite/Syntax/Errors/date_in_range.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/effort_zero.tjp +8 -0
- data/test/TestSuite/Syntax/Errors/empty.tjp +1 -0
- data/test/TestSuite/Syntax/Errors/export_bad_extn.tjp +9 -0
- data/test/TestSuite/Syntax/Errors/extend_id_cap.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/interval_end_in_range.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/interval_start_in_range.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/leaf_resource_id_expected.tjp +12 -0
- data/test/TestSuite/Syntax/Errors/misaligned_date.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/no_csv_suffix.tjp +10 -0
- data/test/TestSuite/Syntax/Errors/no_html_suffix.tjp +10 -0
- data/test/TestSuite/Syntax/Errors/operand_attribute.tjp +11 -0
- data/test/TestSuite/Syntax/Errors/operand_unkn_flag.tjp +11 -0
- data/test/TestSuite/Syntax/Errors/operand_unkn_scen.tjp +11 -0
- data/test/TestSuite/Syntax/Errors/overtime_range.tjp +13 -0
- data/test/TestSuite/Syntax/Errors/purge_no_list.tjp +8 -0
- data/test/TestSuite/Syntax/Errors/purge_unknown_id.tjp +8 -0
- data/test/TestSuite/Syntax/Errors/report_end.tjp +10 -0
- data/test/TestSuite/Syntax/Errors/report_redifinition.tjp +10 -0
- data/test/TestSuite/Syntax/Errors/report_start.tjp +10 -0
- data/test/TestSuite/Syntax/Errors/resource_exists.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/resource_id_expected.tjp +8 -0
- data/test/TestSuite/Syntax/Errors/rev_acct_no_top.tjp +24 -0
- data/test/TestSuite/Syntax/Errors/scenario_exists.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/shift_assignment_overlap.tjp +15 -0
- data/test/TestSuite/Syntax/Errors/shift_exists.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/shift_id_expected.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/sloppy_range.tjp +13 -0
- data/test/TestSuite/Syntax/Errors/sort_direction.tjp +11 -0
- data/test/TestSuite/Syntax/Errors/sort_unknown_scen.tjp +11 -0
- data/test/TestSuite/Syntax/Errors/sorting_crit_exptd1.tjp +11 -0
- data/test/TestSuite/Syntax/Errors/sorting_crit_exptd2.tjp +11 -0
- data/test/TestSuite/Syntax/Errors/sorting_wbs.tjp +11 -0
- data/test/TestSuite/Syntax/Errors/start_before_end1.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/start_before_end2.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/task_complete.tjp +8 -0
- data/test/TestSuite/Syntax/Errors/task_exists.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/task_priority.tjp +8 -0
- data/test/TestSuite/Syntax/Errors/task_without_chargeset.tjp +9 -0
- data/test/TestSuite/Syntax/Errors/time_interval.tjp +12 -0
- data/test/TestSuite/Syntax/Errors/too_many_bangs.tjp +10 -0
- data/test/TestSuite/Syntax/Errors/undecl_flag.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/unknown_projectid.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/unknown_scenario_id.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/unknown_scenario_idx.tjp +11 -0
- data/test/TestSuite/Syntax/Errors/unknown_task.tjp +10 -0
- data/test/all.rb +31 -0
- data/test/test_BatchProcessor.rb +54 -0
- data/test/test_CSV-Reports.rb +101 -0
- data/test/test_Limits.rb +104 -0
- data/test/test_LogicalExpression.rb +110 -0
- data/test/test_MacroTable.rb +51 -0
- data/test/test_Project.rb +57 -0
- data/test/test_PropertySet.rb +71 -0
- data/test/test_Query.rb +83 -0
- data/test/test_RealFormat.rb +83 -0
- data/test/test_RichText.rb +869 -0
- data/test/test_Scheduler.rb +42 -0
- data/test/test_ShiftAssignments.rb +77 -0
- data/test/test_Syntax.rb +41 -0
- data/test/test_TextScanner.rb +95 -0
- data/test/test_TjTime.rb +114 -0
- data/test/test_TjpExample.rb +169 -0
- data/test/test_UTF8String.rb +84 -0
- data/test/test_WorkingHours.rb +56 -0
- metadata +649 -0
@@ -0,0 +1,95 @@
|
|
1
|
+
#!/usr/bin/env ruby -w
|
2
|
+
# encoding: UTF-8
|
3
|
+
#
|
4
|
+
# = GanttTaskBar.rb -- The TaskJuggler III Project Management Software
|
5
|
+
#
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009 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 'reports/HTMLGraphics'
|
14
|
+
|
15
|
+
class TaskJuggler
|
16
|
+
|
17
|
+
# The GanttTaskBar represents a normal task that is part of a GanttChart.
|
18
|
+
class GanttTaskBar
|
19
|
+
|
20
|
+
include HTMLGraphics
|
21
|
+
|
22
|
+
# The size of the bar in pixels from center to top/bottom.
|
23
|
+
@@size = 6
|
24
|
+
|
25
|
+
# Create a GanttContainer object based on the following information: _line_
|
26
|
+
# is a reference to the GanttLine. _xStart_ is the left edge of the task in
|
27
|
+
# chart coordinates. _xEnd_ is the right edge.
|
28
|
+
def initialize(task, scenarioIdx, lineHeight, xStart, xEnd, y)
|
29
|
+
@task = task
|
30
|
+
@scenarioIdx = scenarioIdx
|
31
|
+
@lineHeight = lineHeight
|
32
|
+
@start = xStart
|
33
|
+
@end = xEnd
|
34
|
+
@y = y
|
35
|
+
end
|
36
|
+
|
37
|
+
# Return the point [ x, y ] where task start dependency lines should start
|
38
|
+
# from.
|
39
|
+
def startDepLineStart
|
40
|
+
[ @start + 1, @y + @lineHeight / 2 ]
|
41
|
+
end
|
42
|
+
|
43
|
+
# Return the point [ x, y ] where task start dependency lines should end at.
|
44
|
+
def startDepLineEnd
|
45
|
+
[ @start - 1, @y + @lineHeight / 2 ]
|
46
|
+
end
|
47
|
+
|
48
|
+
# Return the point [ x, y ] where task end dependency lines should start
|
49
|
+
# from.
|
50
|
+
def endDepLineStart
|
51
|
+
[ @end + 1, @y + @lineHeight / 2 ]
|
52
|
+
end
|
53
|
+
|
54
|
+
# Return the point [ x, y ] where task end dependency lines should end at.
|
55
|
+
def endDepLineEnd
|
56
|
+
[ @end - 1, @y + @lineHeight / 2 ]
|
57
|
+
end
|
58
|
+
|
59
|
+
def addBlockedZones(router)
|
60
|
+
# Horizontal block for whole bar.
|
61
|
+
router.addZone(@start, @y + (@lineHeight / 2) - @@size - 1,
|
62
|
+
@end - @start + 1, 2 * @@size + 3, true, false)
|
63
|
+
# Block for arrowhead.
|
64
|
+
router.addZone(@start - 9, @y + (@lineHeight / 2) - 7, 10, 15, true, true)
|
65
|
+
# Vertical block for end cap
|
66
|
+
router.addZone(@start - 2, @y, 5, @lineHeight,
|
67
|
+
false, true)
|
68
|
+
router.addZone(@end - 2, @y, 5, @lineHeight, false, true)
|
69
|
+
end
|
70
|
+
|
71
|
+
# Convert the abstact representation of the GanttTaskBar into HTML
|
72
|
+
# elements.
|
73
|
+
def to_html
|
74
|
+
xStart = @start.to_i
|
75
|
+
yCenter = (@lineHeight / 2).to_i
|
76
|
+
width = @end.to_i - @start.to_i + 1
|
77
|
+
|
78
|
+
html = []
|
79
|
+
|
80
|
+
# First we draw the task frame.
|
81
|
+
html << rectToHTML(xStart, yCenter - @@size, width, 2 * @@size,
|
82
|
+
'taskbarframe')
|
83
|
+
# The we draw the filling.
|
84
|
+
html << rectToHTML(xStart + 1, yCenter - @@size + 1, width - 2,
|
85
|
+
2 * @@size - 2, 'taskbar')
|
86
|
+
# And then the progress bar. If task is null we assume 50% completion.
|
87
|
+
completion = @task ? @task['complete', @scenarioIdx] / 100 : 0.5
|
88
|
+
html << rectToHTML(xStart + 1, yCenter - @@size / 2,
|
89
|
+
(width - 2) * completion, @@size, 'progressbar')
|
90
|
+
end
|
91
|
+
|
92
|
+
end
|
93
|
+
|
94
|
+
end
|
95
|
+
|
@@ -0,0 +1,65 @@
|
|
1
|
+
#!/usr/bin/env ruby -w
|
2
|
+
# encoding: UTF-8
|
3
|
+
#
|
4
|
+
# = HTMLGraphics.rb -- The TaskJuggler III Project Management Software
|
5
|
+
#
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009 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
|
+
class TaskJuggler
|
14
|
+
|
15
|
+
# This module provides some functions to render simple graphical objects like
|
16
|
+
# filled rectangles and lines as HTML elements.
|
17
|
+
module HTMLGraphics
|
18
|
+
|
19
|
+
# Render a line as HTML element. We use 'div's with a single pixel width or
|
20
|
+
# height for this purpose. As a consequence of this, we can only generate
|
21
|
+
# horizontal or vertical lines. Diagonal lines are not supported. _xs_ and
|
22
|
+
# _ys_ are the start coordinates, _xe_ and _ye_ are the end coordinates.
|
23
|
+
# _category_ determines the color.
|
24
|
+
def lineToHTML(xs, ys, xe, ye, category)
|
25
|
+
xs = xs.to_i
|
26
|
+
ys = ys.to_i
|
27
|
+
xe = xe.to_i
|
28
|
+
ye = ye.to_i
|
29
|
+
if ys == ye
|
30
|
+
# Horizontal line
|
31
|
+
xs, xe = xe, xs if xe < xs
|
32
|
+
style = "left:#{xs}px; top:#{ys}px; " +
|
33
|
+
"width:#{xe - xs + 1}px; height:1px;"
|
34
|
+
elsif xs == xe
|
35
|
+
# Vertical line
|
36
|
+
ys, ye = ye, ys if ye < ys
|
37
|
+
style = "left:#{xs}px; top:#{ys}px; " +
|
38
|
+
"width:1px; height:#{ye - ys + 1}px;"
|
39
|
+
else
|
40
|
+
raise "Can't draw diagonal line #{xs}/#{ys} to #{xe}/#{ye}!"
|
41
|
+
end
|
42
|
+
div = XMLElement.new('div', 'class' => category, 'style' => style)
|
43
|
+
div.mayNotBeEmpty = true
|
44
|
+
|
45
|
+
div
|
46
|
+
end
|
47
|
+
|
48
|
+
# Draw a filled rectable at position _x_ and _y_ with the dimension _w_ and
|
49
|
+
# _h_ into another HTML element. The color is determined by the class
|
50
|
+
# _category_.
|
51
|
+
def rectToHTML(x, y, w, h, category)
|
52
|
+
style = "left:#{x.to_i}px; top:#{y.to_i}px; " +
|
53
|
+
"width:#{w.to_i}px; height:#{h.to_i}px;"
|
54
|
+
div = XMLElement.new('div', 'class' => category, 'style' => style)
|
55
|
+
# Most browsers don't like the <div/> notation. So we need to make sure we
|
56
|
+
# generate <div></div> sequences.
|
57
|
+
div.mayNotBeEmpty = true
|
58
|
+
|
59
|
+
div
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
|
@@ -0,0 +1,344 @@
|
|
1
|
+
#!/usr/bin/env ruby -w
|
2
|
+
# encoding: UTF-8
|
3
|
+
#
|
4
|
+
# = Report.rb -- The TaskJuggler III Project Management Software
|
5
|
+
#
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009 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 'reports/ReportElement'
|
14
|
+
require 'reports/TaskListRE'
|
15
|
+
require 'reports/ResourceListRE'
|
16
|
+
require 'reports/TjpExportRE'
|
17
|
+
require 'reports/CSVFile'
|
18
|
+
require 'HTMLDocument'
|
19
|
+
|
20
|
+
class TaskJuggler
|
21
|
+
|
22
|
+
# The Report class holds the fundamental description and functionality to turn
|
23
|
+
# the scheduled project into a user readable form. A report consists of one or
|
24
|
+
# more ReportElement objects and some attributes that are global to all
|
25
|
+
# elements.
|
26
|
+
class Report
|
27
|
+
|
28
|
+
attr_reader :name, :project, :start, :end, :userDefinedPeriod,
|
29
|
+
:sourceFileInfo
|
30
|
+
attr_accessor :costAccount, :currencyformat, :loadUnit, :now,
|
31
|
+
:numberformat, :resourceRoot, :revenueAccount,
|
32
|
+
:shorttimeformat, :taskRoot, :timeformat, :timezone,
|
33
|
+
:weekstartsmonday
|
34
|
+
|
35
|
+
# Create a new report object.
|
36
|
+
def initialize(project, name, format, sourceFileInfo)
|
37
|
+
@project = project
|
38
|
+
@name = name
|
39
|
+
@project.addReport(self)
|
40
|
+
@outputFormats = [ format ]
|
41
|
+
@sourceFileInfo = sourceFileInfo
|
42
|
+
|
43
|
+
# The following attributes determine the content and look of the report.
|
44
|
+
@costAccount = @project['costAccount']
|
45
|
+
@currencyformat = @project['currencyformat']
|
46
|
+
@loadUnit = @project['loadunit']
|
47
|
+
@end = @project['end']
|
48
|
+
@now = @project['now']
|
49
|
+
@numberformat = @project['numberformat']
|
50
|
+
@resourceRoot = nil
|
51
|
+
@revenueAccount = @project['revenueAccount']
|
52
|
+
@shorttimeformat = @project['shorttimeformat']
|
53
|
+
@start = @project['start']
|
54
|
+
@taskRoot = nil
|
55
|
+
@timeformat = @project['timeformat']
|
56
|
+
@timezone = @project['timezone']
|
57
|
+
@userDefinedPeriod = false
|
58
|
+
@weekstartsmonday = @project['weekstartsmonday']
|
59
|
+
|
60
|
+
@elements = []
|
61
|
+
end
|
62
|
+
|
63
|
+
# Set the start _date_ of the report period and mark it as user defined.
|
64
|
+
def start=(date)
|
65
|
+
@start = date
|
66
|
+
@userDefinedPeriod = true
|
67
|
+
end
|
68
|
+
|
69
|
+
# Set the end _date_ of the report period and mark it as user defined.
|
70
|
+
def end=(date)
|
71
|
+
@end = date
|
72
|
+
@userDefinedPeriod = true
|
73
|
+
end
|
74
|
+
|
75
|
+
# Add new ouput format request.
|
76
|
+
def addFormat(format)
|
77
|
+
@outputFormats << format
|
78
|
+
end
|
79
|
+
|
80
|
+
# The generate function is where the action happens in this class. The
|
81
|
+
# report defined by all the class attributes and report elements is
|
82
|
+
# generated according the the requested output format(s).
|
83
|
+
def generate
|
84
|
+
begin
|
85
|
+
# Most output format can be generated from a common intermediate
|
86
|
+
# representation of the elements. We generate that IR first.
|
87
|
+
@elements.each do |element|
|
88
|
+
element.generateIntermediateFormat
|
89
|
+
end
|
90
|
+
|
91
|
+
# Then generate the actual output format.
|
92
|
+
@outputFormats.each do |format|
|
93
|
+
case format
|
94
|
+
when :html
|
95
|
+
generateHTML
|
96
|
+
when :csv
|
97
|
+
generateCSV
|
98
|
+
when :export
|
99
|
+
generateExport
|
100
|
+
when :gui
|
101
|
+
# TODO: Find a way to hook up the GUI here.
|
102
|
+
else
|
103
|
+
raise 'Unknown report output format.'
|
104
|
+
end
|
105
|
+
end
|
106
|
+
rescue TjException
|
107
|
+
@project.messageHandler.send(Message.new('reporting_failed', 'error',
|
108
|
+
$!.message, nil, nil,
|
109
|
+
@sourceFileInfo))
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
# This function should only be called within the library. It's not a user
|
114
|
+
# callable function.
|
115
|
+
def addElement(element) # :nodoc:
|
116
|
+
@elements << element
|
117
|
+
end
|
118
|
+
|
119
|
+
private
|
120
|
+
|
121
|
+
# Generate an HTML version of the report.
|
122
|
+
def generateHTML
|
123
|
+
html = HTMLDocument.new(:transitional)
|
124
|
+
html << (head = XMLElement.new('head'))
|
125
|
+
head << XMLNamedText.new("TaskJuggler Report - #{@name}", 'title')
|
126
|
+
head << XMLElement.new('meta', 'http-equiv' => 'Content-Style-Type',
|
127
|
+
'content' => 'text/css; charset=utf-8')
|
128
|
+
head << (style = XMLElement.new('style', 'type' => 'text/css'))
|
129
|
+
style << XMLBlob.new(<<'EOT'
|
130
|
+
body {
|
131
|
+
font-family:Bitstream Vera Sans, Tahoma, sans-serif;
|
132
|
+
font-size:15px;
|
133
|
+
}
|
134
|
+
h1, h2, table, tr, td, div, span {
|
135
|
+
font-family: Bitstream Vera Sans, Tahoma, sans-serif;
|
136
|
+
}
|
137
|
+
table {
|
138
|
+
font-size:13px;
|
139
|
+
}
|
140
|
+
td, div { white-space:nowrap; padding:0px; margin:0px; }
|
141
|
+
h1 { font-size:22px; }
|
142
|
+
h2 { font-size:18px; }
|
143
|
+
h3 { font-size:16px; }
|
144
|
+
|
145
|
+
.tabback { background-color:#9a9a9a; }
|
146
|
+
.tabfront { background-color:#d4dde6; }
|
147
|
+
.tabhead {
|
148
|
+
white-space:nowrap;
|
149
|
+
background-color:#7a7a7a;
|
150
|
+
color:#ffffff;
|
151
|
+
text-align:center;
|
152
|
+
}
|
153
|
+
.tabhead_offduty {
|
154
|
+
white-space:nowrap;
|
155
|
+
background-color:#dde375;
|
156
|
+
color:#000000;
|
157
|
+
}
|
158
|
+
.tabfooter {
|
159
|
+
white-space:nowrap;
|
160
|
+
background-color:#9a9a9a;
|
161
|
+
color:#ffffff;
|
162
|
+
text-align:center;
|
163
|
+
}
|
164
|
+
.headercelldiv {
|
165
|
+
padding-top:1px;
|
166
|
+
padding-right:3px;
|
167
|
+
padding-left:3px;
|
168
|
+
padding-bottom:0px;
|
169
|
+
white-space:nowrap;
|
170
|
+
overflow:auto;
|
171
|
+
}
|
172
|
+
.celldiv {
|
173
|
+
padding-top:3px;
|
174
|
+
padding-right:3px;
|
175
|
+
padding-left:3px;
|
176
|
+
padding-bottom:0px;
|
177
|
+
white-space:nowrap;
|
178
|
+
overflow:auto;
|
179
|
+
}
|
180
|
+
.tabline { color:#000000 }
|
181
|
+
.tabcell {
|
182
|
+
white-space:nowrap;
|
183
|
+
padding:0px;
|
184
|
+
}
|
185
|
+
.taskcell1 {
|
186
|
+
background-color:#ebf2ff;
|
187
|
+
white-space:nowrap;
|
188
|
+
padding:0px;
|
189
|
+
}
|
190
|
+
.taskcell2 {
|
191
|
+
background-color:#d9dfeb;
|
192
|
+
white-space:nowrap;
|
193
|
+
padding:0px;
|
194
|
+
}
|
195
|
+
.resourcecell1 {
|
196
|
+
background-color:#fff2eb;
|
197
|
+
white-space:nowrap;
|
198
|
+
padding:0px;
|
199
|
+
}
|
200
|
+
.resourcecell2 {
|
201
|
+
background-color:#ebdfd9;
|
202
|
+
white-space:nowrap;
|
203
|
+
padding:0px;
|
204
|
+
}
|
205
|
+
.busy1 { background-color:#ff3b3b; }
|
206
|
+
.busy2 { background-color:#eb4545; }
|
207
|
+
.loaded1 { background-color:#ff9b9b; }
|
208
|
+
.loaded2 { background-color:#eb8f8f; }
|
209
|
+
.free1 { background-color:#a5ffb4; }
|
210
|
+
.free2 { background-color:#98eba6; }
|
211
|
+
.offduty1 { background-color:#f3f990; }
|
212
|
+
.offduty2 { background-color:#dde375; }
|
213
|
+
.calconttask1 { background-color:#abbeae; }
|
214
|
+
.calconttask2 { background-color:#99aa9c; }
|
215
|
+
.caltask1 { background-color:#2050e5; }
|
216
|
+
.caltask2 { background-color:#2f57ea; }
|
217
|
+
.todo1 { background-color:#beabab; }
|
218
|
+
.todo2 { background-color:#aa9999; }
|
219
|
+
|
220
|
+
.tabvline {
|
221
|
+
background-color:#9a9a9a;
|
222
|
+
position:absolute;
|
223
|
+
}
|
224
|
+
.containerbar {
|
225
|
+
background-color:#09090a;
|
226
|
+
position:absolute;
|
227
|
+
}
|
228
|
+
.taskbarframe {
|
229
|
+
background-color:#09090a;
|
230
|
+
position:absolute;
|
231
|
+
}
|
232
|
+
.taskbar {
|
233
|
+
background-color:#2f57ea;
|
234
|
+
position:absolute;
|
235
|
+
}
|
236
|
+
.progressbar {
|
237
|
+
background-color:#36363f;
|
238
|
+
position:absolute;
|
239
|
+
}
|
240
|
+
.milestone {
|
241
|
+
background-color:#09090a;
|
242
|
+
position:absolute;
|
243
|
+
}
|
244
|
+
.loadstackframe {
|
245
|
+
background-color:#452a2a;
|
246
|
+
position:absolute;
|
247
|
+
}
|
248
|
+
.free {
|
249
|
+
background-color:#a5ffb4;
|
250
|
+
position:absolute;
|
251
|
+
}
|
252
|
+
.busy {
|
253
|
+
background-color:#ff9b9b;
|
254
|
+
position:absolute;
|
255
|
+
}
|
256
|
+
.assigned {
|
257
|
+
background-color:#ff3b3b;
|
258
|
+
position:absolute;
|
259
|
+
}
|
260
|
+
.offduty {
|
261
|
+
background-color:#f3f990;
|
262
|
+
white-space:nowrap;
|
263
|
+
position:absolute;
|
264
|
+
}
|
265
|
+
.depline {
|
266
|
+
background-color:#000000;
|
267
|
+
position:absolute;
|
268
|
+
}
|
269
|
+
.nowline {
|
270
|
+
background-color:#EE0000;
|
271
|
+
position:absolute;
|
272
|
+
}
|
273
|
+
.white {
|
274
|
+
background-color:#FFFFFF;
|
275
|
+
position:absolute;
|
276
|
+
}
|
277
|
+
|
278
|
+
.legendback { background-color:#d4dde6; }
|
279
|
+
.caption {
|
280
|
+
padding: 5px 13px 5px 13px;
|
281
|
+
background-color:#ebf2ff;
|
282
|
+
white-space:normal;
|
283
|
+
font-size:13px
|
284
|
+
}
|
285
|
+
EOT
|
286
|
+
)
|
287
|
+
html << (body = XMLElement.new('body'))
|
288
|
+
|
289
|
+
@elements.each do |element|
|
290
|
+
body << element.to_html
|
291
|
+
end
|
292
|
+
|
293
|
+
html.write(@name + '.html')
|
294
|
+
end
|
295
|
+
|
296
|
+
# Generate a CSV version of the report.
|
297
|
+
def generateCSV
|
298
|
+
# CSV format can only handle the first element.
|
299
|
+
csv = @elements[0].to_csv
|
300
|
+
# Expand nested tables into the outer table.
|
301
|
+
columnIdx = 0
|
302
|
+
while columnIdx < csv[0].length do
|
303
|
+
if csv[0][columnIdx].is_a?(Array)
|
304
|
+
# We've found a nested table.
|
305
|
+
nestedTable = csv[0][columnIdx]
|
306
|
+
# The nested table must have exactly as many lines as the outer table.
|
307
|
+
if csv.length != nestedTable.length
|
308
|
+
raise "Table size mismatch"
|
309
|
+
end
|
310
|
+
# Insert the nested table into the lines of the outer table.
|
311
|
+
csv.each do |line|
|
312
|
+
lineIdx = csv.index(line)
|
313
|
+
if lineIdx == 0
|
314
|
+
# The header cell can be reused.
|
315
|
+
line[columnIdx] = nestedTable[lineIdx]
|
316
|
+
else
|
317
|
+
# For normal lines we have no cells for the table. Just inject
|
318
|
+
# them.
|
319
|
+
line.insert(columnIdx, nestedTable[lineIdx])
|
320
|
+
end
|
321
|
+
# Make sure there are no more Arrays nested into the line.
|
322
|
+
line.flatten!
|
323
|
+
end
|
324
|
+
else
|
325
|
+
columnIdx += 1
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
329
|
+
# Use the CSVFile class to write the Array of Arrays to a colon
|
330
|
+
# separated file. Write to $stdout if the filename was set to '.'.
|
331
|
+
CSVFile.new(csv, ';').write(@name)
|
332
|
+
end
|
333
|
+
|
334
|
+
# Generate an export report
|
335
|
+
def generateExport
|
336
|
+
extension = @elements[0].mainFile ? 'tjp' : 'tji'
|
337
|
+
f = @name == '.' ? $stdout : File.new(@name + '.' + extension, 'w')
|
338
|
+
f.puts "#{@elements[0].to_tjp}"
|
339
|
+
end
|
340
|
+
|
341
|
+
end
|
342
|
+
|
343
|
+
end
|
344
|
+
|