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,107 @@
|
|
1
|
+
#!/usr/bin/env ruby -w
|
2
|
+
# encoding: UTF-8
|
3
|
+
#
|
4
|
+
# = GanttContainer.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 GanttContainer represents a container task (task with sub-tasks).
|
18
|
+
class GanttContainer
|
19
|
+
|
20
|
+
include HTMLGraphics
|
21
|
+
|
22
|
+
# The size of the bars in pixels from center to top/bottom.
|
23
|
+
@@size = 5
|
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. The container extends over
|
28
|
+
# the edges due to the shape of the jags.
|
29
|
+
def initialize(task, scenarioIdx, lineHeight, xStart, xEnd, y)
|
30
|
+
@task = task
|
31
|
+
@scenarioIdx = scenarioIdx
|
32
|
+
@lineHeight = lineHeight
|
33
|
+
@start = xStart
|
34
|
+
@end = xEnd
|
35
|
+
@y = y
|
36
|
+
end
|
37
|
+
|
38
|
+
# Return the point [ x, y ] where task start dependency lines should start
|
39
|
+
# from.
|
40
|
+
def startDepLineStart
|
41
|
+
[ @start, @y + @lineHeight / 2 ]
|
42
|
+
end
|
43
|
+
|
44
|
+
# Return the point [ x, y ] where task start dependency lines should end at.
|
45
|
+
def startDepLineEnd
|
46
|
+
[ @start - @@size, @y + @lineHeight / 2 ]
|
47
|
+
end
|
48
|
+
|
49
|
+
# Return the point [ x, y ] where task end dependency lines should start
|
50
|
+
# from.
|
51
|
+
def endDepLineStart
|
52
|
+
[ @end + @@size, @y + @lineHeight / 2 ]
|
53
|
+
end
|
54
|
+
|
55
|
+
# Return the point [ x, y ] where task end dependency lines should end at.
|
56
|
+
def endDepLineEnd
|
57
|
+
[ @end, @y + @lineHeight / 2 ]
|
58
|
+
end
|
59
|
+
|
60
|
+
def addBlockedZones(router)
|
61
|
+
height = (@lineHeight / 2) - @@size
|
62
|
+
# Horizontal block
|
63
|
+
router.addZone(@start - @@size, @y + (@lineHeight / 2) - @@size - 2,
|
64
|
+
@end - @start + 1 + 2 * @@size, 2 * @@size + 5, true, false)
|
65
|
+
# Block for arrowhead.
|
66
|
+
router.addZone(@start - @@size - 9, @y + (@lineHeight / 2) - 7, 10, 15,
|
67
|
+
true, true)
|
68
|
+
# Vertical block for end cap
|
69
|
+
router.addZone(@start - @@size - 2, @y, 2 * @@size + 5, @lineHeight,
|
70
|
+
false, true)
|
71
|
+
router.addZone(@end - @@size - 2, @y, 2 * @@size + 5, @lineHeight,
|
72
|
+
false, true)
|
73
|
+
end
|
74
|
+
|
75
|
+
# Convert the abstact representation of the GanttContainer into HTML
|
76
|
+
# elements.
|
77
|
+
def to_html
|
78
|
+
xStart = @start.to_i
|
79
|
+
yCenter = (@lineHeight / 2).to_i
|
80
|
+
width = @end.to_i - @start.to_i + 1
|
81
|
+
|
82
|
+
html = []
|
83
|
+
|
84
|
+
# If the container is too small we make it wider so it is recognizeable.
|
85
|
+
xStart -= (@@size + 1) - (width / 2) if width < 2
|
86
|
+
|
87
|
+
# The bar
|
88
|
+
html << rectToHTML(xStart - @@size, yCenter - @@size,
|
89
|
+
width + 2 * @@size, @@size, 'containerbar')
|
90
|
+
# The left jag
|
91
|
+
(@@size + 1).times do |i|
|
92
|
+
html << rectToHTML(xStart - @@size + i, yCenter + i,
|
93
|
+
1 + (@@size - i) * 2, 1, 'containerbar')
|
94
|
+
end
|
95
|
+
# The right jag
|
96
|
+
(@@size + 1).times do |i|
|
97
|
+
html << rectToHTML(xStart + width - 1 - @@size + i, yCenter + i,
|
98
|
+
1 + (@@size - i) * 2, 1, 'containerbar')
|
99
|
+
end
|
100
|
+
|
101
|
+
html
|
102
|
+
end
|
103
|
+
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
107
|
+
|
@@ -0,0 +1,141 @@
|
|
1
|
+
#!/usr/bin/env ruby -w
|
2
|
+
# encoding: UTF-8
|
3
|
+
#
|
4
|
+
# = GanttHeader.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/GanttHeaderScaleItem'
|
14
|
+
|
15
|
+
class TaskJuggler
|
16
|
+
|
17
|
+
# This class stores output format independent information to describe a
|
18
|
+
# GanttChart header. A Gantt chart header consists of 2 lines. The top line
|
19
|
+
# holds the large scale (e. g. the year or month and year) and the lower line
|
20
|
+
# holds the small scale (e. g. week or day).
|
21
|
+
class GanttHeader
|
22
|
+
|
23
|
+
attr_reader :gridLines, :nowLineX, :cellStartDates
|
24
|
+
attr_accessor :height
|
25
|
+
|
26
|
+
# Create a GanttHeader object and generate the scales for the header.
|
27
|
+
def initialize(chart)
|
28
|
+
@chart = chart
|
29
|
+
|
30
|
+
@largeScale = []
|
31
|
+
@smallScale = []
|
32
|
+
|
33
|
+
# Positions where chart should be marked with vertical lines that match
|
34
|
+
# the large scale.
|
35
|
+
@gridLines = []
|
36
|
+
|
37
|
+
# X coordinate of the "now" line. nil if "now" is off-chart.
|
38
|
+
@nowLineX = nil
|
39
|
+
|
40
|
+
# The x coordinates and width of the cells created by the small scale. The
|
41
|
+
# values are stored as [ x, w ].
|
42
|
+
@cellStartDates = []
|
43
|
+
# The height of the header in pixels.
|
44
|
+
@height = 39
|
45
|
+
|
46
|
+
generate
|
47
|
+
end
|
48
|
+
|
49
|
+
# Convert the header into an HTML format.
|
50
|
+
def to_html
|
51
|
+
div = XMLElement.new('div', 'class' => 'tabback',
|
52
|
+
'style' => "margin:0px; padding:0px; " +
|
53
|
+
"position:relative; overflow:hidden; " +
|
54
|
+
"width:#{@chart.width.to_i}px; " +
|
55
|
+
"height:#{@height.to_i}px; " +
|
56
|
+
"font-size:#{(@height / 4).to_i}px; ")
|
57
|
+
@largeScale.each { |s| div << s.to_html }
|
58
|
+
@smallScale.each { |s| div << s.to_html }
|
59
|
+
div
|
60
|
+
end
|
61
|
+
|
62
|
+
private
|
63
|
+
|
64
|
+
# Call genHeaderScale with the right set of parameters (depending on the
|
65
|
+
# selected scale) for the lower and upper header line.
|
66
|
+
def generate
|
67
|
+
# The 2 header lines are separated by a 1 pixel boundary.
|
68
|
+
h = ((@height - 1) / 2).to_i
|
69
|
+
case @chart.scale['name']
|
70
|
+
when 'hour'
|
71
|
+
genHeaderScale(@largeScale, 0, h, :midnight, :sameTimeNextDay,
|
72
|
+
:weekdayAndDate)
|
73
|
+
genHeaderScale(@smallScale, h + 1, h, :beginOfHour, :sameTimeNextHour,
|
74
|
+
:hour)
|
75
|
+
when 'day'
|
76
|
+
genHeaderScale(@largeScale, 0, h, :beginOfMonth, :sameTimeNextMonth,
|
77
|
+
:shortMonthName)
|
78
|
+
genHeaderScale(@smallScale, h + 1, h, :midnight, :sameTimeNextDay, :day)
|
79
|
+
when 'week'
|
80
|
+
genHeaderScale(@largeScale, 0, h, :beginOfMonth, :sameTimeNextMonth,
|
81
|
+
:monthAndYear)
|
82
|
+
genHeaderScale(@smallScale, h + 1, h, :beginOfWeek, :sameTimeNextWeek,
|
83
|
+
:week)
|
84
|
+
when 'month'
|
85
|
+
genHeaderScale(@largeScale, 0, h, :beginOfYear, :sameTimeNextYear, :year)
|
86
|
+
genHeaderScale(@smallScale, h + 1, h, :beginOfMonth, :sameTimeNextMonth,
|
87
|
+
:shortMonthName)
|
88
|
+
when 'quarter'
|
89
|
+
genHeaderScale(@largeScale, 0, h, :beginOfYear, :sameTimeNextYear, :year)
|
90
|
+
genHeaderScale(@smallScale, h + 1, h, :beginOfQuarter,
|
91
|
+
:sameTimeNextQuarter, :quarterName)
|
92
|
+
when 'year'
|
93
|
+
genHeaderScale(@smallScale, h + 1, h, :beginOfYear, :sameTimeNextYear,
|
94
|
+
:year)
|
95
|
+
else
|
96
|
+
raise "Unknown scale: #{@chart.scale['name']}"
|
97
|
+
end
|
98
|
+
|
99
|
+
nlx = @chart.dateToX(@chart.now)
|
100
|
+
@nowLineX = nlx if nlx
|
101
|
+
end
|
102
|
+
|
103
|
+
# Generate the actual scale cells.
|
104
|
+
def genHeaderScale(scale, y, h, beginOfFunc, sameTimeNextFunc, nameFunc)
|
105
|
+
# The beginOfWeek function needs a parameter, so we have to handle it as a
|
106
|
+
# special case.
|
107
|
+
if beginOfFunc == :beginOfWeek
|
108
|
+
t = @chart.start.send(beginOfFunc, @chart.weekStartsMonday)
|
109
|
+
else
|
110
|
+
t = @chart.start.send(beginOfFunc)
|
111
|
+
end
|
112
|
+
|
113
|
+
# Now we iterate of the report period in steps defined by
|
114
|
+
# sameTimeNextFunc. For each time slot we generate GanttHeaderScaleItem
|
115
|
+
# object and append it to the scale.
|
116
|
+
while t < @chart.end
|
117
|
+
nextT = t.send(sameTimeNextFunc)
|
118
|
+
# Determine the end of the cell. We keep 1 pixel for the boundary.
|
119
|
+
w = (xR = @chart.dateToX(nextT).to_i - 1) - (x = @chart.dateToX(t).to_i)
|
120
|
+
# We collect the positions of the large grid scale marks for later use
|
121
|
+
# in the chart.
|
122
|
+
if scale == @largeScale
|
123
|
+
@gridLines << xR
|
124
|
+
else
|
125
|
+
@cellStartDates << t
|
126
|
+
end
|
127
|
+
# Again, nameFunc needs special handling for the week case due to the
|
128
|
+
# extra parameter.
|
129
|
+
name = nameFunc == :week ? t.send(nameFunc, @chart.weekStartsMonday) :
|
130
|
+
t.send(nameFunc)
|
131
|
+
scale << GanttHeaderScaleItem.new(name, x, y, w, h)
|
132
|
+
t = nextT
|
133
|
+
end
|
134
|
+
# Add the end date of the last cell when generating the small scale.
|
135
|
+
@cellStartDates << t if scale == @smallScale
|
136
|
+
end
|
137
|
+
|
138
|
+
end
|
139
|
+
|
140
|
+
end
|
141
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
#!/usr/bin/env ruby -w
|
2
|
+
# encoding: UTF-8
|
3
|
+
#
|
4
|
+
# = GanttHeaderScaleItem.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 class is a storate container for all data related to a scale step of a
|
16
|
+
# GanttChart header.
|
17
|
+
class GanttHeaderScaleItem
|
18
|
+
|
19
|
+
attr_reader :label, :pos, :width
|
20
|
+
|
21
|
+
def initialize(label, x, y, width, height)
|
22
|
+
@label = label
|
23
|
+
@x = x
|
24
|
+
@y = y
|
25
|
+
@width = width
|
26
|
+
@height = height
|
27
|
+
end
|
28
|
+
|
29
|
+
def to_html
|
30
|
+
div = XMLElement.new('div', 'class' => 'tabhead',
|
31
|
+
'style' => "font-weight:bold; position:absolute; " +
|
32
|
+
"left:#{@x}px; top:#{@y}px; width:#{@width}px; height:#{@height}px; ")
|
33
|
+
div << (div1 = XMLElement.new('div', 'style' => 'padding:3px; '))
|
34
|
+
div1 << XMLText.new("#{label}")
|
35
|
+
|
36
|
+
div
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
|
@@ -0,0 +1,329 @@
|
|
1
|
+
#!/usr/bin/env ruby -w
|
2
|
+
# encoding: UTF-8
|
3
|
+
#
|
4
|
+
# = GanttLine.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/GanttTaskBar'
|
14
|
+
require 'reports/GanttMilestone'
|
15
|
+
require 'reports/GanttContainer'
|
16
|
+
require 'reports/GanttLoadStack'
|
17
|
+
require 'reports/HTMLGraphics'
|
18
|
+
require 'XMLDocument'
|
19
|
+
|
20
|
+
class TaskJuggler
|
21
|
+
|
22
|
+
# This class models the abstract (output independent) form of a line of a
|
23
|
+
# Gantt chart. Each line represents a property. Depending on the type of
|
24
|
+
# property and it's context (for nested properties) the content varies. Tasks
|
25
|
+
# (not nested) are represented as task bars or milestones. When nested into a
|
26
|
+
# resource they are represented as load stacks.
|
27
|
+
class GanttLine
|
28
|
+
|
29
|
+
include HTMLGraphics
|
30
|
+
|
31
|
+
attr_reader :y, :height, :property, :scenarioIdx
|
32
|
+
|
33
|
+
# Create a GanttLine object and generate the abstract representation.
|
34
|
+
def initialize(chart, property, scopeProperty, scenarioIdx, y, height)
|
35
|
+
# A reference to the chart that the line belongs to.
|
36
|
+
@chart = chart
|
37
|
+
# Register the line with the chart.
|
38
|
+
@chart.addLine(self)
|
39
|
+
|
40
|
+
# The category determines the background color of the line.
|
41
|
+
@category = nil
|
42
|
+
# The property that is displayed in this line.
|
43
|
+
@property = property
|
44
|
+
# In case this line lists the property in the scope of another property,
|
45
|
+
# this is a reference to the line of the enclosing property. Otherwise it
|
46
|
+
# is nil.
|
47
|
+
@scopeProperty = scopeProperty
|
48
|
+
# The scenario index.
|
49
|
+
@scenarioIdx = scenarioIdx
|
50
|
+
# The y coordinate of the topmost pixel of this line.
|
51
|
+
@y = y + chart.header.height + 1
|
52
|
+
# The height of the line in screen pixels.
|
53
|
+
@height = height
|
54
|
+
# The x coordinates of the time-off zones. It's an Array of [ startX, endX
|
55
|
+
# ] touples.
|
56
|
+
@timeOffZones = []
|
57
|
+
|
58
|
+
generate
|
59
|
+
end
|
60
|
+
|
61
|
+
# Convert the abstract representation of the GanttLine into HTML elements.
|
62
|
+
def to_html
|
63
|
+
# The whole line is put in a 'div' section. All coordinates relative to
|
64
|
+
# the top-left corner of this div. Elements that extend over the
|
65
|
+
# boundaries of this div are cut off.
|
66
|
+
div = XMLElement.new('div', 'class' => @category,
|
67
|
+
'style' => "margin:0px; padding:0px; " +
|
68
|
+
"position:absolute; overflow:hidden; " +
|
69
|
+
"left:0px; top:#{@y}px; " +
|
70
|
+
"width:#{@chart.width.to_i}px; " +
|
71
|
+
"height:#{@height}px; " +
|
72
|
+
"font-size:10px;")
|
73
|
+
# Render time-off zones.
|
74
|
+
@timeOffZones.each do |zone|
|
75
|
+
div << rectToHTML(zone[0], 0, zone[1], @height, 'offduty')
|
76
|
+
end
|
77
|
+
|
78
|
+
# Render grid lines. The grid lines are determined by the large scale.
|
79
|
+
@chart.header.gridLines.each do |line|
|
80
|
+
div << rectToHTML(line, 0, 1, @height, 'tabvline')
|
81
|
+
end
|
82
|
+
|
83
|
+
# Now render the content as HTML elements.
|
84
|
+
@content.each do |c|
|
85
|
+
div << c.to_html
|
86
|
+
end
|
87
|
+
|
88
|
+
# Render the 'now' line
|
89
|
+
if @chart.header.nowLineX
|
90
|
+
div << rectToHTML(@chart.header.nowLineX, 0, 1, @height, 'nowline')
|
91
|
+
end
|
92
|
+
|
93
|
+
div
|
94
|
+
end
|
95
|
+
|
96
|
+
# This function only works for primary task lines. It returns the generated
|
97
|
+
# intermediate object for that line.
|
98
|
+
def getTask
|
99
|
+
if @content.length == 1
|
100
|
+
@content[0]
|
101
|
+
else
|
102
|
+
nil
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# Register the areas that dependency lines should not cross.
|
107
|
+
def addBlockedZones(router)
|
108
|
+
@content.each do |c|
|
109
|
+
c.addBlockedZones(router)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
private
|
114
|
+
|
115
|
+
# Create the data objects that represent the abstract form of this
|
116
|
+
# perticular Gantt chart line.
|
117
|
+
def generate
|
118
|
+
# This Array holds the GanttLineObjects.
|
119
|
+
@content = []
|
120
|
+
|
121
|
+
generateTimeOffZones
|
122
|
+
|
123
|
+
if @property.is_a?(Task)
|
124
|
+
generateTask
|
125
|
+
else
|
126
|
+
generateResource
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
# Generate abstract form of a task line. The task can be a primary line or
|
131
|
+
# appear in the scope of a resource.
|
132
|
+
def generateTask
|
133
|
+
# Set the background color
|
134
|
+
@category = "taskcell#{(@property.get('index') + 1) % 2 + 1}"
|
135
|
+
|
136
|
+
project = @property.project
|
137
|
+
taskStart = @property['start', @scenarioIdx] || project['start']
|
138
|
+
taskEnd = @property['end', @scenarioIdx] || project['end']
|
139
|
+
|
140
|
+
if @scopeProperty
|
141
|
+
# The task is nested into a resource. We show the work the resource is
|
142
|
+
# doing for this task relative to the work the resource is doing for
|
143
|
+
# all tasks.
|
144
|
+
x = nil
|
145
|
+
startDate = endDate = nil
|
146
|
+
categories = [ 'busy', nil ]
|
147
|
+
|
148
|
+
@chart.header.cellStartDates.each do |date|
|
149
|
+
if x.nil?
|
150
|
+
x = @chart.dateToX(endDate = date).to_i
|
151
|
+
else
|
152
|
+
xNew = @chart.dateToX(date).to_i
|
153
|
+
w = xNew - x
|
154
|
+
startDate = endDate
|
155
|
+
endDate = date
|
156
|
+
|
157
|
+
# If we have a scope limiting task, we only want to generate load
|
158
|
+
# stacks that overlap with the task interval.
|
159
|
+
next if endDate <= taskStart || taskEnd <= startDate
|
160
|
+
if startDate < taskStart && endDate > taskStart
|
161
|
+
# Make sure the left edge of the first stack aligns with the
|
162
|
+
# start of the scope task.
|
163
|
+
startDate = taskStart
|
164
|
+
x = @chart.dateToX(startDate)
|
165
|
+
w = xNew - x + 1
|
166
|
+
elsif startDate < taskEnd && endDate > taskEnd
|
167
|
+
# Make sure the right edge of the last stack aligns with the end
|
168
|
+
# of the scope task.
|
169
|
+
endDate = taskEnd
|
170
|
+
w = @chart.dateToX(endDate) - x
|
171
|
+
end
|
172
|
+
|
173
|
+
overallWork = @scopeProperty.getEffectiveWork(@scenarioIdx,
|
174
|
+
startDate, endDate) +
|
175
|
+
@scopeProperty.getEffectiveFreeWork(@scenarioIdx,
|
176
|
+
startDate,
|
177
|
+
endDate)
|
178
|
+
workThisTask = @property.getEffectiveWork(@scenarioIdx,
|
179
|
+
startDate, endDate,
|
180
|
+
@scopeProperty)
|
181
|
+
# If all values are 0 we make sure we show an empty frame.
|
182
|
+
if overallWork == 0 && workThisTask == 0
|
183
|
+
values = [ 0, 1 ]
|
184
|
+
else
|
185
|
+
values = [ workThisTask, overallWork - workThisTask ]
|
186
|
+
end
|
187
|
+
@content << GanttLoadStack.new(self, x + 1, w - 2, values,
|
188
|
+
categories)
|
189
|
+
|
190
|
+
x = xNew
|
191
|
+
end
|
192
|
+
end
|
193
|
+
if @chart.table
|
194
|
+
@chart.table.legend.addGanttItem('Resource assigned to task(s)',
|
195
|
+
'busy')
|
196
|
+
end
|
197
|
+
else
|
198
|
+
# The task is not nested into a resource. We show the classical Gantt
|
199
|
+
# bars for the task.
|
200
|
+
xStart = @chart.dateToX(taskStart)
|
201
|
+
xEnd = @chart.dateToX(taskEnd)
|
202
|
+
@chart.addTask(@property, self)
|
203
|
+
if @property['milestone', @scenarioIdx]
|
204
|
+
@content << GanttMilestone.new(@property, @height, xStart, @y)
|
205
|
+
elsif @property.container?
|
206
|
+
@content << GanttContainer.new(@property, @scenarioIdx, @height,
|
207
|
+
xStart, xEnd, @y)
|
208
|
+
else
|
209
|
+
@content << GanttTaskBar.new(@property, @scenarioIdx, @height,
|
210
|
+
xStart, xEnd, @y)
|
211
|
+
end
|
212
|
+
|
213
|
+
# Make sure the legend includes the Gantt symbols.
|
214
|
+
@chart.table.legend.showGanttItems = true if @chart.table
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
|
219
|
+
# Generate abstract form of a resource line. The resource can be a primary
|
220
|
+
# line or appear in the scope of a task.
|
221
|
+
def generateResource
|
222
|
+
# Set the alternating background color
|
223
|
+
@category = "resourcecell#{(@property.get('index') + 1) % 2 + 1}"
|
224
|
+
|
225
|
+
# The cellStartDate Array contains the end of the final cell as last
|
226
|
+
# element. We need to use a shift mechanism to start and end
|
227
|
+
# dates/positions properly.
|
228
|
+
x = nil
|
229
|
+
startDate = endDate = nil
|
230
|
+
|
231
|
+
# For unnested resource lines we show the assigned work and the
|
232
|
+
# available work. For resources in a task scope we show the work
|
233
|
+
# allocated to this task, the work allocated to other tasks and the free
|
234
|
+
# work.
|
235
|
+
if @scopeProperty
|
236
|
+
categories = [ 'assigned', 'busy', 'free' ]
|
237
|
+
|
238
|
+
project = @property.project
|
239
|
+
taskStart = @scopeProperty['start', @scenarioIdx] || project['start']
|
240
|
+
taskEnd = @scopeProperty['end', @scenarioIdx] || project['end']
|
241
|
+
|
242
|
+
if @chart.table
|
243
|
+
@chart.table.legend.addGanttItem('Resource assigned to this task',
|
244
|
+
'assigned')
|
245
|
+
@chart.table.legend.addGanttItem('Resource assigned to task(s)',
|
246
|
+
'busy')
|
247
|
+
@chart.table.legend.addGanttItem('Resource available', 'free')
|
248
|
+
@chart.table.legend.addGanttItem('Resource off-duty', 'offduty')
|
249
|
+
end
|
250
|
+
else
|
251
|
+
categories = [ 'busy', 'free' ]
|
252
|
+
if @chart.table
|
253
|
+
@chart.table.legend.addGanttItem('Resource assigned to task(s)',
|
254
|
+
'busy')
|
255
|
+
@chart.table.legend.addGanttItem('Resource available', 'free')
|
256
|
+
@chart.table.legend.addGanttItem('Resource off-duty', 'offduty')
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
@chart.header.cellStartDates.each do |date|
|
261
|
+
if x.nil?
|
262
|
+
x = @chart.dateToX(endDate = date).to_i
|
263
|
+
else
|
264
|
+
xNew = @chart.dateToX(date).to_i
|
265
|
+
w = xNew - x
|
266
|
+
startDate = endDate
|
267
|
+
endDate = date
|
268
|
+
if @scopeProperty
|
269
|
+
# If we have a scope limiting task, we only want to generate load
|
270
|
+
# stacks that overlap with the task interval.
|
271
|
+
next if endDate <= taskStart || taskEnd <= startDate
|
272
|
+
if startDate < taskStart && endDate > taskStart
|
273
|
+
# Make sure the left edge of the first stack aligns with the
|
274
|
+
# start of the scope task.
|
275
|
+
startDate = taskStart
|
276
|
+
x = @chart.dateToX(startDate)
|
277
|
+
w = xNew - x + 1
|
278
|
+
elsif startDate < taskEnd && endDate > taskEnd
|
279
|
+
# Make sure the right edge of the last stack aligns with the end
|
280
|
+
# of the scope task.
|
281
|
+
endDate = taskEnd
|
282
|
+
w = @chart.dateToX(endDate) - x
|
283
|
+
end
|
284
|
+
taskWork = @property.getEffectiveWork(@scenarioIdx,
|
285
|
+
startDate, endDate,
|
286
|
+
@scopeProperty)
|
287
|
+
overallWork = @property.getEffectiveWork(@scenarioIdx,
|
288
|
+
startDate, endDate)
|
289
|
+
freeWork = @property.getEffectiveFreeWork(@scenarioIdx,
|
290
|
+
startDate, endDate)
|
291
|
+
values = [ taskWork, overallWork - taskWork, freeWork ]
|
292
|
+
else
|
293
|
+
values = []
|
294
|
+
values << @property.getEffectiveWork(@scenarioIdx,
|
295
|
+
startDate, endDate)
|
296
|
+
values << @property.getEffectiveFreeWork(@scenarioIdx,
|
297
|
+
startDate, endDate)
|
298
|
+
end
|
299
|
+
@content << GanttLoadStack.new(self, x + 1, w - 2, values, categories)
|
300
|
+
|
301
|
+
x = xNew
|
302
|
+
end
|
303
|
+
end
|
304
|
+
|
305
|
+
end
|
306
|
+
|
307
|
+
# Generate the data structures that mark the time-off periods of a task or
|
308
|
+
# resource int the chart. Depending on the resolution, the only periods with
|
309
|
+
# a duration above the threshold are shown.
|
310
|
+
def generateTimeOffZones
|
311
|
+
iv = Interval.new(@chart.start, @chart.end)
|
312
|
+
# Don't show any zones if the threshold for this scale is 0 or smaller.
|
313
|
+
return if (minTimeOff = @chart.scale['minTimeOff']) <= 0
|
314
|
+
|
315
|
+
# Get the time-off intervals.
|
316
|
+
@timeOffZones = @property.collectTimeOffIntervals(@scenarioIdx, iv,
|
317
|
+
minTimeOff)
|
318
|
+
# Convert the start/end dates to X coordinates of the chart. When
|
319
|
+
# finished, the zones in @timeOffZones are [ startX, endX ] touples.
|
320
|
+
@timeOffZones.each do |zone|
|
321
|
+
zone[0] = @chart.dateToX(zone[0])
|
322
|
+
zone[1] = @chart.dateToX(zone[1]) - zone[0]
|
323
|
+
end
|
324
|
+
end
|
325
|
+
|
326
|
+
end
|
327
|
+
|
328
|
+
end
|
329
|
+
|