taskjuggler 0.0.3 → 0.0.4
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/benchmarks/UTF-8-Strings.rb +58 -0
- data/data/css/tjmanual.css +52 -0
- data/data/css/tjreport.css +195 -0
- data/data/icons/details.png +0 -0
- data/data/icons/flag-green.png +0 -0
- data/data/icons/flag-red.png +0 -0
- data/data/icons/flag-yellow.png +0 -0
- data/data/icons/resource.png +0 -0
- data/data/icons/resourcegroup.png +0 -0
- data/data/icons/task.png +0 -0
- data/data/icons/taskgroup.png +0 -0
- data/data/icons/trend-down.png +0 -0
- data/data/icons/trend-flat.png +0 -0
- data/data/icons/trend-up.png +0 -0
- data/data/scripts/wz_tooltip.js +1301 -0
- data/doc/classes/AppConfig.html +298 -230
- data/doc/classes/Arguments.html +8 -8
- data/doc/classes/Object.html +7 -7
- data/doc/classes/String.html +89 -89
- data/doc/classes/TaskJuggler.html +396 -264
- data/doc/classes/TaskJuggler/Account.html +18 -18
- data/doc/classes/TaskJuggler/AccountAttribute.html +26 -26
- data/doc/classes/TaskJuggler/AccountScenario.html +12 -12
- data/doc/classes/TaskJuggler/Allocation.html +30 -30
- data/doc/classes/TaskJuggler/AllocationAttribute.html +26 -26
- data/doc/classes/TaskJuggler/AttributeBase.html +227 -115
- data/doc/classes/TaskJuggler/AttributeDefinition.html +6 -6
- data/doc/classes/TaskJuggler/BatchProcessor.html +117 -83
- data/doc/classes/TaskJuggler/Booking.html +18 -18
- data/doc/classes/TaskJuggler/BookingListAttribute.html +26 -26
- data/doc/classes/TaskJuggler/BooleanAttribute.html +26 -26
- data/doc/classes/TaskJuggler/CSVFile.html +24 -24
- data/doc/classes/TaskJuggler/CellSettingPattern.html +201 -0
- data/doc/classes/TaskJuggler/CellSettingPatternList.html +253 -0
- data/doc/classes/TaskJuggler/Charge.html +18 -18
- data/doc/classes/TaskJuggler/ChargeListAttribute.html +20 -20
- data/doc/classes/TaskJuggler/ChargeSet.html +37 -37
- data/doc/classes/TaskJuggler/ChargeSetListAttribute.html +26 -26
- data/doc/classes/TaskJuggler/ColumnListAttribute.html +20 -20
- data/doc/classes/TaskJuggler/ColumnTable.html +40 -40
- data/doc/classes/TaskJuggler/DateAttribute.html +54 -15
- data/doc/classes/TaskJuggler/DefinitionListAttribute.html +10 -10
- data/doc/classes/TaskJuggler/DependencyListAttribute.html +47 -47
- data/doc/classes/TaskJuggler/DurationAttribute.html +30 -30
- data/doc/classes/TaskJuggler/FixnumAttribute.html +20 -20
- data/doc/classes/TaskJuggler/FlagListAttribute.html +43 -43
- data/doc/classes/TaskJuggler/FloatAttribute.html +30 -30
- data/doc/classes/TaskJuggler/FormatListAttribute.html +21 -21
- data/doc/classes/TaskJuggler/GanttChart.html +48 -48
- data/doc/classes/TaskJuggler/GanttContainer.html +42 -42
- data/doc/classes/TaskJuggler/GanttHeader.html +12 -12
- data/doc/classes/TaskJuggler/GanttHeaderScaleItem.html +12 -12
- data/doc/classes/TaskJuggler/GanttLine.html +24 -24
- data/doc/classes/TaskJuggler/GanttLoadStack.html +18 -18
- data/doc/classes/TaskJuggler/GanttMilestone.html +42 -42
- data/doc/classes/TaskJuggler/GanttRouter.html +24 -24
- data/doc/classes/TaskJuggler/GanttTaskBar.html +42 -42
- data/doc/classes/TaskJuggler/HTMLDocument.html +13 -13
- data/doc/classes/TaskJuggler/HTMLGraphics.html +12 -12
- data/doc/classes/TaskJuggler/Interval.html +57 -57
- data/doc/classes/TaskJuggler/IntervalListAttribute.html +47 -47
- data/doc/classes/TaskJuggler/JobInfo.html +68 -12
- data/doc/classes/TaskJuggler/Journal.html +266 -20
- data/doc/classes/TaskJuggler/JournalEntry.html +79 -23
- data/doc/classes/TaskJuggler/JournalEntryList.html +454 -0
- data/doc/classes/TaskJuggler/KeywordArray.html +10 -10
- data/doc/classes/TaskJuggler/KeywordDocumentation.html +171 -170
- data/doc/classes/TaskJuggler/Limits.html +36 -36
- data/doc/classes/TaskJuggler/Limits/Limit.html +30 -30
- data/doc/classes/TaskJuggler/LimitsAttribute.html +40 -40
- data/doc/classes/TaskJuggler/ListAttributeBase.html +20 -20
- data/doc/classes/TaskJuggler/Log.html +145 -107
- data/doc/classes/TaskJuggler/LogicalAttribute.html +65 -36
- data/doc/classes/TaskJuggler/LogicalExpression.html +61 -24
- data/doc/classes/TaskJuggler/LogicalExpressionAttribute.html +20 -20
- data/doc/classes/TaskJuggler/LogicalFlag.html +31 -51
- data/doc/classes/TaskJuggler/LogicalFunction.html +64 -53
- data/doc/classes/TaskJuggler/LogicalOperation.html +103 -55
- data/doc/classes/TaskJuggler/Macro.html +6 -6
- data/doc/classes/TaskJuggler/MacroParser.html +36 -36
- data/doc/classes/TaskJuggler/MacroTable.html +37 -37
- data/doc/classes/TaskJuggler/Message.html +12 -12
- data/doc/classes/TaskJuggler/MessageHandler.html +32 -20
- data/doc/classes/TaskJuggler/Navigator.html +110 -46
- data/doc/classes/TaskJuggler/NavigatorElement.html +449 -0
- data/doc/classes/TaskJuggler/OnShiftCache.html +24 -24
- data/doc/classes/TaskJuggler/Project.html +1158 -893
- data/doc/classes/TaskJuggler/ProjectFileParser.html +94 -91
- data/doc/classes/TaskJuggler/PropertyAttribute.html +20 -20
- data/doc/classes/TaskJuggler/PropertyList.html +225 -155
- data/doc/classes/TaskJuggler/PropertySet.html +375 -332
- data/doc/classes/TaskJuggler/PropertyTreeNode.html +750 -510
- data/doc/classes/TaskJuggler/Query.html +404 -139
- data/doc/classes/TaskJuggler/{RTPNavigator.html → RTFNavigator.html} +57 -56
- data/doc/classes/TaskJuggler/RTFQuery.html +343 -0
- data/doc/classes/TaskJuggler/{RTPReport.html → RTFReport.html} +70 -67
- data/doc/classes/TaskJuggler/RealFormat.html +18 -18
- data/doc/classes/TaskJuggler/RealFormatAttribute.html +10 -10
- data/doc/classes/TaskJuggler/ReferenceAttribute.html +107 -40
- data/doc/classes/TaskJuggler/RemoteServiceManager.html +335 -0
- data/doc/classes/TaskJuggler/Report.html +66 -64
- data/doc/classes/TaskJuggler/ReportBase.html +112 -123
- data/doc/classes/TaskJuggler/ReportContext.html +43 -38
- data/doc/classes/TaskJuggler/ReportServer.html +320 -0
- data/doc/classes/TaskJuggler/ReportTable.html +42 -42
- data/doc/classes/TaskJuggler/ReportTableCell.html +221 -129
- data/doc/classes/TaskJuggler/ReportTableColumn.html +27 -27
- data/doc/classes/TaskJuggler/ReportTableLegend.html +24 -24
- data/doc/classes/TaskJuggler/ReportTableLine.html +126 -80
- data/doc/classes/TaskJuggler/Resource.html +12 -12
- data/doc/classes/TaskJuggler/ResourceListAttribute.html +82 -47
- data/doc/classes/TaskJuggler/ResourceListRE.html +43 -39
- data/doc/classes/TaskJuggler/ResourceScenario.html +413 -321
- data/doc/classes/TaskJuggler/RichText.html +64 -248
- data/doc/classes/TaskJuggler/RichTextAttribute.html +94 -30
- data/doc/classes/TaskJuggler/RichTextDocument.html +87 -85
- data/doc/classes/TaskJuggler/RichTextElement.html +456 -363
- data/doc/classes/TaskJuggler/RichTextException.html +13 -13
- data/doc/classes/TaskJuggler/{RichTextProtocolExample.html → RichTextFunctionExample.html} +64 -63
- data/doc/classes/TaskJuggler/{RichTextProtocolHandler.html → RichTextFunctionHandler.html} +42 -36
- data/doc/classes/TaskJuggler/RichTextIntermediate.html +563 -0
- data/doc/classes/TaskJuggler/RichTextParser.html +54 -51
- data/doc/classes/TaskJuggler/RichTextScanner.html +94 -92
- data/doc/classes/TaskJuggler/RichTextSnip.html +96 -60
- data/doc/classes/TaskJuggler/RichTextSyntaxRules.html +369 -227
- data/doc/classes/TaskJuggler/Scenario.html +6 -6
- data/doc/classes/TaskJuggler/ScenarioData.html +37 -37
- data/doc/classes/TaskJuggler/ScenarioListAttribute.html +31 -31
- data/doc/classes/TaskJuggler/Scoreboard.html +66 -66
- data/doc/classes/TaskJuggler/Shift.html +18 -18
- data/doc/classes/TaskJuggler/ShiftAssignment.html +54 -54
- data/doc/classes/TaskJuggler/ShiftAssignments.html +78 -78
- data/doc/classes/TaskJuggler/ShiftAssignmentsAttribute.html +40 -40
- data/doc/classes/TaskJuggler/ShiftScenario.html +24 -24
- data/doc/classes/TaskJuggler/SortListAttribute.html +22 -22
- data/doc/classes/TaskJuggler/SourceFileInfo.html +12 -12
- data/doc/classes/TaskJuggler/StringAttribute.html +30 -30
- data/doc/classes/TaskJuggler/SymbolAttribute.html +20 -20
- data/doc/classes/TaskJuggler/SyntaxReference.html +42 -42
- data/doc/classes/TaskJuggler/TOCEntry.html +12 -12
- data/doc/classes/TaskJuggler/TSResourceRecord.html +197 -0
- data/doc/classes/TaskJuggler/TSTaskRecord.html +215 -0
- data/doc/classes/TaskJuggler/TableColumnDefinition.html +64 -43
- data/doc/classes/TaskJuggler/TableOfContents.html +18 -18
- data/doc/classes/TaskJuggler/TableReport.html +447 -468
- data/doc/classes/TaskJuggler/Task.html +12 -12
- data/doc/classes/TaskJuggler/TaskDependency.html +12 -12
- data/doc/classes/TaskJuggler/TaskListAttribute.html +47 -47
- data/doc/classes/TaskJuggler/TaskListRE.html +43 -39
- data/doc/classes/TaskJuggler/TaskScenario.html +529 -282
- data/doc/classes/TaskJuggler/TextParser.html +215 -194
- data/doc/classes/TaskJuggler/TextParser/Pattern.html +97 -97
- data/doc/classes/TaskJuggler/TextParser/Rule.html +84 -84
- data/doc/classes/TaskJuggler/TextParser/StackElement.html +16 -15
- data/doc/classes/TaskJuggler/TextParser/TextParserResultArray.html +12 -12
- data/doc/classes/TaskJuggler/TextParser/TokenDoc.html +6 -6
- data/doc/classes/TaskJuggler/TextReport.html +77 -74
- data/doc/classes/TaskJuggler/TextScanner.html +294 -281
- data/doc/classes/TaskJuggler/TextScanner/BufferStreamHandle.html +70 -70
- data/doc/classes/TaskJuggler/TextScanner/FileStreamHandle.html +59 -60
- data/doc/classes/TaskJuggler/TextScanner/StreamHandle.html +12 -12
- data/doc/classes/TaskJuggler/TimeSheetReport.html +406 -0
- data/doc/classes/TaskJuggler/TjException.html +6 -6
- data/doc/classes/TaskJuggler/TjTime.html +522 -513
- data/doc/classes/TaskJuggler/TjpExample.html +25 -25
- data/doc/classes/TaskJuggler/TjpExportRE.html +21 -24
- data/doc/classes/TaskJuggler/TjpSyntaxRules.html +6177 -4318
- data/doc/classes/TaskJuggler/UserManual.html +212 -213
- data/doc/classes/TaskJuggler/WorkingHours.html +49 -49
- data/doc/classes/TaskJuggler/WorkingHoursAttribute.html +53 -53
- data/doc/classes/TaskJuggler/XMLBlob.html +21 -21
- data/doc/classes/TaskJuggler/XMLComment.html +21 -21
- data/doc/classes/TaskJuggler/XMLDocument.html +27 -26
- data/doc/classes/TaskJuggler/XMLElement.html +86 -50
- data/doc/classes/TaskJuggler/XMLNamedText.html +11 -11
- data/doc/classes/TaskJuggler/XMLText.html +36 -36
- data/doc/files/COPYING.html +1 -1
- data/doc/files/README.html +1 -1
- data/doc/files/lib/AccountScenario_rb.html +3 -2
- data/doc/files/lib/Account_rb.html +3 -2
- data/doc/files/lib/Allocation_rb.html +3 -2
- data/doc/files/lib/AppConfig_rb.html +5 -2
- data/doc/files/lib/AttributeBase_rb.html +3 -2
- data/doc/files/lib/AttributeDefinition_rb.html +3 -2
- data/doc/files/lib/Attributes_rb.html +3 -2
- data/doc/files/lib/BatchProcessor_rb.html +4 -3
- data/doc/files/lib/Booking_rb.html +3 -2
- data/doc/files/lib/ChargeSet_rb.html +3 -2
- data/doc/files/lib/Charge_rb.html +3 -2
- data/doc/files/lib/HTMLDocument_rb.html +3 -2
- data/doc/files/lib/Interval_rb.html +3 -2
- data/doc/files/lib/Journal_rb.html +4 -3
- data/doc/files/lib/KeywordArray_rb.html +3 -2
- data/doc/files/lib/KeywordDocumentation_rb.html +3 -2
- data/doc/files/lib/Limits_rb.html +3 -2
- data/doc/files/lib/Log_rb.html +3 -2
- data/doc/files/lib/LogicalExpression_rb.html +3 -2
- data/doc/files/lib/LogicalFunction_rb.html +3 -2
- data/doc/files/lib/LogicalOperation_rb.html +3 -2
- data/doc/files/lib/MacroParser_rb.html +3 -2
- data/doc/files/lib/MacroTable_rb.html +3 -2
- data/doc/files/lib/MessageHandler_rb.html +3 -2
- data/doc/files/lib/Message_rb.html +3 -2
- data/doc/files/lib/ProjectFileParser_rb.html +7 -4
- data/doc/files/lib/Project_rb.html +3 -2
- data/doc/files/lib/PropertyList_rb.html +3 -2
- data/doc/files/lib/PropertySet_rb.html +3 -2
- data/doc/files/lib/PropertyTreeNode_rb.html +3 -2
- data/doc/files/lib/Query_rb.html +3 -2
- data/doc/files/lib/{RTPNavigator_rb.html → RTFNavigator_rb.html} +8 -7
- data/doc/files/lib/RTFQuery_rb.html +121 -0
- data/doc/files/lib/{RTPReport_rb.html → RTFReport_rb.html} +8 -7
- data/doc/files/lib/RealFormat_rb.html +3 -2
- data/doc/files/lib/RemoteServiceManager_rb.html +117 -0
- data/doc/files/lib/ReportServer_rb.html +107 -0
- data/doc/files/lib/ResourceScenario_rb.html +3 -2
- data/doc/files/lib/Resource_rb.html +3 -2
- data/doc/files/lib/RichTextDocument_rb.html +4 -3
- data/doc/files/lib/RichTextElement_rb.html +3 -2
- data/doc/files/lib/{RichTextProtocolExample_rb.html → RichTextFunctionExample_rb.html} +8 -7
- data/doc/files/lib/{RichTextProtocolHandler_rb.html → RichTextFunctionHandler_rb.html} +7 -6
- data/doc/files/lib/RichTextParser_rb.html +3 -2
- data/doc/files/lib/RichTextScanner_rb.html +3 -2
- data/doc/files/lib/RichTextSnip_rb.html +3 -2
- data/doc/files/lib/RichTextSyntaxRules_rb.html +3 -2
- data/doc/files/lib/RichText_rb.html +3 -2
- data/doc/files/lib/ScenarioData_rb.html +3 -2
- data/doc/files/lib/Scenario_rb.html +3 -2
- data/doc/files/lib/Scoreboard_rb.html +3 -2
- data/doc/files/lib/ShiftAssignments_rb.html +3 -2
- data/doc/files/lib/ShiftScenario_rb.html +3 -2
- data/doc/files/lib/Shift_rb.html +3 -2
- data/doc/files/lib/SourceFileInfo_rb.html +3 -2
- data/doc/files/lib/SyntaxReference_rb.html +3 -2
- data/doc/files/lib/TOCEntry_rb.html +3 -2
- data/doc/files/lib/TableColumnDefinition_rb.html +3 -2
- data/doc/files/lib/TableOfContents_rb.html +3 -2
- data/doc/files/lib/TaskDependency_rb.html +3 -2
- data/doc/files/lib/TaskJuggler_rb.html +7 -2
- data/doc/files/lib/TaskScenario_rb.html +3 -2
- data/doc/files/lib/Task_rb.html +3 -2
- data/doc/files/lib/TextParser/Pattern_rb.html +4 -3
- data/doc/files/lib/TextParser/Rule_rb.html +4 -3
- data/doc/files/lib/TextParser/StackElement_rb.html +4 -3
- data/doc/files/lib/TextParser/TokenDoc_rb.html +4 -3
- data/doc/files/lib/TextParser_rb.html +3 -2
- data/doc/files/lib/TextScanner_rb.html +3 -2
- data/doc/files/lib/Tj3Config_rb.html +3 -2
- data/doc/files/lib/TjException_rb.html +3 -2
- data/doc/files/lib/TjTime_rb.html +3 -2
- data/doc/files/lib/TjpExample_rb.html +3 -2
- data/doc/files/lib/TjpSyntaxRules_rb.html +3 -2
- data/doc/files/lib/UTF8String_rb.html +14 -6
- data/doc/files/lib/UserManual_rb.html +6 -3
- data/doc/files/lib/WorkingHours_rb.html +3 -2
- data/doc/files/lib/XMLDocument_rb.html +3 -2
- data/doc/files/lib/XMLElement_rb.html +3 -2
- data/doc/files/lib/deep_copy_rb.html +3 -2
- data/doc/files/lib/reports/CSVFile_rb.html +3 -2
- data/doc/files/lib/reports/ColumnTable_rb.html +3 -2
- data/doc/files/lib/reports/GanttChart_rb.html +3 -2
- data/doc/files/lib/reports/GanttContainer_rb.html +3 -2
- data/doc/files/lib/reports/GanttHeaderScaleItem_rb.html +3 -2
- data/doc/files/lib/reports/GanttHeader_rb.html +3 -2
- data/doc/files/lib/reports/GanttLine_rb.html +3 -2
- data/doc/files/lib/reports/GanttLoadStack_rb.html +3 -2
- data/doc/files/lib/reports/GanttMilestone_rb.html +3 -2
- data/doc/files/lib/reports/GanttRouter_rb.html +3 -2
- data/doc/files/lib/reports/GanttTaskBar_rb.html +3 -2
- data/doc/files/lib/reports/HTMLGraphics_rb.html +3 -2
- data/doc/files/lib/reports/Navigator_rb.html +3 -2
- data/doc/files/lib/reports/ReportBase_rb.html +3 -2
- data/doc/files/lib/reports/ReportContext_rb.html +3 -2
- data/doc/files/lib/reports/ReportTableCell_rb.html +3 -2
- data/doc/files/lib/reports/ReportTableColumn_rb.html +3 -2
- data/doc/files/lib/reports/ReportTableLegend_rb.html +3 -2
- data/doc/files/lib/reports/ReportTableLine_rb.html +3 -2
- data/doc/files/lib/reports/ReportTable_rb.html +3 -2
- data/doc/files/lib/reports/Report_rb.html +7 -2
- data/doc/files/lib/reports/ResourceListRE_rb.html +3 -2
- data/doc/files/lib/reports/TableReport_rb.html +3 -2
- data/doc/files/lib/reports/TaskListRE_rb.html +3 -2
- data/doc/files/lib/reports/TextReport_rb.html +4 -3
- data/doc/files/lib/reports/TimeSheetReport_rb.html +117 -0
- data/doc/files/lib/reports/TjpExportRE_rb.html +3 -2
- data/doc/files/lib/taskjuggler3_rb.html +94 -77
- data/doc/files/lib/tj3client_rb.html +280 -0
- data/doc/files/lib/tj3man_rb.html +10 -9
- data/doc/fr_class_index.html +27 -5
- data/doc/fr_file_index.html +15 -7
- data/doc/fr_method_index.html +1312 -1020
- data/examples/tutorial.tjp +113 -14
- data/gem_spec.rb +2 -1
- data/lib/Account.rb +1 -1
- data/lib/AccountScenario.rb +1 -1
- data/lib/Allocation.rb +1 -1
- data/lib/AppConfig.rb +23 -10
- data/lib/AttributeBase.rb +34 -6
- data/lib/AttributeDefinition.rb +1 -1
- data/lib/Attributes.rb +51 -16
- data/lib/BatchProcessor.rb +204 -77
- data/lib/Booking.rb +1 -1
- data/lib/Charge.rb +1 -1
- data/lib/ChargeSet.rb +1 -1
- data/lib/HTMLDocument.rb +2 -2
- data/lib/Interval.rb +1 -1
- data/lib/Journal.rb +231 -9
- data/lib/KeywordArray.rb +1 -1
- data/lib/KeywordDocumentation.rb +6 -4
- data/lib/Limits.rb +1 -1
- data/lib/Log.rb +8 -1
- data/lib/LogicalExpression.rb +14 -13
- data/lib/LogicalFunction.rb +88 -14
- data/lib/LogicalOperation.rb +124 -53
- data/lib/MacroParser.rb +1 -1
- data/lib/MacroTable.rb +2 -2
- data/lib/Message.rb +1 -1
- data/lib/MessageHandler.rb +7 -3
- data/lib/Project.rb +93 -14
- data/lib/ProjectFileParser.rb +30 -15
- data/lib/PropertyList.rb +103 -36
- data/lib/PropertySet.rb +22 -10
- data/lib/PropertyTreeNode.rb +120 -15
- data/lib/Query.rb +119 -48
- data/lib/{RTPNavigator.rb → RTFNavigator.rb} +11 -10
- data/lib/RTFQuery.rb +166 -0
- data/lib/{RTPReport.rb → RTFReport.rb} +11 -8
- data/lib/RealFormat.rb +1 -1
- data/lib/RemoteServiceManager.rb +80 -0
- data/lib/ReportServer.rb +66 -0
- data/lib/Resource.rb +1 -1
- data/lib/ResourceScenario.rb +48 -19
- data/lib/RichText.rb +98 -41
- data/lib/RichTextDocument.rb +10 -8
- data/lib/RichTextElement.rb +72 -28
- data/lib/{RichTextProtocolExample.rb → RichTextFunctionExample.rb} +8 -7
- data/lib/{RichTextProtocolHandler.rb → RichTextFunctionHandler.rb} +12 -14
- data/lib/RichTextParser.rb +6 -3
- data/lib/RichTextScanner.rb +91 -19
- data/lib/RichTextSnip.rb +8 -3
- data/lib/RichTextSyntaxRules.rb +103 -45
- data/lib/Scenario.rb +1 -1
- data/lib/ScenarioData.rb +2 -2
- data/lib/Scoreboard.rb +1 -1
- data/lib/Shift.rb +1 -1
- data/lib/ShiftAssignments.rb +1 -1
- data/lib/ShiftScenario.rb +1 -1
- data/lib/SourceFileInfo.rb +1 -1
- data/lib/SyntaxReference.rb +2 -2
- data/lib/TOCEntry.rb +1 -1
- data/lib/TableColumnDefinition.rb +59 -16
- data/lib/TableOfContents.rb +1 -1
- data/lib/Task.rb +1 -1
- data/lib/TaskDependency.rb +1 -1
- data/lib/TaskJuggler.rb +31 -8
- data/lib/TaskScenario.rb +165 -16
- data/lib/TextParser.rb +36 -22
- data/lib/TextParser/Pattern.rb +3 -3
- data/lib/TextParser/Rule.rb +2 -2
- data/lib/TextParser/StackElement.rb +4 -3
- data/lib/TextParser/TokenDoc.rb +2 -2
- data/lib/TextScanner.rb +52 -37
- data/lib/Tj3Config.rb +6 -5
- data/lib/TjException.rb +1 -1
- data/lib/TjTime.rb +12 -3
- data/lib/TjpExample.rb +1 -1
- data/lib/TjpSyntaxRules.rb +1044 -150
- data/lib/UTF8String.rb +2 -1
- data/lib/UserManual.rb +18 -70
- data/lib/WorkingHours.rb +3 -3
- data/lib/XMLDocument.rb +3 -2
- data/lib/XMLElement.rb +6 -1
- data/lib/deep_copy.rb +1 -1
- data/lib/reports/CSVFile.rb +1 -1
- data/lib/reports/ColumnTable.rb +9 -9
- data/lib/reports/GanttChart.rb +1 -1
- data/lib/reports/GanttContainer.rb +1 -1
- data/lib/reports/GanttHeader.rb +1 -1
- data/lib/reports/GanttHeaderScaleItem.rb +1 -1
- data/lib/reports/GanttLine.rb +40 -40
- data/lib/reports/GanttLoadStack.rb +1 -1
- data/lib/reports/GanttMilestone.rb +1 -1
- data/lib/reports/GanttRouter.rb +1 -1
- data/lib/reports/GanttTaskBar.rb +1 -1
- data/lib/reports/HTMLGraphics.rb +1 -1
- data/lib/reports/Navigator.rb +149 -22
- data/lib/reports/Report.rb +115 -172
- data/lib/reports/ReportBase.rb +22 -27
- data/lib/reports/ReportContext.rb +29 -15
- data/lib/reports/ReportTable.rb +1 -1
- data/lib/reports/ReportTableCell.rb +120 -27
- data/lib/reports/ReportTableColumn.rb +3 -3
- data/lib/reports/ReportTableLegend.rb +1 -1
- data/lib/reports/ReportTableLine.rb +10 -2
- data/lib/reports/ResourceListRE.rb +5 -1
- data/lib/reports/TableReport.rb +237 -287
- data/lib/reports/TaskListRE.rb +5 -1
- data/lib/reports/TextReport.rb +7 -4
- data/lib/reports/TimeSheetReport.rb +233 -0
- data/lib/reports/TjpExportRE.rb +2 -2
- data/lib/taskjuggler3.rb +27 -11
- data/lib/tj3client.rb +110 -0
- data/lib/tj3man.rb +4 -4
- data/manual/Getting_Started +0 -50
- data/manual/How_To_Contribute +6 -13
- data/manual/Installation +102 -28
- data/manual/Intro +11 -1
- data/manual/Reporting_Bugs +23 -7
- data/manual/Rich_Text_Attributes +59 -6
- data/manual/TaskJuggler_2x_Migration +27 -0
- data/manual/The_TaskJuggler_Syntax +104 -0
- data/manual/Tutorial +10 -9
- data/prj_cfg.rb +8 -2
- data/tasks/csts.rake +1 -1
- data/tasks/manual.rake +5 -3
- data/test/MessageChecker.rb +1 -1
- data/test/TestSuite/HTML-Reports/Alerts.html +172 -0
- data/test/TestSuite/HTML-Reports/Alerts.tjp +77 -0
- data/test/TestSuite/HTML-Reports/CellText.html +758 -0
- data/test/TestSuite/HTML-Reports/CellText.tjp +75 -0
- data/test/TestSuite/HTML-Reports/ColumnPeriods.html +156 -0
- data/test/TestSuite/HTML-Reports/ColumnPeriods.tjp +44 -0
- data/test/TestSuite/HTML-Reports/IsOngoing.html +172 -0
- data/test/TestSuite/HTML-Reports/IsOngoing.tjp +34 -0
- data/test/TestSuite/HTML-Reports/LogicalFunctions.html +80 -0
- data/test/TestSuite/HTML-Reports/LogicalFunctions.tjp +20 -0
- data/test/TestSuite/HTML-Reports/Query.html +31 -0
- data/test/TestSuite/HTML-Reports/Query.tjp +28 -0
- data/test/TestSuite/HTML-Reports/Sorting.tjp +68 -0
- data/test/TestSuite/HTML-Reports/TimeSheet.tjp +69 -0
- data/test/TestSuite/HTML-Reports/UDAQuery.tjp +27 -0
- data/test/TestSuite/HTML-Reports/css/tjmanual.css +52 -0
- data/test/TestSuite/HTML-Reports/css/tjreport.css +195 -0
- data/test/TestSuite/HTML-Reports/depArrows.html +842 -0
- data/test/TestSuite/HTML-Reports/icons/details.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/flag-green.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/flag-red.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/flag-yellow.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/resource.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/resourcegroup.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/task.png +0 -0
- data/test/TestSuite/HTML-Reports/icons/taskgroup.png +0 -0
- data/test/TestSuite/HTML-Reports/reference.tjp +7 -8
- data/test/TestSuite/HTML-Reports/scripts/scripts/wz_tooltip.js +1301 -0
- data/test/TestSuite/HTML-Reports/scripts/wz_tooltip.js +1301 -0
- data/test/TestSuite/Scheduler/Correct/Mandatory.tjp +34 -0
- data/test/TestSuite/Syntax/Correct/Celltext.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/Journal.tjp +2 -2
- data/test/TestSuite/Syntax/Correct/LogicalExpression.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/LogicalFunction.tjp +20 -0
- data/test/TestSuite/Syntax/Correct/Query.tjp +18 -0
- data/test/TestSuite/Syntax/Correct/StatusSheet.tjp +45 -0
- data/test/TestSuite/Syntax/Correct/TimeSheet.tjp +49 -0
- data/test/TestSuite/Syntax/Correct/icons/details.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/flag-green.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/flag-red.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/flag-yellow.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/resource.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/resourcegroup.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/task.png +0 -0
- data/test/TestSuite/Syntax/Correct/icons/taskgroup.png +0 -0
- data/test/TestSuite/Syntax/Correct/scripts/wz_tooltip.js +1301 -0
- data/test/TestSuite/Syntax/Correct/tutorial.tjp +113 -14
- data/test/TestSuite/Syntax/Errors/macro_stack_overflow.tjp +28 -0
- data/test/TestSuite/Syntax/Errors/unsupported_token.tjp +12 -0
- data/test/all.rb +2 -2
- data/test/test_BatchProcessor.rb +42 -13
- data/test/test_CSV-Reports.rb +1 -1
- data/test/test_Journal.rb +176 -0
- data/test/test_Limits.rb +1 -1
- data/test/test_LogicalExpression.rb +14 -5
- data/test/test_MacroTable.rb +1 -1
- data/test/test_Project.rb +1 -1
- data/test/test_PropertySet.rb +1 -1
- data/test/test_Query.rb +1 -1
- data/test/test_RealFormat.rb +1 -1
- data/test/test_RichText.rb +30 -20
- data/test/test_Scheduler.rb +1 -1
- data/test/test_ShiftAssignments.rb +2 -2
- data/test/test_Syntax.rb +1 -1
- data/test/test_TextScanner.rb +1 -1
- data/test/test_TjTime.rb +1 -1
- data/test/test_TjpExample.rb +1 -1
- data/test/test_UTF8String.rb +1 -1
- data/test/test_WorkingHours.rb +1 -1
- data/test/test_deep_copy.rb +2 -2
- metadata +610 -532
- data/doc/files/lib/ms_test_rb.html +0 -90
- data/examples/ContactList.html +0 -1467
- data/examples/Deliveries.html +0 -485
- data/examples/Development.html +0 -2525
- data/examples/Overview.html +0 -747
- data/examples/Resource Graph.html +0 -616
- data/lib/ms_test.rb +0 -27
- data/test/TestSuite/HTML-Reports/reference-export.html +0 -187
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env ruby -w
|
|
2
2
|
# encoding: UTF-8
|
|
3
3
|
#
|
|
4
|
-
# =
|
|
4
|
+
# = RichTextFunctionExample.rb -- The TaskJuggler III Project Management Software
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009 by Chris Schlaeger <cs@kde.org>
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010 by Chris Schlaeger <cs@kde.org>
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of version 2 of the GNU General Public License as
|
|
10
10
|
# published by the Free Software Foundation.
|
|
11
11
|
#
|
|
12
12
|
|
|
13
|
-
require '
|
|
13
|
+
require 'RichTextFunctionHandler'
|
|
14
14
|
require 'TjpExample'
|
|
15
15
|
require 'XMLElement'
|
|
16
16
|
|
|
17
17
|
class TaskJuggler
|
|
18
18
|
|
|
19
|
-
# This class is a specialized
|
|
19
|
+
# This class is a specialized RichTextFunctionHandler that turns references to
|
|
20
20
|
# TJP example code in the test/TestSuite/Syntax/Correct directory into
|
|
21
21
|
# embedded example code. It currently only supports HTML.
|
|
22
|
-
class
|
|
22
|
+
class RichTextFunctionExample < RichTextFunctionHandler
|
|
23
23
|
|
|
24
24
|
def initialize
|
|
25
25
|
super(nil, 'example')
|
|
26
|
+
@blockFunction = true
|
|
26
27
|
end
|
|
27
28
|
|
|
28
|
-
# Not supported for this
|
|
29
|
+
# Not supported for this function
|
|
29
30
|
def to_s(args)
|
|
30
31
|
''
|
|
31
32
|
end
|
|
@@ -51,7 +52,7 @@ class TaskJuggler
|
|
|
51
52
|
frame
|
|
52
53
|
end
|
|
53
54
|
|
|
54
|
-
# Not supported for this
|
|
55
|
+
# Not supported for this function.
|
|
55
56
|
def to_tagged(args)
|
|
56
57
|
nil
|
|
57
58
|
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env ruby -w
|
|
2
2
|
# encoding: UTF-8
|
|
3
3
|
#
|
|
4
|
-
# =
|
|
4
|
+
# = RichTextFunctionHandler.rb -- The TaskJuggler III Project Management Software
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009 by Chris Schlaeger <cs@kde.org>
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010 by Chris Schlaeger <cs@kde.org>
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of version 2 of the GNU General Public License as
|
|
@@ -12,31 +12,29 @@
|
|
|
12
12
|
|
|
13
13
|
class TaskJuggler
|
|
14
14
|
|
|
15
|
-
# This class is the abstract base class for all RichText
|
|
16
|
-
#
|
|
17
|
-
# 'query'.
|
|
18
|
-
# '[[example:Allocation 2]]'. 'example' is the
|
|
19
|
-
# path and '2' is the first argument. Arguments are optional.
|
|
15
|
+
# This class is the abstract base class for all RichText function handlers. A
|
|
16
|
+
# function handler is responsible for a certain function such as 'example' or
|
|
17
|
+
# 'query'. functions are used in internal RichText references such as
|
|
18
|
+
# '[[example:Allocation 2]]'. 'example' is the function, 'Allocation' is the
|
|
19
|
+
# path and '2' is the first argument. Arguments are optional. function handler
|
|
20
20
|
# can turn such internal references into Strings or XMLElement trees.
|
|
21
21
|
# Therefor, each derived handler needs to implement a to_s, to_html and
|
|
22
22
|
# to_tagged method that takes two parameter. The first is the path, the second
|
|
23
23
|
# is the argument Array.
|
|
24
|
-
class
|
|
24
|
+
class RichTextFunctionHandler
|
|
25
25
|
|
|
26
|
-
attr_reader :
|
|
26
|
+
attr_reader :function, :blockFunction
|
|
27
27
|
|
|
28
|
-
def initialize(project,
|
|
28
|
+
def initialize(project, function, sourceFileInfo = nil)
|
|
29
29
|
@project = project
|
|
30
|
-
@
|
|
30
|
+
@function = function
|
|
31
|
+
@blockFunction = false
|
|
31
32
|
@sourceFileInfo = sourceFileInfo
|
|
32
33
|
end
|
|
33
34
|
|
|
34
35
|
def error(id, text)
|
|
35
36
|
message = Message.new(id, 'error', text, nil, nil, @sourceFileInfo)
|
|
36
37
|
@project.sendMessage(message)
|
|
37
|
-
|
|
38
|
-
# An empty strings signals an already reported error
|
|
39
|
-
raise TjException.new, ''
|
|
40
38
|
end
|
|
41
39
|
|
|
42
40
|
end
|
data/lib/RichTextParser.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# = RichTextParser.rb -- The TaskJuggler III Project Management Software
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009 by Chris Schlaeger <cs@kde.org>
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010 by Chris Schlaeger <cs@kde.org>
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of version 2 of the GNU General Public License as
|
|
@@ -27,15 +27,18 @@ class TaskJuggler
|
|
|
27
27
|
|
|
28
28
|
# Create the parser and initialize the rule set. _rt_ is the RichText object
|
|
29
29
|
# the resulting tree of RichTextElement objects should belong to.
|
|
30
|
-
def initialize(
|
|
30
|
+
def initialize(rti, sectionCounter = [ 0, 0, 0], tokenSet = nil)
|
|
31
31
|
super()
|
|
32
|
-
@
|
|
32
|
+
@richTextI = rti
|
|
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
|
+
QUERY
|
|
37
|
+
INLINEFUNCSTART INLINEFUNCEND
|
|
36
38
|
BLOCKFUNCSTART BLOCKFUNCEND ID STRING
|
|
37
39
|
TITLE1 TITLE2 TITLE3 TITLE1END TITLE2END TITLE3END
|
|
38
40
|
BULLET1 BULLET2 BULLET3 NUMBER1 NUMBER2 NUMBER3 )
|
|
41
|
+
limitTokenSet(tokenSet)
|
|
39
42
|
# Load the rule set into the parser.
|
|
40
43
|
initRules
|
|
41
44
|
# The sections and numbered list can each nest 3 levels deep. We use these
|
data/lib/RichTextScanner.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# = RichTextScanner.rb -- The TaskJuggler III Project Management Software
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009 by Chris Schlaeger <cs@kde.org>
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010 by Chris Schlaeger <cs@kde.org>
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of version 2 of the GNU General Public License as
|
|
@@ -53,6 +53,7 @@ class TaskJuggler
|
|
|
53
53
|
# This is a wrapper for nextToken only used for debugging.
|
|
54
54
|
#def nextToken
|
|
55
55
|
# tok = nextTokenI
|
|
56
|
+
# raise "Token Error:" unless tok && tok[0] && tok[1]
|
|
56
57
|
# puts "#{tok[0]}: #{tok[1]}"
|
|
57
58
|
# tok
|
|
58
59
|
#end
|
|
@@ -68,6 +69,8 @@ class TaskJuggler
|
|
|
68
69
|
|
|
69
70
|
if @mode == :funcarg
|
|
70
71
|
return nextTokenFuncArg
|
|
72
|
+
elsif @mode == :href
|
|
73
|
+
return nextTokenHRef
|
|
71
74
|
end
|
|
72
75
|
if @beginOfLine && @mode == :wiki
|
|
73
76
|
if (res = nextTokenWikiBOL)
|
|
@@ -124,7 +127,7 @@ class TaskJuggler
|
|
|
124
127
|
# <-inlinefunc par1="value1" ... ->
|
|
125
128
|
def nextTokenFuncArg
|
|
126
129
|
token = [ '.', '<END>' ]
|
|
127
|
-
while c = nextChar
|
|
130
|
+
while (c = nextChar)
|
|
128
131
|
case c
|
|
129
132
|
when ' ', "\n", "\t"
|
|
130
133
|
if (tok = readBlanks(c))
|
|
@@ -153,6 +156,42 @@ class TaskJuggler
|
|
|
153
156
|
returnChar
|
|
154
157
|
end
|
|
155
158
|
end
|
|
159
|
+
token
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
def nextTokenHRef
|
|
163
|
+
token = [ '.', '<END>' ]
|
|
164
|
+
while (c = nextChar)
|
|
165
|
+
if c.nil?
|
|
166
|
+
# We've reached the end of the text.
|
|
167
|
+
return [ '.', '<END>' ]
|
|
168
|
+
elsif c == ' ' || c == "\t" || c == "\n"
|
|
169
|
+
# Sequences of tabs, spaces and newlines are treated as token
|
|
170
|
+
# boundaries, but otherwise they are ignored.
|
|
171
|
+
readSequence(" \n\t")
|
|
172
|
+
return [ 'SPACE', ' ' ]
|
|
173
|
+
elsif c == '<' && !@ignoreInlineMarkup
|
|
174
|
+
if nextChar == '-' && isIdStart(peek(1))
|
|
175
|
+
token = readId('', 'QUERY')
|
|
176
|
+
unless nextChar == '-' && nextChar == '>'
|
|
177
|
+
error('unterminated_query',
|
|
178
|
+
"Inline query must be terminated with '->'")
|
|
179
|
+
end
|
|
180
|
+
return token
|
|
181
|
+
else
|
|
182
|
+
# It's not a query.
|
|
183
|
+
returnChar(2)
|
|
184
|
+
@ignoreInlineMarkup = true
|
|
185
|
+
next
|
|
186
|
+
end
|
|
187
|
+
elsif c == ']'
|
|
188
|
+
@mode = :wiki
|
|
189
|
+
return [ 'HREFEND', ']' ]
|
|
190
|
+
else
|
|
191
|
+
return nextTokenWord(c)
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
token
|
|
156
195
|
end
|
|
157
196
|
|
|
158
197
|
def nextTokenWikiBOL
|
|
@@ -234,7 +273,7 @@ class TaskJuggler
|
|
|
234
273
|
elsif c == ' ' || c == "\t"
|
|
235
274
|
# Sequences of tabs or spaces are treated as token boundaries, but
|
|
236
275
|
# otherwise they are ignored.
|
|
237
|
-
readSequence(
|
|
276
|
+
readSequence(" \t")
|
|
238
277
|
[ 'SPACE', ' ' ]
|
|
239
278
|
elsif c == "'" && !@ignoreInlineMarkup
|
|
240
279
|
# Sequence of 2 ' means italic, 3 ' means bold, 4 ' means monospaced
|
|
@@ -270,10 +309,15 @@ class TaskJuggler
|
|
|
270
309
|
end
|
|
271
310
|
elsif c == '['
|
|
272
311
|
level = readSequenceMax('[', 2)
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
312
|
+
if level == 1
|
|
313
|
+
@mode = :href
|
|
314
|
+
[ 'HREF' , '[' ]
|
|
315
|
+
else
|
|
316
|
+
[ 'REF', '[[' ]
|
|
317
|
+
end
|
|
318
|
+
elsif c == ']' && peek == ']'
|
|
319
|
+
nextChar
|
|
320
|
+
[ 'REFEND', ']]' ]
|
|
277
321
|
elsif c == "\n"
|
|
278
322
|
nextTokenNewline
|
|
279
323
|
elsif c == '<' && !@ignoreInlineMarkup
|
|
@@ -291,7 +335,7 @@ class TaskJuggler
|
|
|
291
335
|
elsif c == ' ' || c == "\t"
|
|
292
336
|
# Sequences of tabs or spaces are treated as token boundaries, but
|
|
293
337
|
# otherwise they are ignored.
|
|
294
|
-
readSequence(
|
|
338
|
+
readSequence(" \t")
|
|
295
339
|
[ 'SPACE', ' ' ]
|
|
296
340
|
elsif c == "\n"
|
|
297
341
|
nextTokenNewline
|
|
@@ -310,14 +354,24 @@ class TaskJuggler
|
|
|
310
354
|
# the next character into the start of a control sequence.
|
|
311
355
|
# Hard linebreaks consist of a newline followed by another newline or
|
|
312
356
|
# any of the begin-of-line control characters.
|
|
313
|
-
if (c = nextChar)
|
|
357
|
+
if (c = nextChar).nil?
|
|
358
|
+
# We hit the end of the text.
|
|
359
|
+
[ '.', '<END>' ]
|
|
360
|
+
elsif c == '<' && peekMatch('[')
|
|
361
|
+
# the '<' can be a start of a block (BLOCKFUNCSTART) or inline text
|
|
362
|
+
# (INLINEFUNCSTART). Only for the first case the linebreak is real.
|
|
363
|
+
returnChar if c != "\n"
|
|
364
|
+
# The next character may be a control character.
|
|
365
|
+
@beginOfLine = true
|
|
366
|
+
[ 'LINEBREAK', "\n" ]
|
|
367
|
+
elsif "\n*# =-".include?(c)
|
|
368
|
+
# These characters correspond to the first characters of a block
|
|
369
|
+
# element. When they are found at the begin of the line, the newline
|
|
370
|
+
# was really a line break.
|
|
314
371
|
returnChar if c != "\n"
|
|
315
372
|
# The next character may be a control character.
|
|
316
373
|
@beginOfLine = true
|
|
317
374
|
[ 'LINEBREAK', "\n" ]
|
|
318
|
-
elsif c.nil?
|
|
319
|
-
# We hit the end of the text.
|
|
320
|
-
[ '.', '<END>' ]
|
|
321
375
|
else
|
|
322
376
|
# Single line breaks are treated as spaces. Return the char after
|
|
323
377
|
# the newline and start with this one again.
|
|
@@ -335,6 +389,11 @@ class TaskJuggler
|
|
|
335
389
|
# Turn most wiki markup interpretation on.
|
|
336
390
|
@pos += '/nowiki>'.length
|
|
337
391
|
@mode = :wiki
|
|
392
|
+
elsif peekMatch('-') && @mode == :wiki
|
|
393
|
+
nextChar
|
|
394
|
+
# Switch the parser to function argument parsing mode.
|
|
395
|
+
@mode = :funcarg
|
|
396
|
+
return [ 'INLINEFUNCSTART', '<-' ]
|
|
338
397
|
else
|
|
339
398
|
# We've not found a valid control sequence. Push back the character
|
|
340
399
|
# and make sure we treat it as a normal character.
|
|
@@ -353,11 +412,15 @@ class TaskJuggler
|
|
|
353
412
|
str << c
|
|
354
413
|
# Now we can collect characters of a word until we hit a whitespace.
|
|
355
414
|
while (c = nextChar) && !" \n\t".include?(c)
|
|
356
|
-
|
|
415
|
+
case @mode
|
|
416
|
+
when :wiki
|
|
357
417
|
# Or at least to ' characters in a row.
|
|
358
418
|
break if c == "'" && peek == "'"
|
|
359
|
-
# Or a ] or <
|
|
419
|
+
# Or a -, ] or <
|
|
360
420
|
break if ']<'.include?(c)
|
|
421
|
+
when :href
|
|
422
|
+
# Look for - of the end mark -> end ']'
|
|
423
|
+
break if c == '-' || c == ']' || c == '<'
|
|
361
424
|
else
|
|
362
425
|
# Make sure we find the </nowiki> tag even within a word.
|
|
363
426
|
break if c == '<'
|
|
@@ -372,7 +435,12 @@ class TaskJuggler
|
|
|
372
435
|
# Deliver the next character. Keep track of the cursor position. In case we
|
|
373
436
|
# reach the end, nil is returned.
|
|
374
437
|
def nextChar
|
|
375
|
-
|
|
438
|
+
if @pos >= @textLength
|
|
439
|
+
# Correct @pos so that returnChar works properly but mutliple reads of
|
|
440
|
+
# EOT are ignored.
|
|
441
|
+
@pos = @textLength + 1
|
|
442
|
+
return nil
|
|
443
|
+
end
|
|
376
444
|
c = @text[@pos]
|
|
377
445
|
@pos += 1
|
|
378
446
|
if c == ?\n
|
|
@@ -430,9 +498,9 @@ class TaskJuggler
|
|
|
430
498
|
# Read a sequence of characters that are all contained in the _chars_ Array.
|
|
431
499
|
# If a character is found that is not in _chars_ the method returns the so
|
|
432
500
|
# far found sequence of chars as String.
|
|
433
|
-
def readSequence(
|
|
501
|
+
def readSequence(chars)
|
|
434
502
|
sequence = ''
|
|
435
|
-
while
|
|
503
|
+
while (c = nextChar) && chars.index(c)
|
|
436
504
|
sequence << c
|
|
437
505
|
end
|
|
438
506
|
# Push back the character that did no longer match.
|
|
@@ -485,7 +553,11 @@ class TaskJuggler
|
|
|
485
553
|
end
|
|
486
554
|
end
|
|
487
555
|
|
|
488
|
-
def
|
|
556
|
+
def isIdStart(c)
|
|
557
|
+
(('a'..'z') === c || ('A'..'Z') === c || c == '_')
|
|
558
|
+
end
|
|
559
|
+
|
|
560
|
+
def readId(c, tokenType = 'ID')
|
|
489
561
|
token = ""
|
|
490
562
|
token << c
|
|
491
563
|
while (c = nextChar) &&
|
|
@@ -494,7 +566,7 @@ class TaskJuggler
|
|
|
494
566
|
token << c
|
|
495
567
|
end
|
|
496
568
|
returnChar
|
|
497
|
-
return [
|
|
569
|
+
return [ tokenType, token ]
|
|
498
570
|
end
|
|
499
571
|
|
|
500
572
|
def readString(terminator)
|
data/lib/RichTextSnip.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# = RichTextSnip.rb -- The TaskJuggler III Project Management Software
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009 by Chris Schlaeger <cs@kde.org>
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010 by Chris Schlaeger <cs@kde.org>
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of version 2 of the GNU General Public License as
|
|
@@ -40,18 +40,23 @@ class TaskJuggler
|
|
|
40
40
|
file.each_line { |line| text += line }
|
|
41
41
|
end
|
|
42
42
|
begin
|
|
43
|
-
|
|
43
|
+
rText = RichText.new(text, @document.functionHandlers)
|
|
44
|
+
@richText = rText.generateIntermediateFormat(sectionCounter)
|
|
44
45
|
rescue RichTextException => msg
|
|
45
46
|
$stderr.puts "Error in RichText of file '#{fileName}'\n" +
|
|
46
47
|
"Line #{msg.lineNo}: #{msg.text}\n" +
|
|
47
48
|
"#{msg.line}"
|
|
48
49
|
exit
|
|
49
50
|
end
|
|
50
|
-
@richText.setProtocolHandlers(@document.protocolHandlers)
|
|
51
51
|
|
|
52
52
|
@prevSnip = @nextSnip = nil
|
|
53
53
|
end
|
|
54
54
|
|
|
55
|
+
# Set the target for all anchor links in the document.
|
|
56
|
+
def linkTarget=(target)
|
|
57
|
+
@richText.linkTarget = target
|
|
58
|
+
end
|
|
59
|
+
|
|
55
60
|
# Generate a TableOfContents object from the section headers of the
|
|
56
61
|
# RichTextSnip.
|
|
57
62
|
def tableOfContents(toc, fileName)
|
data/lib/RichTextSyntaxRules.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# = RichTextSyntaxRules.rb -- The TaskJuggler III Project Management Software
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009 by Chris Schlaeger <cs@kde.org>
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010 by Chris Schlaeger <cs@kde.org>
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of version 2 of the GNU General Public License as
|
|
@@ -31,7 +31,7 @@ class TaskJuggler
|
|
|
31
31
|
# This is the entry node.
|
|
32
32
|
def rule_richtext
|
|
33
33
|
pattern(%w( !sections !blankLines . ), lambda {
|
|
34
|
-
el = RichTextElement.new(@
|
|
34
|
+
el = RichTextElement.new(@richTextI, :richtext, @val[0])
|
|
35
35
|
})
|
|
36
36
|
end
|
|
37
37
|
|
|
@@ -44,20 +44,20 @@ class TaskJuggler
|
|
|
44
44
|
@val[0]
|
|
45
45
|
})
|
|
46
46
|
pattern(%w( $HLINE !blankLines ), lambda {
|
|
47
|
-
RichTextElement.new(@
|
|
47
|
+
RichTextElement.new(@richTextI, :hline, @val[0])
|
|
48
48
|
})
|
|
49
49
|
pattern(%w( !paragraph ), lambda {
|
|
50
50
|
@val[0]
|
|
51
51
|
})
|
|
52
52
|
pattern(%w( $PRE ), lambda {
|
|
53
|
-
RichTextElement.new(@
|
|
53
|
+
RichTextElement.new(@richTextI, :pre, @val[0])
|
|
54
54
|
})
|
|
55
55
|
pattern(%w( !bulletList1 ), lambda {
|
|
56
|
-
RichTextElement.new(@
|
|
56
|
+
RichTextElement.new(@richTextI, :bulletlist1, @val[0])
|
|
57
57
|
})
|
|
58
58
|
pattern(%w( !numberList1 ), lambda {
|
|
59
59
|
@numberListCounter = [ 0, 0, 0 ]
|
|
60
|
-
RichTextElement.new(@
|
|
60
|
+
RichTextElement.new(@richTextI, :numberlist1, @val[0])
|
|
61
61
|
})
|
|
62
62
|
pattern(%w( !blockFunction !blankLines ), lambda {
|
|
63
63
|
@val[0]
|
|
@@ -79,7 +79,7 @@ class TaskJuggler
|
|
|
79
79
|
def rule_title1
|
|
80
80
|
pattern(%w( $TITLE1 !text $TITLE1END ), lambda {
|
|
81
81
|
@val[1][-1].appendSpace = false
|
|
82
|
-
el = RichTextElement.new(@
|
|
82
|
+
el = RichTextElement.new(@richTextI, :title1, @val[1])
|
|
83
83
|
@sectionCounter[0] += 1
|
|
84
84
|
@sectionCounter[1] = @sectionCounter[2] = 0
|
|
85
85
|
el.data = @sectionCounter.dup
|
|
@@ -90,7 +90,7 @@ class TaskJuggler
|
|
|
90
90
|
def rule_title2
|
|
91
91
|
pattern(%w( $TITLE2 !text $TITLE2END ), lambda {
|
|
92
92
|
@val[1][-1].appendSpace = false
|
|
93
|
-
el = RichTextElement.new(@
|
|
93
|
+
el = RichTextElement.new(@richTextI, :title2, @val[1])
|
|
94
94
|
@sectionCounter[1] += 1
|
|
95
95
|
@sectionCounter[2] = 0
|
|
96
96
|
el.data = @sectionCounter.dup
|
|
@@ -101,7 +101,7 @@ class TaskJuggler
|
|
|
101
101
|
def rule_title3
|
|
102
102
|
pattern(%w( $TITLE3 !text $TITLE3END ), lambda {
|
|
103
103
|
@val[1][-1].appendSpace = false
|
|
104
|
-
el = RichTextElement.new(@
|
|
104
|
+
el = RichTextElement.new(@richTextI, :title3, @val[1])
|
|
105
105
|
@sectionCounter[2] += 1
|
|
106
106
|
el.data = @sectionCounter.dup
|
|
107
107
|
el
|
|
@@ -112,27 +112,27 @@ class TaskJuggler
|
|
|
112
112
|
optional
|
|
113
113
|
repeatable
|
|
114
114
|
pattern(%w( $BULLET1 !text $LINEBREAK), lambda {
|
|
115
|
-
RichTextElement.new(@
|
|
115
|
+
RichTextElement.new(@richTextI, :bulletitem1, @val[1])
|
|
116
116
|
})
|
|
117
117
|
pattern(%w( !bulletList2 ), lambda {
|
|
118
|
-
RichTextElement.new(@
|
|
118
|
+
RichTextElement.new(@richTextI, :bulletlist2, @val[0])
|
|
119
119
|
})
|
|
120
120
|
end
|
|
121
121
|
|
|
122
122
|
def rule_bulletList2
|
|
123
123
|
repeatable
|
|
124
124
|
pattern(%w( $BULLET2 !text $LINEBREAK), lambda {
|
|
125
|
-
RichTextElement.new(@
|
|
125
|
+
RichTextElement.new(@richTextI, :bulletitem2, @val[1])
|
|
126
126
|
})
|
|
127
127
|
pattern(%w( !bulletList3 ), lambda {
|
|
128
|
-
RichTextElement.new(@
|
|
128
|
+
RichTextElement.new(@richTextI, :bulletlist3, @val[0])
|
|
129
129
|
})
|
|
130
130
|
end
|
|
131
131
|
|
|
132
132
|
def rule_bulletList3
|
|
133
133
|
repeatable
|
|
134
134
|
pattern(%w( $BULLET3 !text $LINEBREAK), lambda {
|
|
135
|
-
RichTextElement.new(@
|
|
135
|
+
RichTextElement.new(@richTextI, :bulletitem3, @val[1])
|
|
136
136
|
})
|
|
137
137
|
end
|
|
138
138
|
|
|
@@ -140,35 +140,35 @@ class TaskJuggler
|
|
|
140
140
|
optional
|
|
141
141
|
repeatable
|
|
142
142
|
pattern(%w( $NUMBER1 !text $LINEBREAK), lambda {
|
|
143
|
-
el = RichTextElement.new(@
|
|
143
|
+
el = RichTextElement.new(@richTextI, :numberitem1, @val[1])
|
|
144
144
|
@numberListCounter[0] += 1
|
|
145
145
|
el.data = @numberListCounter.dup
|
|
146
146
|
el
|
|
147
147
|
})
|
|
148
148
|
pattern(%w( !numberList2 ), lambda {
|
|
149
149
|
@numberListCounter[1, 2] = [ 0, 0 ]
|
|
150
|
-
RichTextElement.new(@
|
|
150
|
+
RichTextElement.new(@richTextI, :numberlist2, @val[0])
|
|
151
151
|
})
|
|
152
152
|
end
|
|
153
153
|
|
|
154
154
|
def rule_numberList2
|
|
155
155
|
repeatable
|
|
156
156
|
pattern(%w( $NUMBER2 !text $LINEBREAK), lambda {
|
|
157
|
-
el = RichTextElement.new(@
|
|
157
|
+
el = RichTextElement.new(@richTextI, :numberitem2, @val[1])
|
|
158
158
|
@numberListCounter[1] += 1
|
|
159
159
|
el.data = @numberListCounter.dup
|
|
160
160
|
el
|
|
161
161
|
})
|
|
162
162
|
pattern(%w( !numberList3 ), lambda {
|
|
163
163
|
@numberListCounter[2] = 0
|
|
164
|
-
RichTextElement.new(@
|
|
164
|
+
RichTextElement.new(@richTextI, :numberlist3, @val[0])
|
|
165
165
|
})
|
|
166
166
|
end
|
|
167
167
|
|
|
168
168
|
def rule_numberList3
|
|
169
169
|
repeatable
|
|
170
170
|
pattern(%w( $NUMBER3 !text $LINEBREAK), lambda {
|
|
171
|
-
el = RichTextElement.new(@
|
|
171
|
+
el = RichTextElement.new(@richTextI, :numberitem3, @val[1])
|
|
172
172
|
@numberListCounter[2] += 1
|
|
173
173
|
el.data = @numberListCounter.dup
|
|
174
174
|
el
|
|
@@ -177,7 +177,7 @@ class TaskJuggler
|
|
|
177
177
|
|
|
178
178
|
def rule_paragraph
|
|
179
179
|
pattern(%w( !text $LINEBREAK ), lambda {
|
|
180
|
-
RichTextElement.new(@
|
|
180
|
+
RichTextElement.new(@richTextI, :paragraph, @val[0])
|
|
181
181
|
})
|
|
182
182
|
end
|
|
183
183
|
|
|
@@ -186,26 +186,36 @@ class TaskJuggler
|
|
|
186
186
|
pattern(%w( !plainTextWithLinks ), lambda {
|
|
187
187
|
@val[0]
|
|
188
188
|
})
|
|
189
|
-
pattern(%w(
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
pattern(%w( !inlineFunction ), lambda {
|
|
190
|
+
@val[0]
|
|
191
|
+
})
|
|
192
|
+
pattern(%w( $ITALIC !space !plainTextWithLinks $ITALIC !space ), lambda {
|
|
193
|
+
el = RichTextElement.new(@richTextI, :italic, @val[2])
|
|
194
|
+
# Since the italic end marker will disappear we need to make sure
|
|
195
|
+
# there was no space before it.
|
|
196
|
+
@val[2].last.appendSpace = false if @val[2].last
|
|
197
|
+
el.appendSpace = !@val[4].empty?
|
|
192
198
|
el
|
|
193
199
|
})
|
|
194
|
-
pattern(%w( $BOLD !plainTextWithLinks $BOLD !space ), lambda {
|
|
195
|
-
el = RichTextElement.new(@
|
|
196
|
-
|
|
200
|
+
pattern(%w( $BOLD !space !plainTextWithLinks $BOLD !space ), lambda {
|
|
201
|
+
el = RichTextElement.new(@richTextI, :bold, @val[2])
|
|
202
|
+
@val[2].last.appendSpace = false if @val[2].last
|
|
203
|
+
el.appendSpace = !@val[4].empty?
|
|
197
204
|
el
|
|
198
205
|
})
|
|
199
|
-
pattern(%w( $CODE !plainTextWithLinks $CODE !space ), lambda {
|
|
200
|
-
el = RichTextElement.new(@
|
|
201
|
-
|
|
206
|
+
pattern(%w( $CODE !space !plainTextWithLinks $CODE !space ), lambda {
|
|
207
|
+
el = RichTextElement.new(@richTextI, :code, @val[2])
|
|
208
|
+
@val[2].last.appendSpace = false if @val[2].last
|
|
209
|
+
el.appendSpace = !@val[4].empty?
|
|
202
210
|
el
|
|
203
211
|
})
|
|
204
|
-
pattern(%w( $BOLDITALIC !plainTextWithLinks $BOLDITALIC !space ),
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
212
|
+
pattern(%w( $BOLDITALIC !space !plainTextWithLinks $BOLDITALIC !space ),
|
|
213
|
+
lambda {
|
|
214
|
+
el = RichTextElement.new(@richTextI,
|
|
215
|
+
:bold, RichTextElement.new(@richTextI,
|
|
216
|
+
:italic, @val[2]))
|
|
217
|
+
@val[2].last.appendSpace = false if @val[2].last
|
|
218
|
+
el.appendSpace = !@val[4].empty?
|
|
209
219
|
el
|
|
210
220
|
})
|
|
211
221
|
end
|
|
@@ -216,8 +226,8 @@ class TaskJuggler
|
|
|
216
226
|
@val[0]
|
|
217
227
|
})
|
|
218
228
|
pattern(%w( $REF $WORD !space !plainText $REFEND !space ), lambda {
|
|
219
|
-
el = RichTextElement.new(@
|
|
220
|
-
RichTextElement.new(@
|
|
229
|
+
el = RichTextElement.new(@richTextI, :ref,
|
|
230
|
+
RichTextElement.new(@richTextI,
|
|
221
231
|
:text, @val[3].empty? ?
|
|
222
232
|
@val[1] :
|
|
223
233
|
@val[3].join(' ')))
|
|
@@ -225,28 +235,53 @@ class TaskJuggler
|
|
|
225
235
|
el.appendSpace = !@val[5].empty?
|
|
226
236
|
el
|
|
227
237
|
})
|
|
228
|
-
pattern(%w( $HREF
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
@val[3].join(' ')))
|
|
234
|
-
el.data = @val[1]
|
|
238
|
+
pattern(%w( $HREF !wordWithQueries !space !plainTextWithQueries
|
|
239
|
+
$HREFEND !space ), lambda {
|
|
240
|
+
el = RichTextElement.new(@richTextI, :href, @val[3].empty? ?
|
|
241
|
+
@val[1] : @val[3])
|
|
242
|
+
el.data = RichTextElement.new(@richTextI, :richtext, @val[1])
|
|
235
243
|
el.appendSpace = !@val[5].empty?
|
|
236
244
|
el
|
|
237
245
|
})
|
|
238
246
|
end
|
|
239
247
|
|
|
248
|
+
def rule_wordWithQueries
|
|
249
|
+
repeatable
|
|
250
|
+
pattern(%w( $WORD ), lambda {
|
|
251
|
+
RichTextElement.new(@richTextI, :text, @val[0])
|
|
252
|
+
})
|
|
253
|
+
pattern(%w( $QUERY ), lambda {
|
|
254
|
+
# The ${attribute} syntax is a shortcut for an embedded query inline
|
|
255
|
+
# function. It can only be used within a ReportTableCell context that
|
|
256
|
+
# provides a property and a scope property.
|
|
257
|
+
el = RichTextElement.new(@richTextI, :inlinefunc)
|
|
258
|
+
# Data is a 2 element Array with the function name and a Hash for the
|
|
259
|
+
# arguments.
|
|
260
|
+
el.data = ['query', { 'attribute' => @val[0] } ]
|
|
261
|
+
el
|
|
262
|
+
})
|
|
263
|
+
|
|
264
|
+
end
|
|
265
|
+
|
|
240
266
|
def rule_plainText
|
|
241
267
|
repeatable
|
|
242
268
|
optional
|
|
243
269
|
pattern(%w( $WORD !space ), lambda {
|
|
244
|
-
el = RichTextElement.new(@
|
|
270
|
+
el = RichTextElement.new(@richTextI, :text, @val[0])
|
|
245
271
|
el.appendSpace = !@val[1].empty?
|
|
246
272
|
el
|
|
247
273
|
})
|
|
248
274
|
end
|
|
249
275
|
|
|
276
|
+
def rule_plainTextWithQueries
|
|
277
|
+
repeatable
|
|
278
|
+
optional
|
|
279
|
+
pattern(%w( !wordWithQueries !space ), lambda {
|
|
280
|
+
@val[0][-1].appendSpace = true if !@val[1].empty?
|
|
281
|
+
@val[0]
|
|
282
|
+
})
|
|
283
|
+
end
|
|
284
|
+
|
|
250
285
|
def rule_space
|
|
251
286
|
optional
|
|
252
287
|
repeatable
|
|
@@ -267,10 +302,33 @@ class TaskJuggler
|
|
|
267
302
|
lambda {
|
|
268
303
|
args = {}
|
|
269
304
|
@val[2].each { |arg| args[arg[0]] = arg[1] }
|
|
270
|
-
el = RichTextElement.new(@
|
|
305
|
+
el = RichTextElement.new(@richTextI, :blockfunc)
|
|
306
|
+
# Data is a 2 element Array with the function name and a Hash for the
|
|
307
|
+
# arguments.
|
|
308
|
+
unless @richTextI.richText.functionHandler(@val[1], true)
|
|
309
|
+
error('bad_block_function',
|
|
310
|
+
"Unsupported block function #{@val[1]}")
|
|
311
|
+
end
|
|
312
|
+
el.data = [@val[1], args ]
|
|
313
|
+
el
|
|
314
|
+
})
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
def rule_inlineFunction
|
|
318
|
+
pattern(%w( $INLINEFUNCSTART $ID !functionArguments $INLINEFUNCEND
|
|
319
|
+
!space ),
|
|
320
|
+
lambda {
|
|
321
|
+
args = {}
|
|
322
|
+
@val[2].each { |arg| args[arg[0]] = arg[1] }
|
|
323
|
+
el = RichTextElement.new(@richTextI, :inlinefunc)
|
|
271
324
|
# Data is a 2 element Array with the function name and a Hash for the
|
|
272
325
|
# arguments.
|
|
326
|
+
unless @richTextI.richText.functionHandler(@val[1], false)
|
|
327
|
+
error('bad_inline_function',
|
|
328
|
+
"Unsupported inline function #{@val[1]}")
|
|
329
|
+
end
|
|
273
330
|
el.data = [@val[1], args ]
|
|
331
|
+
el.appendSpace = !@val[4].empty?
|
|
274
332
|
el
|
|
275
333
|
})
|
|
276
334
|
end
|