taskjuggler 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -0
- data/benchmarks/depends.tjp +2 -1
- data/benchmarks/htmltaskreport.tjp +2 -1
- data/doc/classes/AppConfig.html +124 -120
- data/doc/classes/Arguments.html +10 -6
- data/doc/classes/Object.html +229 -0
- data/doc/classes/String.html +35 -31
- data/doc/classes/TaskJuggler/Account.html +18 -18
- data/doc/classes/TaskJuggler/AccountAttribute.html +261 -0
- data/doc/classes/TaskJuggler/AccountScenario.html +12 -12
- data/doc/classes/TaskJuggler/Allocation.html +34 -30
- data/doc/classes/TaskJuggler/AllocationAttribute.html +70 -70
- data/doc/classes/TaskJuggler/AttributeBase.html +131 -147
- data/doc/classes/TaskJuggler/AttributeDefinition.html +38 -21
- data/doc/classes/TaskJuggler/BatchProcessor.html +313 -0
- data/doc/classes/TaskJuggler/Booking.html +22 -18
- data/doc/classes/TaskJuggler/BookingListAttribute.html +42 -42
- data/doc/classes/TaskJuggler/BooleanAttribute.html +40 -40
- data/doc/classes/TaskJuggler/CSVFile.html +28 -24
- data/doc/classes/TaskJuggler/Charge.html +22 -18
- data/doc/classes/TaskJuggler/ChargeListAttribute.html +30 -30
- data/doc/classes/TaskJuggler/ChargeSet.html +41 -37
- data/doc/classes/TaskJuggler/ChargeSetListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/ColumnListAttribute.html +231 -0
- data/doc/classes/TaskJuggler/ColumnTable.html +23 -21
- data/doc/classes/TaskJuggler/DateAttribute.html +20 -20
- data/doc/classes/TaskJuggler/DefinitionListAttribute.html +162 -0
- data/doc/classes/TaskJuggler/DependencyListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/DurationAttribute.html +30 -30
- data/doc/classes/TaskJuggler/FixnumAttribute.html +20 -20
- data/doc/classes/TaskJuggler/FlagListAttribute.html +42 -42
- data/doc/classes/TaskJuggler/FloatAttribute.html +30 -30
- data/doc/classes/TaskJuggler/FormatListAttribute.html +197 -0
- data/doc/classes/TaskJuggler/GanttChart.html +236 -207
- data/doc/classes/TaskJuggler/GanttContainer.html +46 -42
- data/doc/classes/TaskJuggler/GanttHeader.html +16 -12
- data/doc/classes/TaskJuggler/GanttHeaderScaleItem.html +16 -12
- data/doc/classes/TaskJuggler/GanttLine.html +28 -24
- data/doc/classes/TaskJuggler/GanttLoadStack.html +22 -18
- data/doc/classes/TaskJuggler/GanttMilestone.html +46 -42
- data/doc/classes/TaskJuggler/GanttRouter.html +104 -98
- data/doc/classes/TaskJuggler/GanttTaskBar.html +46 -42
- data/doc/classes/TaskJuggler/HTMLDocument.html +12 -12
- data/doc/classes/TaskJuggler/HTMLGraphics.html +12 -12
- data/doc/classes/TaskJuggler/Interval.html +126 -120
- data/doc/classes/TaskJuggler/IntervalListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/JobInfo.html +284 -0
- data/doc/classes/TaskJuggler/Journal.html +197 -0
- data/doc/classes/TaskJuggler/JournalEntry.html +218 -0
- data/doc/classes/TaskJuggler/KeywordArray.html +179 -0
- data/doc/classes/TaskJuggler/KeywordDocumentation.html +445 -396
- data/doc/classes/TaskJuggler/Limits/Limit.html +34 -30
- data/doc/classes/TaskJuggler/Limits.html +68 -62
- data/doc/classes/TaskJuggler/LimitsAttribute.html +40 -40
- data/doc/classes/TaskJuggler/ListAttributeBase.html +207 -0
- data/doc/classes/TaskJuggler/Log.html +72 -68
- data/doc/classes/TaskJuggler/LogicalAttribute.html +38 -34
- data/doc/classes/TaskJuggler/LogicalExpression.html +16 -12
- data/doc/classes/TaskJuggler/LogicalExpressionAttribute.html +194 -0
- data/doc/classes/TaskJuggler/LogicalFlag.html +32 -32
- data/doc/classes/TaskJuggler/LogicalFunction.html +28 -24
- data/doc/classes/TaskJuggler/LogicalOperation.html +17 -13
- data/doc/classes/TaskJuggler/Macro.html +10 -6
- data/doc/classes/TaskJuggler/MacroParser.html +36 -36
- data/doc/classes/TaskJuggler/MacroTable.html +40 -36
- data/doc/classes/TaskJuggler/Message.html +16 -12
- data/doc/classes/TaskJuggler/MessageHandler.html +16 -12
- data/doc/classes/TaskJuggler/Navigator.html +249 -0
- data/doc/classes/TaskJuggler/OnShiftCache.html +316 -0
- data/doc/classes/TaskJuggler/Project.html +1064 -678
- data/doc/classes/TaskJuggler/ProjectFileParser.html +90 -85
- data/doc/classes/TaskJuggler/PropertyAttribute.html +194 -0
- data/doc/classes/TaskJuggler/PropertyList.html +114 -113
- data/doc/classes/TaskJuggler/PropertySet.html +355 -312
- data/doc/classes/TaskJuggler/PropertyTreeNode.html +527 -474
- data/doc/classes/TaskJuggler/Query.html +90 -85
- data/doc/classes/TaskJuggler/RTPNavigator.html +292 -0
- data/doc/classes/TaskJuggler/RTPReport.html +301 -0
- data/doc/classes/TaskJuggler/RealFormat.html +114 -57
- data/doc/classes/TaskJuggler/RealFormatAttribute.html +162 -0
- data/doc/classes/TaskJuggler/ReferenceAttribute.html +87 -20
- data/doc/classes/TaskJuggler/Report.html +82 -291
- data/doc/classes/TaskJuggler/ReportBase.html +448 -0
- data/doc/classes/TaskJuggler/ReportContext.html +243 -0
- data/doc/classes/TaskJuggler/ReportTable.html +158 -129
- data/doc/classes/TaskJuggler/ReportTableCell.html +30 -26
- data/doc/classes/TaskJuggler/ReportTableColumn.html +29 -25
- data/doc/classes/TaskJuggler/ReportTableLegend.html +28 -24
- data/doc/classes/TaskJuggler/ReportTableLine.html +34 -30
- data/doc/classes/TaskJuggler/Resource.html +12 -12
- data/doc/classes/TaskJuggler/ResourceListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/ResourceListRE.html +49 -57
- data/doc/classes/TaskJuggler/ResourceScenario.html +126 -126
- data/doc/classes/TaskJuggler/RichText.html +52 -48
- data/doc/classes/TaskJuggler/RichTextAttribute.html +30 -30
- data/doc/classes/TaskJuggler/RichTextDocument.html +41 -37
- data/doc/classes/TaskJuggler/RichTextElement.html +274 -264
- data/doc/classes/TaskJuggler/RichTextException.html +13 -13
- data/doc/classes/TaskJuggler/RichTextParser.html +48 -47
- data/doc/classes/TaskJuggler/RichTextProtocolExample.html +52 -55
- data/doc/classes/TaskJuggler/RichTextProtocolHandler.html +55 -10
- data/doc/classes/TaskJuggler/RichTextScanner.html +106 -245
- data/doc/classes/TaskJuggler/RichTextSnip.html +28 -24
- data/doc/classes/TaskJuggler/RichTextSyntaxRules.html +381 -301
- data/doc/classes/TaskJuggler/Scenario.html +6 -6
- data/doc/classes/TaskJuggler/ScenarioData.html +40 -36
- data/doc/classes/TaskJuggler/ScenarioListAttribute.html +229 -0
- data/doc/classes/TaskJuggler/Scoreboard.html +70 -66
- data/doc/classes/TaskJuggler/Shift.html +18 -18
- data/doc/classes/TaskJuggler/ShiftAssignment.html +58 -54
- data/doc/classes/TaskJuggler/ShiftAssignments.html +82 -78
- data/doc/classes/TaskJuggler/ShiftAssignmentsAttribute.html +40 -40
- data/doc/classes/TaskJuggler/ShiftScenario.html +24 -24
- data/doc/classes/TaskJuggler/SortListAttribute.html +196 -0
- data/doc/classes/TaskJuggler/SourceFileInfo.html +16 -12
- data/doc/classes/TaskJuggler/StringAttribute.html +30 -30
- data/doc/classes/TaskJuggler/SymbolAttribute.html +20 -20
- data/doc/classes/TaskJuggler/SyntaxReference.html +46 -42
- data/doc/classes/TaskJuggler/TOCEntry.html +16 -12
- data/doc/classes/TaskJuggler/TableColumnDefinition.html +48 -33
- data/doc/classes/TaskJuggler/TableOfContents.html +22 -18
- data/doc/classes/TaskJuggler/TableReport.html +1036 -0
- data/doc/classes/TaskJuggler/Task.html +12 -12
- data/doc/classes/TaskJuggler/TaskDependency.html +16 -12
- data/doc/classes/TaskJuggler/TaskListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/TaskListRE.html +49 -58
- data/doc/classes/TaskJuggler/TaskScenario.html +1270 -1180
- data/doc/classes/TaskJuggler/TextParser/Pattern.html +100 -96
- data/doc/classes/TaskJuggler/TextParser/Rule.html +88 -84
- data/doc/classes/TaskJuggler/TextParser/StackElement.html +16 -12
- data/doc/classes/TaskJuggler/TextParser/TextParserResultArray.html +12 -12
- data/doc/classes/TaskJuggler/TextParser/TokenDoc.html +10 -6
- data/doc/classes/TaskJuggler/TextParser.html +203 -140
- data/doc/classes/TaskJuggler/TextReport.html +364 -0
- data/doc/classes/TaskJuggler/TextScanner/BufferStreamHandle.html +70 -70
- data/doc/classes/TaskJuggler/TextScanner/FileStreamHandle.html +50 -42
- data/doc/classes/TaskJuggler/TextScanner/StreamHandle.html +16 -12
- data/doc/classes/TaskJuggler/TextScanner.html +334 -240
- data/doc/classes/TaskJuggler/TjException.html +6 -6
- data/doc/classes/TaskJuggler/TjTime.html +547 -497
- data/doc/classes/TaskJuggler/TjpExample.html +29 -25
- data/doc/classes/TaskJuggler/TjpExportRE.html +77 -97
- data/doc/classes/TaskJuggler/TjpSyntaxRules.html +3911 -3886
- data/doc/classes/TaskJuggler/UserManual.html +54 -54
- data/doc/classes/TaskJuggler/WorkingHours.html +53 -49
- data/doc/classes/TaskJuggler/WorkingHoursAttribute.html +53 -85
- data/doc/classes/TaskJuggler/XMLBlob.html +21 -21
- data/doc/classes/TaskJuggler/XMLComment.html +21 -21
- data/doc/classes/TaskJuggler/XMLDocument.html +28 -24
- data/doc/classes/TaskJuggler/XMLElement.html +70 -58
- data/doc/classes/TaskJuggler/XMLNamedText.html +11 -11
- data/doc/classes/TaskJuggler/XMLText.html +36 -36
- data/doc/classes/TaskJuggler.html +266 -183
- data/doc/files/COPYING.html +1 -1
- data/doc/files/README.html +1 -1
- data/doc/files/lib/AccountScenario_rb.html +1 -1
- data/doc/files/lib/Account_rb.html +1 -1
- data/doc/files/lib/Allocation_rb.html +1 -1
- data/doc/files/lib/AppConfig_rb.html +1 -1
- data/doc/files/lib/AttributeBase_rb.html +11 -1
- data/doc/files/lib/AttributeDefinition_rb.html +1 -1
- data/doc/files/lib/Attributes_rb.html +1 -1
- data/doc/files/lib/{LogicalFlag_rb.html → BatchProcessor_rb.html} +8 -6
- data/doc/files/lib/Booking_rb.html +1 -1
- data/doc/files/lib/ChargeSet_rb.html +1 -1
- data/doc/files/lib/Charge_rb.html +1 -1
- data/doc/files/lib/HTMLDocument_rb.html +1 -1
- data/doc/files/lib/Interval_rb.html +1 -1
- data/doc/files/lib/Journal_rb.html +106 -0
- data/doc/files/lib/KeywordArray_rb.html +106 -0
- data/doc/files/lib/KeywordDocumentation_rb.html +1 -1
- data/doc/files/lib/Limits_rb.html +1 -1
- data/doc/files/lib/Log_rb.html +1 -1
- data/doc/files/lib/LogicalExpression_rb.html +1 -3
- data/doc/files/lib/LogicalFunction_rb.html +1 -1
- data/doc/files/lib/LogicalOperation_rb.html +1 -1
- data/doc/files/lib/MacroParser_rb.html +1 -1
- data/doc/files/lib/MacroTable_rb.html +1 -1
- data/doc/files/lib/MessageHandler_rb.html +1 -1
- data/doc/files/lib/Message_rb.html +1 -1
- data/doc/files/lib/ProjectFileParser_rb.html +5 -1
- data/doc/files/lib/Project_rb.html +5 -1
- data/doc/files/lib/PropertyList_rb.html +1 -1
- data/doc/files/lib/PropertySet_rb.html +1 -1
- data/doc/files/lib/PropertyTreeNode_rb.html +1 -1
- data/doc/files/lib/Query_rb.html +1 -1
- data/doc/files/lib/RTPNavigator_rb.html +120 -0
- data/doc/files/lib/RTPReport_rb.html +118 -0
- data/doc/files/lib/RealFormat_rb.html +1 -1
- data/doc/files/lib/ResourceScenario_rb.html +1 -1
- data/doc/files/lib/Resource_rb.html +1 -1
- data/doc/files/lib/RichTextDocument_rb.html +1 -1
- data/doc/files/lib/RichTextElement_rb.html +1 -1
- data/doc/files/lib/RichTextParser_rb.html +1 -1
- data/doc/files/lib/RichTextProtocolExample_rb.html +1 -1
- data/doc/files/lib/RichTextProtocolHandler_rb.html +1 -1
- data/doc/files/lib/RichTextScanner_rb.html +1 -1
- data/doc/files/lib/RichTextSnip_rb.html +1 -1
- data/doc/files/lib/RichTextSyntaxRules_rb.html +1 -1
- data/doc/files/lib/RichText_rb.html +1 -1
- data/doc/files/lib/ScenarioData_rb.html +1 -1
- data/doc/files/lib/Scenario_rb.html +1 -1
- data/doc/files/lib/Scoreboard_rb.html +1 -1
- data/doc/files/lib/ShiftAssignments_rb.html +1 -1
- data/doc/files/lib/ShiftScenario_rb.html +1 -1
- data/doc/files/lib/Shift_rb.html +1 -1
- data/doc/files/lib/SourceFileInfo_rb.html +1 -1
- data/doc/files/lib/SyntaxReference_rb.html +1 -1
- data/doc/files/lib/TOCEntry_rb.html +1 -1
- data/doc/files/lib/TableColumnDefinition_rb.html +1 -1
- data/doc/files/lib/TableOfContents_rb.html +1 -1
- data/doc/files/lib/TaskDependency_rb.html +1 -1
- data/doc/files/lib/TaskJuggler_rb.html +1 -1
- data/doc/files/lib/TaskScenario_rb.html +1 -1
- data/doc/files/lib/Task_rb.html +1 -1
- data/doc/files/lib/TextParser/Pattern_rb.html +1 -1
- data/doc/files/lib/TextParser/Rule_rb.html +1 -1
- data/doc/files/lib/TextParser/StackElement_rb.html +1 -1
- data/doc/files/lib/TextParser/TokenDoc_rb.html +1 -1
- data/doc/files/lib/TextParser_rb.html +1 -1
- data/doc/files/lib/TextScanner_rb.html +1 -1
- data/doc/files/lib/Tj3Config_rb.html +1 -1
- data/doc/files/lib/TjException_rb.html +1 -1
- data/doc/files/lib/TjTime_rb.html +1 -1
- data/doc/files/lib/TjpExample_rb.html +1 -1
- data/doc/files/lib/TjpSyntaxRules_rb.html +1 -1
- data/doc/files/lib/UTF8String_rb.html +1 -1
- data/doc/files/lib/UserManual_rb.html +1 -1
- data/doc/files/lib/WorkingHours_rb.html +1 -1
- data/doc/files/lib/XMLDocument_rb.html +1 -1
- data/doc/files/lib/XMLElement_rb.html +1 -1
- data/doc/files/lib/deep_copy_rb.html +106 -0
- data/doc/files/lib/ms_test_rb.html +90 -0
- data/doc/files/lib/reports/CSVFile_rb.html +1 -1
- data/doc/files/lib/reports/ColumnTable_rb.html +1 -1
- data/doc/files/lib/reports/GanttChart_rb.html +1 -1
- data/doc/files/lib/reports/GanttContainer_rb.html +1 -1
- data/doc/files/lib/reports/GanttHeaderScaleItem_rb.html +1 -1
- data/doc/files/lib/reports/GanttHeader_rb.html +1 -1
- data/doc/files/lib/reports/GanttLine_rb.html +1 -1
- data/doc/files/lib/reports/GanttLoadStack_rb.html +1 -1
- data/doc/files/lib/reports/GanttMilestone_rb.html +1 -1
- data/doc/files/lib/reports/GanttRouter_rb.html +1 -1
- data/doc/files/lib/reports/GanttTaskBar_rb.html +1 -1
- data/doc/files/lib/reports/HTMLGraphics_rb.html +1 -1
- data/doc/files/lib/reports/{ReportElement_rb.html → Navigator_rb.html} +6 -8
- data/doc/files/lib/reports/ReportBase_rb.html +106 -0
- data/doc/files/lib/reports/ReportContext_rb.html +106 -0
- data/doc/files/lib/reports/ReportTableCell_rb.html +1 -1
- data/doc/files/lib/reports/ReportTableColumn_rb.html +1 -1
- data/doc/files/lib/reports/ReportTableLegend_rb.html +1 -1
- data/doc/files/lib/reports/ReportTableLine_rb.html +1 -1
- data/doc/files/lib/reports/ReportTable_rb.html +1 -1
- data/doc/files/lib/reports/Report_rb.html +8 -2
- data/doc/files/lib/reports/ResourceListRE_rb.html +2 -2
- data/doc/files/lib/reports/{ReportTableElement_rb.html → TableReport_rb.html} +7 -5
- data/doc/files/lib/reports/TaskListRE_rb.html +2 -2
- data/doc/files/lib/reports/TextReport_rb.html +116 -0
- data/doc/files/lib/reports/TjpExportRE_rb.html +2 -2
- data/doc/files/lib/taskjuggler3_rb.html +61 -56
- data/doc/files/lib/tj3man_rb.html +1 -1
- data/doc/fr_class_index.html +41 -3
- data/doc/fr_file_index.html +21 -5
- data/doc/fr_method_index.html +1069 -959
- data/examples/ContactList.html +1467 -0
- data/examples/Deliveries.html +485 -0
- data/examples/Development.html +2525 -0
- data/examples/Overview.html +747 -0
- data/examples/Resource Graph.html +616 -0
- data/examples/tutorial.tjp +63 -67
- data/lib/AttributeBase.rb +27 -31
- data/lib/AttributeDefinition.rb +12 -7
- data/lib/Attributes.rb +134 -34
- data/lib/Interval.rb +2 -0
- data/lib/Journal.rb +44 -0
- data/lib/{LogicalFlag.rb → KeywordArray.rb} +5 -13
- data/lib/KeywordDocumentation.rb +84 -47
- data/lib/Limits.rb +7 -5
- data/lib/LogicalExpression.rb +1 -1
- data/lib/LogicalOperation.rb +33 -0
- data/lib/Project.rb +313 -99
- data/lib/ProjectFileParser.rb +88 -11
- data/lib/PropertyList.rb +2 -1
- data/lib/PropertySet.rb +13 -4
- data/lib/PropertyTreeNode.rb +34 -15
- data/lib/Query.rb +2 -1
- data/lib/RTPNavigator.rb +53 -0
- data/lib/RTPReport.rb +62 -0
- data/lib/RealFormat.rb +28 -10
- data/lib/RichTextElement.rb +18 -12
- data/lib/RichTextParser.rb +1 -0
- data/lib/RichTextProtocolExample.rb +8 -11
- data/lib/RichTextProtocolHandler.rb +11 -1
- data/lib/RichTextScanner.rb +308 -164
- data/lib/RichTextSyntaxRules.rb +24 -0
- data/lib/TableColumnDefinition.rb +5 -1
- data/lib/TaskJuggler.rb +3 -2
- data/lib/TaskScenario.rb +123 -31
- data/lib/TextParser.rb +14 -3
- data/lib/TextScanner.rb +210 -34
- data/lib/Tj3Config.rb +1 -1
- data/lib/TjTime.rb +15 -0
- data/lib/TjpExample.rb +1 -1
- data/lib/TjpSyntaxRules.rb +674 -473
- data/lib/WorkingHours.rb +1 -1
- data/lib/XMLElement.rb +11 -3
- data/lib/deep_copy.rb +72 -0
- data/lib/ms_test.rb +27 -0
- data/lib/reports/ColumnTable.rb +7 -5
- data/lib/reports/GanttChart.rb +60 -34
- data/lib/reports/GanttHeader.rb +1 -1
- data/lib/reports/GanttRouter.rb +7 -5
- data/lib/reports/Navigator.rb +72 -0
- data/lib/reports/Report.rb +58 -73
- data/lib/reports/ReportBase.rb +241 -0
- data/lib/reports/ReportContext.rb +41 -0
- data/lib/reports/ReportTable.rb +7 -2
- data/lib/reports/ReportTableCell.rb +3 -3
- data/lib/reports/ResourceListRE.rb +19 -26
- data/lib/reports/{ReportTableElement.rb → TableReport.rb} +297 -97
- data/lib/reports/TaskListRE.rb +16 -24
- data/lib/reports/TextReport.rb +87 -0
- data/lib/reports/TjpExportRE.rb +55 -50
- data/lib/taskjuggler3.rb +6 -1
- data/manual/Getting_Started +57 -6
- data/manual/How_To_Contribute +2 -4
- data/manual/Intro +2 -2
- data/manual/Reporting_Bugs +9 -2
- data/manual/Rich_Text_Attributes +41 -0
- data/manual/Tutorial +219 -173
- data/tasks/test.rake +3 -0
- data/test/TestSuite/CSV-Reports/celltext.tjp +2 -1
- data/test/TestSuite/CSV-Reports/resourcereport.tjp +2 -1
- data/test/TestSuite/CSV-Reports/resourcereport_with_tasks.tjp +2 -1
- data/test/TestSuite/CSV-Reports/sortByTree.tjp +2 -1
- data/test/TestSuite/CSV-Reports/sortBy_duration.down.tjp +2 -1
- data/test/TestSuite/CSV-Reports/sortBy_effort.up.tjp +2 -1
- data/test/TestSuite/CSV-Reports/sortBy_plan.start.down.tjp +2 -1
- data/test/TestSuite/CSV-Reports/taskreport.tjp +2 -1
- data/test/TestSuite/CSV-Reports/taskreport_with_resources.tjp +2 -1
- data/test/TestSuite/HTML-Reports/depArrows.tjp +72 -0
- data/test/TestSuite/HTML-Reports/reference-export.html +187 -0
- data/test/TestSuite/HTML-Reports/reference.tjp +21 -0
- data/test/TestSuite/Scheduler/Correct/Allocate.tjp +2 -1
- data/test/TestSuite/Scheduler/Correct/AutomaticMilestones.tjp +3 -3
- data/test/TestSuite/Scheduler/Correct/Booking.tjp +3 -3
- data/test/TestSuite/Scheduler/Correct/Container-2.tjp +37 -0
- data/test/TestSuite/Scheduler/Correct/Container.tjp +40 -0
- data/test/TestSuite/Scheduler/Correct/Depends.tjp +9 -14
- data/test/TestSuite/Scheduler/Correct/Duration.tjp +2 -1
- data/test/TestSuite/Scheduler/Correct/InheritStartEnd.tjp +20 -29
- data/test/TestSuite/Scheduler/Correct/Limits.tjp +11 -13
- data/test/TestSuite/Scheduler/Correct/Optimize-1.tjp +6 -5
- data/test/TestSuite/Scheduler/Correct/Optimize-2.tjp +10 -6
- data/test/TestSuite/Scheduler/Correct/Optimize-3.tjp +9 -6
- data/test/TestSuite/Scheduler/Correct/Optimize-4.tjp +9 -6
- data/test/TestSuite/Scheduler/Correct/Optimize-5.tjp +13 -10
- data/test/TestSuite/Scheduler/Correct/Precedes.tjp +9 -14
- data/test/TestSuite/Scheduler/Correct/Shift.tjp +9 -8
- data/test/TestSuite/Scheduler/Correct/checks.tji +4 -0
- data/test/TestSuite/Scheduler/Errors/weak_end_dep.tjp +16 -0
- data/test/TestSuite/Scheduler/Errors/weak_start_dep.tjp +16 -0
- data/test/TestSuite/Syntax/Correct/Account.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/AutoID.tjp +21 -0
- data/test/TestSuite/Syntax/Correct/AutoMacros.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/Caption.tjp +7 -6
- data/test/TestSuite/Syntax/Correct/Celltext.tjp +7 -4
- data/test/TestSuite/Syntax/Correct/Comments.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/CompletedWork.tji +11 -19
- data/test/TestSuite/Syntax/Correct/CriticalPath.tjp +4 -3
- data/test/TestSuite/Syntax/Correct/Export.tjp +3 -1
- data/test/TestSuite/Syntax/Correct/Flags.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/HtmlTaskReport.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/Journal.tjp +18 -0
- data/test/TestSuite/Syntax/Correct/LoadUnits.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/LogicalExpression.tjp +16 -0
- data/test/TestSuite/Syntax/Correct/Period.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/RawHTML.tjp +4 -2
- data/test/TestSuite/Syntax/Correct/Reports.tjp +4 -2
- data/test/TestSuite/Syntax/Correct/ResourcePrefix.tji +2 -0
- data/test/TestSuite/Syntax/Correct/ResourcePrefix.tjp +23 -0
- data/test/TestSuite/Syntax/Correct/Responsible.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/Simple.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/String.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/TaskRoot.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/tutorial.tjp +92 -70
- data/test/TestSuite/Syntax/Errors/bad_comment.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/bad_include.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/bad_time_zone.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/bad_timing_res.tjp +5 -0
- data/test/TestSuite/Syntax/Errors/chargeset_master.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/container_attribute.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/cost_acct_no_top.tjp +3 -2
- data/test/TestSuite/Syntax/Errors/cost_rev_same.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/eof_in_istring1.tjp +5 -0
- data/test/TestSuite/Syntax/Errors/eof_in_istring2.tjp +5 -0
- data/test/TestSuite/Syntax/Errors/eof_in_istring3.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/eof_in_istring4.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/eof_in_istring5.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/include_recursion.tji +1 -0
- data/test/TestSuite/Syntax/Errors/include_recursion.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/junk_after_cut.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/navigator_exists.tjp +10 -0
- data/test/TestSuite/Syntax/Errors/operand_unkn_flag.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/report_end.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/report_exists.tjp +10 -0
- data/test/TestSuite/Syntax/Errors/report_start.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/rev_acct_no_top.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sort_direction.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sort_unknown_scen.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sorting_crit_exptd1.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sorting_crit_exptd2.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sorting_wbs.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/too_large_timing_res.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/unknown_scenario_idx.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/unknown_task.tjp +1 -1
- data/test/all.rb +1 -16
- data/test/test_CSV-Reports.rb +8 -5
- data/test/test_Query.rb +2 -2
- data/test/test_RichText.rb +95 -0
- data/test/test_Scheduler.rb +8 -4
- data/test/test_Syntax.rb +8 -4
- data/test/test_deep_copy.rb +83 -0
- metadata +549 -487
- data/benchmarks/UTF-8-Strings.rb +0 -58
- data/doc/classes/TaskJuggler/ReportElement.html +0 -1070
- data/doc/classes/TaskJuggler/ReportTableElement.html +0 -644
- data/lib/reports/ReportElement.rb +0 -427
- data/test/TestSuite/Syntax/Correct/csvtest +0 -16
- data/test/TestSuite/Syntax/Errors/no_csv_suffix.tjp +0 -10
- data/test/TestSuite/Syntax/Errors/no_html_suffix.tjp +0 -10
- data/test/TestSuite/Syntax/Errors/report_redifinition.tjp +0 -10
data/lib/ProjectFileParser.rb
CHANGED
|
@@ -14,6 +14,8 @@ require 'TextParser'
|
|
|
14
14
|
require 'TextScanner'
|
|
15
15
|
require 'TjpSyntaxRules'
|
|
16
16
|
require 'RichText'
|
|
17
|
+
require 'RTPNavigator'
|
|
18
|
+
require 'RTPReport'
|
|
17
19
|
|
|
18
20
|
class TaskJuggler
|
|
19
21
|
|
|
@@ -47,9 +49,14 @@ class TaskJuggler
|
|
|
47
49
|
|
|
48
50
|
# Call this function with the master file to start processing a TJP file or
|
|
49
51
|
# a set of TJP files.
|
|
50
|
-
def open(
|
|
52
|
+
def open(file, master)
|
|
51
53
|
begin
|
|
52
|
-
@scanner = TextScanner.new(
|
|
54
|
+
@scanner = TextScanner.new(file, @messageHandler)
|
|
55
|
+
# We need the TextScanner object for error reporting.
|
|
56
|
+
if master && file != '.' && file[-4, 4] != '.tjp'
|
|
57
|
+
error('illegal_extension', "Project file name must end with " +
|
|
58
|
+
'\'.tjp\' extension')
|
|
59
|
+
end
|
|
53
60
|
@scanner.open
|
|
54
61
|
rescue StandardError
|
|
55
62
|
error('file_open', $!.message)
|
|
@@ -168,7 +175,7 @@ class TaskJuggler
|
|
|
168
175
|
# Register the new Attribute type with the Property set it should belong
|
|
169
176
|
# to.
|
|
170
177
|
@propertySet.addAttributeType(AttributeDefinition.new(
|
|
171
|
-
@val[1], @val[2], type, inherit, scenarioSpecific, default, true))
|
|
178
|
+
@val[1], @val[2], type, inherit, false, scenarioSpecific, default, true))
|
|
172
179
|
|
|
173
180
|
# Add the new user-defined attribute as reportable attribute to the parser
|
|
174
181
|
# rule.
|
|
@@ -188,20 +195,41 @@ class TaskJuggler
|
|
|
188
195
|
# actual input file. So we have to map the error location in the RichText
|
|
189
196
|
# input stream back to the position in the project file.
|
|
190
197
|
def newRichText(text)
|
|
198
|
+
sfi = sourceFileInfo
|
|
191
199
|
begin
|
|
192
200
|
rText = RichText.new(text)
|
|
201
|
+
rText.registerProtocol(RTPNavigator.new(@project, sfi))
|
|
202
|
+
rText.registerProtocol(RTPReport.new(@project, sfi))
|
|
193
203
|
rescue RichTextException => msg
|
|
194
|
-
sfi =
|
|
195
|
-
correctSFI = SourceFileInfo.new(sfi.fileName,
|
|
196
|
-
sfi.lineNo + msg.lineNo - 1, 0)
|
|
204
|
+
sfi = SourceFileInfo.new(sfi.fileName, sfi.lineNo + msg.lineNo - 1, 0)
|
|
197
205
|
message = Message.new(msg.id, 'error', msg.text + "\n" + msg.line,
|
|
198
|
-
@property, nil,
|
|
206
|
+
@property, nil, sfi)
|
|
199
207
|
@messageHandler.send(message)
|
|
200
208
|
|
|
201
209
|
end
|
|
202
210
|
rText
|
|
203
211
|
end
|
|
204
212
|
|
|
213
|
+
# This method is a convenience wrapper around Project.new. It checks if
|
|
214
|
+
# the report name already exists. It also triggers the attribute
|
|
215
|
+
# inheritance. +name+ is the name of the report, +type+ is the report
|
|
216
|
+
# type. +sourceFileInfo+ is a SourceFileInfo of the report definition. The
|
|
217
|
+
# method returns the newly created Report.
|
|
218
|
+
def newReport(name, type, sourceFileInfo)
|
|
219
|
+
if @project.reportByName(name)
|
|
220
|
+
error('report_redefinition',
|
|
221
|
+
"A report with the name #{name} has already been defined.")
|
|
222
|
+
end
|
|
223
|
+
@property = Report.new(@project, "report#{@reportCounter += 1}",
|
|
224
|
+
name, nil)
|
|
225
|
+
@property.typeSpec = type
|
|
226
|
+
@property.sourceFileInfo = sourceFileInfo
|
|
227
|
+
@property.set('formats', [ type ])
|
|
228
|
+
@property.inheritAttributes
|
|
229
|
+
@property
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
|
|
205
233
|
# If the @limitResources list is not empty, we have to create a Limits
|
|
206
234
|
# object for each Resource. Otherwise, one Limits object is enough.
|
|
207
235
|
def setLimit(name, value, interval)
|
|
@@ -218,12 +246,53 @@ class TaskJuggler
|
|
|
218
246
|
# syntax tree definition. The *Rule functions may only be used in _rule
|
|
219
247
|
# functions. And only one function call per _rule function is allowed.
|
|
220
248
|
|
|
249
|
+
# This function creates a set of rules to describe a list of keywords.
|
|
250
|
+
# _name_ is the name of the top-level rule and _items_ can be a Hash or
|
|
251
|
+
# Array. The array just contains the allowed keywords, the Hash contains
|
|
252
|
+
# keyword/description pairs. The description is used to describe
|
|
253
|
+
# the keyword in the manual. The syntax supports two special cases. A '*'
|
|
254
|
+
# means all items in the list and '-' means the list is empty.
|
|
255
|
+
def allOrNothingListRule(name, items)
|
|
256
|
+
newRule(name) {
|
|
257
|
+
# A '*' means all possible items should be in the list.
|
|
258
|
+
pattern(%w( _* ), lambda {
|
|
259
|
+
KeywordArray.new([ '*' ])
|
|
260
|
+
})
|
|
261
|
+
descr('A shortcut for all items')
|
|
262
|
+
# A '-' means the list should be empty.
|
|
263
|
+
pattern([ '_ - ' ], lambda {
|
|
264
|
+
KeywordArray.new
|
|
265
|
+
})
|
|
266
|
+
descr('No items')
|
|
267
|
+
# Or the list consists of one or more comma separated keywords.
|
|
268
|
+
pattern([ "!#{name}_AoN_ruleItems" ], lambda {
|
|
269
|
+
KeywordArray.new(@val)
|
|
270
|
+
})
|
|
271
|
+
}
|
|
272
|
+
# Create the rule for the comma separated list.
|
|
273
|
+
newRule("#{name}_AoN_ruleItems") {
|
|
274
|
+
listRule("more#{name}_AoN_ruleItems", "!#{name}_AoN_ruleItem")
|
|
275
|
+
}
|
|
276
|
+
# Create the rule for the keywords with their description.
|
|
277
|
+
newRule("#{name}_AoN_ruleItem") {
|
|
278
|
+
if items.is_a?(Array)
|
|
279
|
+
items.each { |keyword| singlePattern('_' + keyword) }
|
|
280
|
+
else
|
|
281
|
+
items.each do |keyword, description|
|
|
282
|
+
singlePattern('_' + keyword)
|
|
283
|
+
descr(description) if description
|
|
284
|
+
end
|
|
285
|
+
end
|
|
286
|
+
}
|
|
287
|
+
end
|
|
288
|
+
|
|
221
289
|
def listRule(name, listItem)
|
|
222
290
|
pattern([ "#{listItem}", "!#{name}" ], lambda {
|
|
223
291
|
[ @val[0] ] + (@val[1].nil? ? [] : @val[1])
|
|
224
292
|
})
|
|
225
|
-
newRule(name)
|
|
226
|
-
|
|
293
|
+
newRule(name) {
|
|
294
|
+
commaListRule(listItem)
|
|
295
|
+
}
|
|
227
296
|
end
|
|
228
297
|
|
|
229
298
|
def commaListRule(listItem)
|
|
@@ -261,7 +330,7 @@ class TaskJuggler
|
|
|
261
330
|
def descr(text)
|
|
262
331
|
if @cr.patterns[-1].length != 1 ||
|
|
263
332
|
(@cr.patterns[-1][0][0] != ?_ && @cr.patterns[-1][0][0] != ?$)
|
|
264
|
-
raise
|
|
333
|
+
raise 'descr() may only be used for patterns with terminal tokens.'
|
|
265
334
|
end
|
|
266
335
|
arg(0, nil, text)
|
|
267
336
|
end
|
|
@@ -291,6 +360,13 @@ class TaskJuggler
|
|
|
291
360
|
def example(file, tag = nil)
|
|
292
361
|
@cr.setExample(file, tag)
|
|
293
362
|
end
|
|
363
|
+
# Determine the title of the column with the ID _colId_. The title may be
|
|
364
|
+
# from the static set or be from a user defined attribute.
|
|
365
|
+
def columnTitle(colId)
|
|
366
|
+
TableReport.defaultColumnTitle(colId) ||
|
|
367
|
+
@project.attributeName(colId)
|
|
368
|
+
end
|
|
369
|
+
|
|
294
370
|
|
|
295
371
|
# To manage certain variables that have file scope throughout a hierachie
|
|
296
372
|
# of nested include files, we use a @fileStack to track those variables.
|
|
@@ -298,7 +374,8 @@ class TaskJuggler
|
|
|
298
374
|
# return from an included file, we need to restore the old values. This
|
|
299
375
|
# function creates or resets the stack.
|
|
300
376
|
def initFileStack
|
|
301
|
-
@fileStackVariables = %w( taskprefix
|
|
377
|
+
@fileStackVariables = %w( taskprefix reportprefix
|
|
378
|
+
resourceprefix accountprefix )
|
|
302
379
|
stackEntry = {}
|
|
303
380
|
@fileStackVariables.each do |var|
|
|
304
381
|
stackEntry[var] = ''
|
data/lib/PropertyList.rb
CHANGED
|
@@ -91,7 +91,8 @@ class TaskJuggler
|
|
|
91
91
|
end
|
|
92
92
|
if scIdx == -1
|
|
93
93
|
if @propertySet.scenarioSpecific?(criteria)
|
|
94
|
-
raise TjException.new, "Attribute #{criteria} is scenario specific"
|
|
94
|
+
raise TjException.new, "Attribute #{criteria} is scenario specific." +
|
|
95
|
+
"You must specify a scenario id."
|
|
95
96
|
end
|
|
96
97
|
else
|
|
97
98
|
if !@propertySet.scenarioSpecific?(criteria)
|
data/lib/PropertySet.rb
CHANGED
|
@@ -101,12 +101,21 @@ class TaskJuggler
|
|
|
101
101
|
@attributeDefinitions[attrId].scenarioSpecific
|
|
102
102
|
end
|
|
103
103
|
|
|
104
|
-
# Return whether the attribute with _attrId_ is
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
# Return whether the attribute with _attrId_ is inherited from the global
|
|
105
|
+
# scope.
|
|
106
|
+
def inheritedFromProject?(attrId)
|
|
107
|
+
# All hardwired attributes are not inherited.
|
|
108
|
+
return false if @attributeDefinitions[attrId].nil?
|
|
109
|
+
|
|
110
|
+
@attributeDefinitions[attrId].inheritedFromProject
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Return whether the attribute with _attrId_ is inherited from parent.
|
|
114
|
+
def inheritedFromParent?(attrId)
|
|
115
|
+
# All hardwired attributes are not inherited.
|
|
107
116
|
return false if @attributeDefinitions[attrId].nil?
|
|
108
117
|
|
|
109
|
-
@attributeDefinitions[attrId].
|
|
118
|
+
@attributeDefinitions[attrId].inheritedFromParent
|
|
110
119
|
end
|
|
111
120
|
|
|
112
121
|
# Return whether or not the attribute was user defined.
|
data/lib/PropertyTreeNode.rb
CHANGED
|
@@ -40,6 +40,12 @@ class TaskJuggler
|
|
|
40
40
|
# specified by a hierachical _id_ (e. g. 'father.son').
|
|
41
41
|
def initialize(propertySet, id, name, parent)
|
|
42
42
|
@propertySet = propertySet
|
|
43
|
+
# If _id_ is still nil, we generate a unique id.
|
|
44
|
+
unless id
|
|
45
|
+
tag = self.class.to_s.gsub(/TaskJuggler::/, '')
|
|
46
|
+
id = '_' + tag + '_' + (propertySet.items + 1).to_s
|
|
47
|
+
id = parent.id + '.' + id if !@propertySet.flatNamespace && parent
|
|
48
|
+
end
|
|
43
49
|
if !@propertySet.flatNamespace && id.include?('.')
|
|
44
50
|
parentId = id[0..(id.rindex('.') - 1)]
|
|
45
51
|
# Set parent to the parent property if it's still nil.
|
|
@@ -73,13 +79,19 @@ class TaskJuggler
|
|
|
73
79
|
|
|
74
80
|
@attributes = Hash.new
|
|
75
81
|
@scenarioAttributes = Array.new(@project.scenarioCount)
|
|
76
|
-
@
|
|
77
|
-
|
|
78
|
-
end
|
|
82
|
+
@scenarioAttributes.collect! { |sca| sca = Hash.new }
|
|
83
|
+
|
|
79
84
|
# Scenario specific data
|
|
80
85
|
@data = nil
|
|
81
86
|
end
|
|
82
87
|
|
|
88
|
+
# We only use deep_clone for attributes, never for properties. Since
|
|
89
|
+
# attributes may reference properties these references should remain
|
|
90
|
+
# references.
|
|
91
|
+
def deep_clone
|
|
92
|
+
self
|
|
93
|
+
end
|
|
94
|
+
|
|
83
95
|
# Return the index of the child _node_.
|
|
84
96
|
def levelSeqNo(node)
|
|
85
97
|
@children.index(node) + 1
|
|
@@ -87,12 +99,9 @@ class TaskJuggler
|
|
|
87
99
|
|
|
88
100
|
# Inherit values for the attributes from the parent node or the Project.
|
|
89
101
|
def inheritAttributes
|
|
90
|
-
# These attributes are being inherited from the Project.
|
|
91
|
-
whitelist = %w( limits priority projectid rate vacation workinghours )
|
|
92
|
-
|
|
93
102
|
# Inherit non-scenario-specific values
|
|
94
103
|
@propertySet.eachAttributeDefinition do |attrDef|
|
|
95
|
-
next if attrDef.scenarioSpecific || !attrDef.
|
|
104
|
+
next if attrDef.scenarioSpecific || !attrDef.inheritedFromParent
|
|
96
105
|
|
|
97
106
|
aId = attrDef.id
|
|
98
107
|
if parent
|
|
@@ -102,7 +111,7 @@ class TaskJuggler
|
|
|
102
111
|
end
|
|
103
112
|
else
|
|
104
113
|
# Inherit selected values from project if top-level property
|
|
105
|
-
if
|
|
114
|
+
if attrDef.inheritedFromProject
|
|
106
115
|
if @project[aId]
|
|
107
116
|
@attributes[aId].inherit(@project[aId])
|
|
108
117
|
end
|
|
@@ -112,7 +121,7 @@ class TaskJuggler
|
|
|
112
121
|
|
|
113
122
|
# Inherit scenario-specific values
|
|
114
123
|
@propertySet.eachAttributeDefinition do |attrDef|
|
|
115
|
-
next if !attrDef.scenarioSpecific || !attrDef.
|
|
124
|
+
next if !attrDef.scenarioSpecific || !attrDef.inheritedFromParent
|
|
116
125
|
|
|
117
126
|
@project.scenarioCount.times do |scenarioIdx|
|
|
118
127
|
if parent
|
|
@@ -124,7 +133,7 @@ class TaskJuggler
|
|
|
124
133
|
end
|
|
125
134
|
else
|
|
126
135
|
# Inherit selected values from project if top-level property
|
|
127
|
-
if
|
|
136
|
+
if attrDef.inheritedFromProject
|
|
128
137
|
if @project[attrDef.id] &&
|
|
129
138
|
@scenarioAttributes[scenarioIdx][attrDef.id]
|
|
130
139
|
@scenarioAttributes[scenarioIdx][attrDef.id].inherit(
|
|
@@ -156,8 +165,8 @@ class TaskJuggler
|
|
|
156
165
|
inherited(attrDef.id, parentScenarioIdx)) &&
|
|
157
166
|
!(provided(attrDef.id, scenarioIdx) ||
|
|
158
167
|
inherited(attrDef.id, scenarioIdx))
|
|
159
|
-
@scenarioAttributes[scenarioIdx][attrDef.id]
|
|
160
|
-
|
|
168
|
+
@scenarioAttributes[scenarioIdx][attrDef.id] =
|
|
169
|
+
@scenarioAttributes[parentScenarioIdx][attrDef.id].deep_clone
|
|
161
170
|
end
|
|
162
171
|
end
|
|
163
172
|
end
|
|
@@ -321,7 +330,16 @@ class TaskJuggler
|
|
|
321
330
|
# _scenarioIdx_.
|
|
322
331
|
def getAttr(attributeId, scenarioIdx = nil)
|
|
323
332
|
if scenarioIdx.nil?
|
|
324
|
-
|
|
333
|
+
case attributeId
|
|
334
|
+
when 'id'
|
|
335
|
+
@id
|
|
336
|
+
when 'name'
|
|
337
|
+
@name
|
|
338
|
+
when 'seqno'
|
|
339
|
+
@sequenceNo
|
|
340
|
+
else
|
|
341
|
+
@attributes[attributeId]
|
|
342
|
+
end
|
|
325
343
|
else
|
|
326
344
|
@scenarioAttributes[scenarioIdx][attributeId]
|
|
327
345
|
end
|
|
@@ -410,12 +428,13 @@ class TaskJuggler
|
|
|
410
428
|
end
|
|
411
429
|
res += ' Children: ' + children + "\n" unless children.empty?
|
|
412
430
|
@attributes.sort.each do |key, attr|
|
|
413
|
-
if attr.get != @propertySet.defaultValue(key)
|
|
431
|
+
#if attr.get != @propertySet.defaultValue(key)
|
|
414
432
|
res += indent(" #{key}: ", attr.to_s)
|
|
415
|
-
end
|
|
433
|
+
#end
|
|
416
434
|
end
|
|
417
435
|
unless @scenarioAttributes.empty?
|
|
418
436
|
project.scenarioCount.times do |sc|
|
|
437
|
+
break if @scenarioAttributes[sc].nil?
|
|
419
438
|
headerShown = false
|
|
420
439
|
@scenarioAttributes[sc].sort.each do |key, attr|
|
|
421
440
|
if attr.get != @propertySet.defaultValue(key)
|
data/lib/Query.rb
CHANGED
|
@@ -73,7 +73,8 @@ class TaskJuggler
|
|
|
73
73
|
end
|
|
74
74
|
# Same for the scope property.
|
|
75
75
|
if !@scopeProperty.nil? && !@scopePropertyId.nil?
|
|
76
|
-
@scopeProperty = resolvePropertyId(@scopePropertyType,
|
|
76
|
+
@scopeProperty = resolvePropertyId(@scopePropertyType,
|
|
77
|
+
@scopePropertyId)
|
|
77
78
|
end
|
|
78
79
|
# Make sure the have a reference to the project.
|
|
79
80
|
@project = @property.project unless @project
|
data/lib/RTPNavigator.rb
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/usr/bin/env ruby -w
|
|
2
|
+
# encoding: UTF-8
|
|
3
|
+
#
|
|
4
|
+
# = RTPNavigator.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 'RichTextProtocolHandler'
|
|
14
|
+
require 'XMLElement'
|
|
15
|
+
require 'reports/Navigator'
|
|
16
|
+
|
|
17
|
+
class TaskJuggler
|
|
18
|
+
|
|
19
|
+
# This class is a specialized RichTextProtocolHandler that generates a
|
|
20
|
+
# navigation bar for all reports that match the specified LogicalExpression.
|
|
21
|
+
# It currently only supports HTML.
|
|
22
|
+
class RTPNavigator < RichTextProtocolHandler
|
|
23
|
+
|
|
24
|
+
def initialize(project, sourceFileInfo)
|
|
25
|
+
super(project, 'navigator', sourceFileInfo)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Not supported for this protocol
|
|
29
|
+
def to_s(args)
|
|
30
|
+
''
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Return a XMLElement tree that represents the navigator in HTML code.
|
|
34
|
+
def to_html(args)
|
|
35
|
+
if args.nil? || (id = args['id']).nil?
|
|
36
|
+
error('rtp_nav_id_missing',
|
|
37
|
+
"Argument 'id' missing to specify the navigator to be used.")
|
|
38
|
+
end
|
|
39
|
+
unless (navBar = @project['navigators'][id])
|
|
40
|
+
error('rtp_nav_unknown_id', "Unknown navigator #{id}")
|
|
41
|
+
end
|
|
42
|
+
navBar.to_html
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Not supported for this protocol.
|
|
46
|
+
def to_tagged(args)
|
|
47
|
+
nil
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
end
|
|
53
|
+
|
data/lib/RTPReport.rb
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env ruby -w
|
|
2
|
+
# encoding: UTF-8
|
|
3
|
+
#
|
|
4
|
+
# = RTPReport.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 'RichTextProtocolHandler'
|
|
14
|
+
require 'XMLElement'
|
|
15
|
+
|
|
16
|
+
class TaskJuggler
|
|
17
|
+
|
|
18
|
+
# This class is a specialized RichTextProtocolHandler that includes a
|
|
19
|
+
# report into the RichText output for supported formats.
|
|
20
|
+
class RTPReport < RichTextProtocolHandler
|
|
21
|
+
|
|
22
|
+
def initialize(project, sourceFileInfo)
|
|
23
|
+
super(project, 'report', sourceFileInfo)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Not supported for this protocol
|
|
27
|
+
def to_s(args)
|
|
28
|
+
''
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Return a HTML tree for the report.
|
|
32
|
+
def to_html(args)
|
|
33
|
+
if args.nil? || (id = args['id']).nil?
|
|
34
|
+
error('rtp_report_id',
|
|
35
|
+
"Argument 'id' missing to specify the report to be used.")
|
|
36
|
+
end
|
|
37
|
+
unless (report = @project.report(id))
|
|
38
|
+
error('rtp_report_unknown_id', "Unknown report #{id}")
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Save the old report context record
|
|
42
|
+
oldReportContext = @project.reportContext
|
|
43
|
+
# Create a new context for the report.
|
|
44
|
+
@project.reportContext = ReportContext.new(@project, report)
|
|
45
|
+
# Generate the report with the new context
|
|
46
|
+
report.generate
|
|
47
|
+
html = report.to_html
|
|
48
|
+
# Restore the global report context record again.
|
|
49
|
+
@project.reportContext = oldReportContext
|
|
50
|
+
|
|
51
|
+
html
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Not supported for this protocol.
|
|
55
|
+
def to_tagged(args)
|
|
56
|
+
nil
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
end
|
|
62
|
+
|
data/lib/RealFormat.rb
CHANGED
|
@@ -16,20 +16,33 @@ class TaskJuggler
|
|
|
16
16
|
# rules. These rules determine how negative values are represented, how the
|
|
17
17
|
# fractional part is shown and how to structure the mantissa. The result is
|
|
18
18
|
# always a String.
|
|
19
|
+
#
|
|
20
|
+
# The class uses the following parameters to control the formating.
|
|
21
|
+
# signPrefix: Prefix used for negative numbers. (String)
|
|
22
|
+
# signSuffix: Suffix used for negative numbers. (String)
|
|
23
|
+
# thousandsSeparator: Separator used after 3 integer digits. (String)
|
|
24
|
+
# fractionSeparator: Separator used between the inter part and the
|
|
25
|
+
# fractional part. (String)
|
|
26
|
+
# fractionDigits: Number of fractional digits to show. (Fixnum)
|
|
19
27
|
class RealFormat
|
|
20
28
|
|
|
21
29
|
# Create a new RealFormat object and define the formating rules.
|
|
22
30
|
def initialize(args)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
iVars = %w( @signPrefix @signSuffix @thousandsSeparator
|
|
32
|
+
@fractionSeparator @fractionDigits )
|
|
33
|
+
if args.is_a?(RealFormat)
|
|
34
|
+
# The argument is another RealFormat object.
|
|
35
|
+
iVars.each do |iVar|
|
|
36
|
+
instance_variable_set(iVar, args.instance_variable_get(iVar))
|
|
37
|
+
end
|
|
38
|
+
elsif args.length == 5
|
|
39
|
+
# The argument is a list of values.
|
|
40
|
+
0.upto(4) do |i|
|
|
41
|
+
instance_variable_set(iVars[i], args[i])
|
|
42
|
+
end
|
|
43
|
+
else
|
|
44
|
+
raise RuntimeError, "Bad number of parameters #{args.length}"
|
|
45
|
+
end
|
|
33
46
|
end
|
|
34
47
|
|
|
35
48
|
# Converts the Float _number_ into a String representation according to the
|
|
@@ -67,6 +80,11 @@ class TaskJuggler
|
|
|
67
80
|
out
|
|
68
81
|
end
|
|
69
82
|
|
|
83
|
+
def to_s
|
|
84
|
+
[ @signPrefix, @signSuffix, @thousandsSeparator, @fractionSeparator,
|
|
85
|
+
@fractionDigits ].collect { |s| "\"#{s}\"" }.join(' ')
|
|
86
|
+
end
|
|
87
|
+
|
|
70
88
|
end
|
|
71
89
|
|
|
72
90
|
end
|
data/lib/RichTextElement.rb
CHANGED
|
@@ -162,6 +162,7 @@ class TaskJuggler
|
|
|
162
162
|
post = "\n\n"
|
|
163
163
|
when :ref
|
|
164
164
|
when :href
|
|
165
|
+
when :blockfunc
|
|
165
166
|
when :italic
|
|
166
167
|
when :bold
|
|
167
168
|
when :code
|
|
@@ -243,6 +244,14 @@ class TaskJuggler
|
|
|
243
244
|
when :href
|
|
244
245
|
pre = "<a href=\"#{@data}\" target=\"_blank\">"
|
|
245
246
|
post = '</a>'
|
|
247
|
+
when :blockfunc
|
|
248
|
+
pre = "<blockfunc:#{@data[0]}"
|
|
249
|
+
if @data[1]
|
|
250
|
+
@data[1].keys.sort.each do |key|
|
|
251
|
+
pre += " #{key}=\"#{@data[1][key]}\""
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
post = "/>"
|
|
246
255
|
when :italic
|
|
247
256
|
pre = '<i>'
|
|
248
257
|
post = '</i>'
|
|
@@ -273,6 +282,7 @@ class TaskJuggler
|
|
|
273
282
|
|
|
274
283
|
# Convert the intermediate representation into HTML elements.
|
|
275
284
|
def to_html
|
|
285
|
+
noChilds = false
|
|
276
286
|
html =
|
|
277
287
|
case @category
|
|
278
288
|
when :richtext
|
|
@@ -296,10 +306,12 @@ class TaskJuggler
|
|
|
296
306
|
end
|
|
297
307
|
el
|
|
298
308
|
when :hline
|
|
309
|
+
noChilds = true
|
|
299
310
|
XMLElement.new('hr')
|
|
300
311
|
when :paragraph
|
|
301
312
|
XMLElement.new('p')
|
|
302
313
|
when :pre
|
|
314
|
+
noChilds = true
|
|
303
315
|
pre = XMLElement.new('pre')
|
|
304
316
|
pre << XMLText.new(@children[0])
|
|
305
317
|
when :bulletlist1
|
|
@@ -327,19 +339,12 @@ class TaskJuggler
|
|
|
327
339
|
when :numberitem3
|
|
328
340
|
XMLElement.new('li')
|
|
329
341
|
when :ref
|
|
330
|
-
|
|
331
|
-
protocol, path = @data.split(':')
|
|
332
|
-
raise TjException.new, "Reference protocol empty." if protocol.empty?
|
|
333
|
-
if path.empty?
|
|
334
|
-
raise TjException.new, "Reference path may not be empty."
|
|
335
|
-
end
|
|
336
|
-
args = children_to_s.split(' ')
|
|
337
|
-
return @richText.protocolHandler(protocol).to_html(path, args)
|
|
338
|
-
else
|
|
339
|
-
XMLElement.new('a', 'href' => "#{@data}.html")
|
|
340
|
-
end
|
|
342
|
+
XMLElement.new('a', 'href' => "#{@data}.html")
|
|
341
343
|
when :href
|
|
342
344
|
XMLElement.new('a', 'href' => @data, 'target' => '_blank')
|
|
345
|
+
when :blockfunc
|
|
346
|
+
noChilds = true
|
|
347
|
+
@richText.protocolHandler(@data[0]).to_html(@data[1])
|
|
343
348
|
when :italic
|
|
344
349
|
XMLElement.new('i')
|
|
345
350
|
when :bold
|
|
@@ -347,13 +352,14 @@ class TaskJuggler
|
|
|
347
352
|
when :code
|
|
348
353
|
XMLElement.new('code')
|
|
349
354
|
when :text
|
|
355
|
+
noChilds = true
|
|
350
356
|
XMLText.new(@children[0])
|
|
351
357
|
else
|
|
352
358
|
raise TjException.new, "Unknown RichTextElement category #{@category}"
|
|
353
359
|
end
|
|
354
360
|
|
|
355
361
|
# Some elements never have leaves.
|
|
356
|
-
return html if
|
|
362
|
+
return html if noChilds
|
|
357
363
|
|
|
358
364
|
@children.each do |el_i|
|
|
359
365
|
html << el_i.to_html
|
data/lib/RichTextParser.rb
CHANGED
|
@@ -33,6 +33,7 @@ class TaskJuggler
|
|
|
33
33
|
# These are the tokens that can be returned by the RichTextScanner.
|
|
34
34
|
@variables = %w( LINEBREAK SPACE WORD BOLD ITALIC CODE BOLDITALIC PRE
|
|
35
35
|
HREF HREFEND REF REFEND HLINE
|
|
36
|
+
BLOCKFUNCSTART BLOCKFUNCEND ID STRING
|
|
36
37
|
TITLE1 TITLE2 TITLE3 TITLE1END TITLE2END TITLE3END
|
|
37
38
|
BULLET1 BULLET2 BULLET3 NUMBER1 NUMBER2 NUMBER3 )
|
|
38
39
|
# Load the rule set into the parser.
|
|
@@ -22,27 +22,24 @@ class TaskJuggler
|
|
|
22
22
|
class RichTextProtocolExample < RichTextProtocolHandler
|
|
23
23
|
|
|
24
24
|
def initialize
|
|
25
|
-
super('example')
|
|
25
|
+
super(nil, 'example')
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
# Not supported for this protocol
|
|
29
|
-
def to_s(
|
|
29
|
+
def to_s(args)
|
|
30
30
|
''
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
# Return a XMLElement tree that represents the example file as HTML code.
|
|
34
|
-
def to_html(
|
|
35
|
-
|
|
36
|
-
raise "
|
|
37
|
-
elsif args.length == 1
|
|
38
|
-
tag = args[0]
|
|
39
|
-
else
|
|
40
|
-
tag = nil
|
|
34
|
+
def to_html(args)
|
|
35
|
+
unless (file = args['file'])
|
|
36
|
+
raise "'file' argument missing"
|
|
41
37
|
end
|
|
38
|
+
tag = args['tag']
|
|
42
39
|
|
|
43
40
|
example = TjpExample.new
|
|
44
41
|
fileName = AppConfig.dataDirs('test')[0] +
|
|
45
|
-
"TestSuite/Syntax/Correct/#{
|
|
42
|
+
"TestSuite/Syntax/Correct/#{file}.tjp"
|
|
46
43
|
example.open(fileName)
|
|
47
44
|
frame = XMLElement.new('div', 'class' => 'codeframe')
|
|
48
45
|
frame << (pre = XMLElement.new('pre', 'class' => 'code'))
|
|
@@ -55,7 +52,7 @@ class TaskJuggler
|
|
|
55
52
|
end
|
|
56
53
|
|
|
57
54
|
# Not supported for this protocol.
|
|
58
|
-
def to_tagged(
|
|
55
|
+
def to_tagged(args)
|
|
59
56
|
nil
|
|
60
57
|
end
|
|
61
58
|
|
|
@@ -25,8 +25,18 @@ class TaskJuggler
|
|
|
25
25
|
|
|
26
26
|
attr_reader :protocol
|
|
27
27
|
|
|
28
|
-
def initialize(protocol)
|
|
28
|
+
def initialize(project, protocol, sourceFileInfo = nil)
|
|
29
|
+
@project = project
|
|
29
30
|
@protocol = protocol
|
|
31
|
+
@sourceFileInfo = sourceFileInfo
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def error(id, text)
|
|
35
|
+
message = Message.new(id, 'error', text, nil, nil, @sourceFileInfo)
|
|
36
|
+
@project.sendMessage(message)
|
|
37
|
+
|
|
38
|
+
# An empty strings signals an already reported error
|
|
39
|
+
raise TjException.new, ''
|
|
30
40
|
end
|
|
31
41
|
|
|
32
42
|
end
|