├── messages ├── 1.0.10.txt ├── 1.0.5.txt ├── 1.0.6.txt ├── 1.0.7.txt ├── 1.0.9.txt ├── 1.0.13.txt ├── 1.0.4.txt ├── 1.0.12.txt ├── 1.0.15.txt ├── 1.0.11.txt ├── 1.0.8.txt └── install.txt ├── PeopleCodeTools.sublime-settings ├── Default.sublime-commands ├── messages.json ├── Main.sublime-menu ├── TidyPeopleCodeTrace.py ├── README.md ├── PeopleCodeCallStack.tmLanguage ├── PeopleSoftTraceCOBOL.tmLanguage ├── PeopleSoftTrace.tmLanguage ├── ExtractCallStack.py └── PeopleCode.tmLanguage /messages/1.0.10.txt: -------------------------------------------------------------------------------- 1 | 1.0.10: 2 | - Fixed minor tidy bug 3 | -------------------------------------------------------------------------------- /messages/1.0.5.txt: -------------------------------------------------------------------------------- 1 | 1.0.5: 2 | - Added settings functionality 3 | -------------------------------------------------------------------------------- /messages/1.0.6.txt: -------------------------------------------------------------------------------- 1 | 1.0.6: 2 | - Added messages functionality 3 | -------------------------------------------------------------------------------- /messages/1.0.7.txt: -------------------------------------------------------------------------------- 1 | 1.0.7: 2 | - Modified settings functionality 3 | -------------------------------------------------------------------------------- /messages/1.0.9.txt: -------------------------------------------------------------------------------- 1 | 1.0.9: 2 | - Fixed syntax highlighting and tidy bug 3 | -------------------------------------------------------------------------------- /messages/1.0.13.txt: -------------------------------------------------------------------------------- 1 | 1.0.13: 2 | - Extract Call Stack: Added session number support 3 | -------------------------------------------------------------------------------- /messages/1.0.4.txt: -------------------------------------------------------------------------------- 1 | 1.0.4: 2 | - Restructured package to work with Package Control 3 | -------------------------------------------------------------------------------- /messages/1.0.12.txt: -------------------------------------------------------------------------------- 1 | 1.0.12: 2 | - Extract Call Stack: Added support for resume and reend statements 3 | -------------------------------------------------------------------------------- /messages/1.0.15.txt: -------------------------------------------------------------------------------- 1 | 1.0.15: 2 | - Extract Call Stack: Completely rewrote tool to improve performance and stability 3 | -------------------------------------------------------------------------------- /messages/1.0.11.txt: -------------------------------------------------------------------------------- 1 | 1.0.11: 2 | - Fixed bug where functions would not display in the Goto Symbol window for PeopleCode Syntax 3 | -------------------------------------------------------------------------------- /messages/1.0.8.txt: -------------------------------------------------------------------------------- 1 | 1.0.8: 2 | - Modified results for tidy and extract call stack tools to show in a separate window so that the original trace file remains intact 3 | -------------------------------------------------------------------------------- /PeopleCodeTools.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "tidy_add_unmatched_quotes": true, 3 | "tidy_remove_psappsrv_headers": false, 4 | "tidy_remove_blank_spaces": true 5 | } 6 | -------------------------------------------------------------------------------- /Default.sublime-commands: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "caption": "PeopleCode Tools: Extract PeopleCode Call Stack", 4 | "command": "extractpccallstack" 5 | }, 6 | { 7 | "caption": "PeopleCode Tools: Tidy PeopleCode Trace", 8 | "command": "tidypctrace" 9 | } 10 | ] 11 | 12 | -------------------------------------------------------------------------------- /messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "install": "messages/install.txt", 3 | "1.0.4": "messages/1.0.4.txt", 4 | "1.0.5": "messages/1.0.5.txt", 5 | "1.0.6": "messages/1.0.6.txt", 6 | "1.0.7": "messages/1.0.7.txt", 7 | "1.0.8": "messages/1.0.8.txt", 8 | "1.0.9": "messages/1.0.9.txt", 9 | "1.0.10": "messages/1.0.10.txt", 10 | "1.0.11": "messages/1.0.11.txt", 11 | "1.0.12": "messages/1.0.12.txt", 12 | "1.0.13": "messages/1.0.13.txt", 13 | "1.0.15": "messages/1.0.15.txt" 14 | } 15 | -------------------------------------------------------------------------------- /Main.sublime-menu: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "caption": "Preferences", 4 | "mnemonic": "n", 5 | "id": "preferences", 6 | "children": 7 | [ 8 | { 9 | "caption": "Package Settings", 10 | "mnemonic": "P", 11 | "id": "package-settings", 12 | "children": 13 | [ 14 | { 15 | "caption": "PeopleCodeTools", 16 | "children": 17 | [ 18 | { 19 | "command": "open_file", 20 | "args": {"file": "${packages}/PeopleCodeTools/PeopleCodeTools.sublime-settings"}, 21 | "caption": "Settings - Default" 22 | }, 23 | { 24 | "command": "open_file", 25 | "args": {"file": "${packages}/User/PeopleCodeTools.sublime-settings"}, 26 | "caption": "Settings – User" 27 | } 28 | ] 29 | } 30 | ] 31 | } 32 | ] 33 | } 34 | ] 35 | -------------------------------------------------------------------------------- /TidyPeopleCodeTrace.py: -------------------------------------------------------------------------------- 1 | import sublime, sublime_plugin, re 2 | 3 | SETTINGS_FILE = "PeopleCodeTools.sublime-settings" 4 | 5 | class TidypctraceCommand(sublime_plugin.TextCommand): 6 | 7 | def replaceViewContent(self, viewToReplace, replaceString): 8 | viewToReplaceAllTextRegion = sublime.Region(0, viewToReplace.size()) 9 | viewToReplace.replace(self.edit, viewToReplaceAllTextRegion, replaceString) 10 | viewToReplace.sel().clear() 11 | 12 | def run(self, edit): 13 | settings = sublime.load_settings(SETTINGS_FILE) 14 | self.edit = edit 15 | 16 | # Grab the original view contents and store it in a new file 17 | originalView = self.view; 18 | originalViewString = originalView.substr(sublime.Region(0, originalView.size())) 19 | 20 | newView = originalView.window().new_file() 21 | newViewString = originalViewString 22 | 23 | # Get location of syntax file 24 | originalSyntax = originalView.settings().get('syntax') 25 | 26 | ## Remove header junk 27 | if settings.get("tidy_remove_psappsrv_headers") == True: 28 | 29 | newViewString = re.sub(r'(?m)(^PSAPPSRV.*?\d\.\d{6}\s)(.*)', '\\2', newViewString) 30 | newViewString = re.sub(r'(?m)(^PSAPPSRV.*@JavaClient.*IntegrationSvc\]\(\d\)\s{3})(.*)', '\\2', newViewString) 31 | 32 | ## Fix up unmatched quotes 33 | if settings.get("tidy_add_unmatched_quotes") == True: 34 | 35 | lines = newViewString.split('\n') 36 | newViewString = '' 37 | 38 | for line in lines: 39 | quoteCount = 0 40 | for char in line: 41 | if char == '"': 42 | quoteCount += 1 43 | 44 | if (quoteCount % 2) != 0: 45 | line = line + '" - quote added by Tidy' 46 | 47 | newViewString += line + '\n' 48 | 49 | ## Remove all blank spaces 50 | if settings.get("tidy_remove_blank_spaces") == True: 51 | newViewString = re.sub(r'(?m)^\n', '', newViewString) 52 | 53 | self.replaceViewContent(newView, newViewString) 54 | 55 | # Set syntax of new file and clear original selection 56 | newView.set_syntax_file(originalSyntax) 57 | newView.sel().clear() 58 | -------------------------------------------------------------------------------- /messages/install.txt: -------------------------------------------------------------------------------- 1 | # PeopleCode Tools - Sublime Plugin 2 | 3 | This repository contains the following: 4 | - Sublime Text Syntax Highlighter for PeopleCode and PeopleSoft Trace files 5 | - Sublime Text Extract Call Stack tool 6 | - Sublime Text Tidy PeopleCode Trace tool 7 | 8 | ### Sublime Text Syntax Highlighter for PeopleCode and PeopleSoft Trace files 9 | 10 | The syntax highlighter applies to files with the following extensions: 11 | - ppl (PeopleCode) 12 | - pcode (PeopleCode) 13 | - tracesql (PeopleSoft Trace Files) 14 | - trc (PeopleSoft COBOL Trace Files) 15 | 16 | __Note:__ The syntax highlighting plugin slows the opening time for very large files (i.e. 50 MB or greater) due to the fact that the plugin uses regular expressions to create scopes. If you are using the BracketHighlighter plugin on large PeopleCode files, you’ll need to disable it by running ‘BracketHighlighter: Toggle Global Enable’ from the command line. If not, Sublime will behave very sluggishly for these files. Also, it is recommended that the ‘Highlight matches’ option be disabled when searching large files. If ‘Highlight matches’ is not disabled, the search will try to instantly match every single character you type. 17 | 18 | ### Sublime Text Extract Call Stack tool 19 | 20 | This tool will extract and format the call stack from a PeopleSoft trace file. 21 | 22 | This tool ONLY applies to PeopleSoft Trace Files that have the following PeopleCode trace flags: 23 | - Program Starts (64) 24 | - External function calls (128) 25 | - Internal function calls (256) 26 | - Each statement (2048) 27 | 28 | Trace files that have not been generated using these trace flags will not produce enough information for the tool to format the call stack. To use the tool, open a .tracesql file in Sublime Text and then run the "PeopleCode Tools: Extract PeopleCode Call Stack" command from the command palette. 29 | 30 | ### Sublime Text Tidy PeopleCode Trace tool 31 | 32 | This tool will tidy up a tracesql file by performing the following operations: 33 | - Adding a matching quote to the end of certain lines that have an odd number of quotes, ensuring that the syntax highlighting of the PeopleCode trace file works correctly (tidy_add_unmatched_quotes). 34 | - Removing blank spaces (tidy_remove_blank_spaces) 35 | - Removing the PSAPPSRV header text to make the trace file easier to read (tidy_remove_psappsrv_headers). This option is disabled by default. Feel free to set this to true in the user settings for this plugin if you desire this functionality. 36 | 37 | __Note:__ This tool may take a while to run on large files (i.e. files greater than 8 MB). 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PeopleCode Tools - Sublime Plugin 2 | 3 | This repository contains the following: 4 | - Sublime Text Syntax Highlighter for PeopleCode and PeopleSoft Trace files 5 | - Sublime Text Extract Call Stack tool 6 | - Sublime Text Tidy PeopleCode Trace tool 7 | 8 | ### Sublime Text Syntax Highlighter for PeopleCode and PeopleSoft Trace files 9 | 10 | The syntax highlighter applies to files with the following extensions: 11 | - ppl (PeopleCode) 12 | - pcode (PeopleCode) 13 | - tracesql (PeopleSoft Trace Files) 14 | - trc (PeopleSoft COBOL Trace Files) 15 | 16 | __Note:__ The syntax highlighting plugin slows the opening time for very large files (i.e. 50 MB or greater) due to the fact that the plugin uses regular expressions to create scopes. If you are using the BracketHighlighter plugin on large PeopleCode files, you’ll need to disable it by running ‘BracketHighlighter: Toggle Global Enable’ from the command line. If not, Sublime will behave very sluggishly for these files. Also, it is recommended that the ‘Highlight matches’ option be disabled when searching large files. If ‘Highlight matches’ is not disabled, the search will try to instantly match every single character you type. 17 | 18 | ### Sublime Text Extract Call Stack tool 19 | 20 | This tool will extract and format the call stack from a PeopleSoft trace file. 21 | 22 | This tool ONLY applies to PeopleSoft Trace Files that have the following PeopleCode trace flags: 23 | - Program Starts (64) 24 | - External function calls (128) 25 | - Internal function calls (256) 26 | - Return parameter values (1024) 27 | - Each statement (2048) 28 | 29 | Trace files that have not been generated using these trace flags will not produce enough information for the tool to format the call stack. To use the tool, open a .tracesql file in Sublime Text and then run the "PeopleCode Tools: Extract PeopleCode Call Stack" command from the command palette. 30 | 31 | ### Sublime Text Tidy PeopleCode Trace tool 32 | 33 | This tool will tidy up a tracesql file by performing the following operations: 34 | - Adding a matching quote to the end of certain lines that have an odd number of quotes, ensuring that the syntax highlighting of the PeopleCode trace file works correctly (tidy_add_unmatched_quotes). 35 | - Removing blank spaces (tidy_remove_blank_spaces) 36 | - Removing the PSAPPSRV header text to make the trace file easier to read (tidy_remove_psappsrv_headers). This option is disabled by default. Feel free to set this to true in the user settings for this plugin if you desire this functionality. 37 | 38 | __Note:__ This tool may take a while to run on large files (i.e. files greater than 8 MB). 39 | 40 | ### Demonstration 41 | To see how this plugin can be used refer to the following: 42 | - Using Syntax highlighting and the Tidy PeopleCode Trace tool 43 | - Using the Extract PeopleCode Call Stack tool 44 | -------------------------------------------------------------------------------- /PeopleCodeCallStack.tmLanguage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | PeopleSoft PeopleCode Call Stack 7 | patterns 8 | 9 | 10 | include 11 | #callstack 12 | 13 | 14 | repository 15 | 16 | callstack 17 | 18 | patterns 19 | 20 | 21 | include 22 | #session 23 | 24 | 25 | include 26 | #methods 27 | 28 | 29 | include 30 | #events 31 | 32 | 33 | 34 | events 35 | 36 | name 37 | meta.event.pcode 38 | patterns 39 | 40 | 41 | begin 42 | (start|resume)\s+?(.*) 43 | beginCaptures 44 | 45 | 1 46 | 47 | name 48 | storage.modifier.pcode 49 | 50 | 2 51 | 52 | name 53 | entity.name.function.pcode 54 | 55 | 56 | end 57 | (\n) 58 | name 59 | meta.method.event.pcode 60 | 61 | 62 | 63 | methods 64 | 65 | name 66 | meta.method.pcode 67 | patterns 68 | 69 | 70 | begin 71 | (call (?:method|function|getter|setter|constructor))\s+?(.*) 72 | beginCaptures 73 | 74 | 1 75 | 76 | name 77 | storage.modifier.pcode 78 | 79 | 2 80 | 81 | name 82 | entity.name.function.pcode 83 | 84 | 85 | end 86 | (\n) 87 | name 88 | meta.method.identifier.pcode 89 | 90 | 91 | 92 | session 93 | 94 | name 95 | meta.method.pcode 96 | patterns 97 | 98 | 99 | begin 100 | (Session \d+) 101 | beginCaptures 102 | 103 | 1 104 | 105 | name 106 | comment.block.pcode 107 | 108 | 109 | end 110 | (:) 111 | name 112 | meta.method.session.pcode 113 | 114 | 115 | 116 | 117 | scopeName 118 | source.peoplecode.psoftcallstack 119 | uuid 120 | cd1113f9-149f-4e18-9dec-c39a75a7c283 121 | 122 | 123 | -------------------------------------------------------------------------------- /PeopleSoftTraceCOBOL.tmLanguage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fileTypes 6 | 7 | trc 8 | 9 | name 10 | PeopleSoft COBOL Trace 11 | patterns 12 | 13 | 14 | captures 15 | 16 | 1 17 | 18 | name 19 | keyword.other.import.pcode 20 | 21 | 2 22 | 23 | name 24 | storage.modifier.import.pcode 25 | 26 | 3 27 | 28 | name 29 | punctuation.terminator.pcode 30 | 31 | 32 | 33 | 34 | include 35 | #code 36 | 37 | 38 | repository 39 | 40 | code 41 | 42 | patterns 43 | 44 | 45 | include 46 | #tracesql 47 | 48 | 49 | include 50 | #keywords 51 | 52 | 53 | 54 | keywords 55 | 56 | patterns 57 | 58 | 59 | match 60 | \b(Time|Line|Elapsed|SQL|Cursor|Return|DB API Statement|Statement|Count|R e t r i e v e|C o m p i l e|E x e c u t e|F e t c h|STMT TOTALS)\b 61 | name 62 | keyword 63 | 64 | 65 | match 66 | -|PeopleSoft Batch Timings Report:|PeopleSoft Batch Statistics|All timings in seconds|Encoding Scheme Used:|% SQL|% Total|Total:|Percent of Total:|Total in SQL:|Total in Application:|Total Run Time:|Total Statements:|Max Cursors Connected: 67 | name 68 | keyword 69 | 70 | 71 | 72 | tracesql 73 | 74 | patterns 75 | 76 | 77 | match 78 | (?<=COM Stmt=)(.+)$ 79 | name 80 | entity.name.function.tracesql 81 | 82 | 83 | match 84 | (?<=GETSTMT Stmt=)[^,]+ 85 | name 86 | entity.name.function.tracesql 87 | 88 | 89 | match 90 | (?<=STMT before Meta-Sql expansion=)(.+)$ 91 | name 92 | entity.name.function.tracesql 93 | 94 | 95 | match 96 | (?<=GETSTMT Stmt\(cached\)=)[^,]+ 97 | name 98 | entity.name.function.tracesql 99 | 100 | 101 | match 102 | (?<=CEX Stmt=)(.+)$ 103 | name 104 | entity.name.function.tracesql 105 | 106 | 107 | 108 | 109 | scopeName 110 | source.peoplecode.tracepsoftcobol 111 | uuid 112 | cd1113f9-149f-4e18-9dec-c39a75a7c223 113 | 114 | 115 | -------------------------------------------------------------------------------- /PeopleSoftTrace.tmLanguage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fileTypes 6 | 7 | tracesql 8 | 9 | name 10 | PeopleCode Trace 11 | patterns 12 | 13 | 14 | include 15 | #code 16 | 17 | 18 | repository 19 | 20 | classes 21 | 22 | begin 23 | (?=class\s+[\w]+$) 24 | end 25 | (?=end-class;) 26 | name 27 | meta.method.pcode 28 | patterns 29 | 30 | 31 | begin 32 | (class)\s+([\w]+)$ 33 | beginCaptures 34 | 35 | 1 36 | 37 | name 38 | storage.modifier.pcode 39 | 40 | 2 41 | 42 | name 43 | entity.name.function.pcode 44 | 45 | 46 | end 47 | (?=end-class) 48 | name 49 | meta.method.identifier.pcode 50 | patterns 51 | 52 | 53 | include 54 | #code 55 | 56 | 57 | 58 | 59 | 60 | code 61 | 62 | patterns 63 | 64 | 65 | include 66 | #classes 67 | 68 | 69 | include 70 | #comments-enclosing 71 | 72 | 73 | include 74 | #comments-rem 75 | 76 | 77 | include 78 | #methods 79 | 80 | 81 | include 82 | #functions 83 | 84 | 85 | include 86 | #events 87 | 88 | 89 | include 90 | #tracesql 91 | 92 | 93 | include 94 | #constants-and-special-vars 95 | 96 | 97 | include 98 | #keywords 99 | 100 | 101 | include 102 | #storage-modifiers 103 | 104 | 105 | include 106 | #strings 107 | 108 | 109 | include 110 | #all-types 111 | 112 | 113 | 114 | comments-enclosing 115 | 116 | patterns 117 | 118 | 119 | begin 120 | /\* 121 | captures 122 | 123 | 0 124 | 125 | name 126 | punctuation.definition.comment.pcode 127 | 128 | 129 | end 130 | \*/ 131 | name 132 | comment.block.pcode 133 | 134 | 135 | 136 | comments-rem 137 | 138 | patterns 139 | 140 | 141 | comment 142 | comment out single line REM statements 143 | match 144 | \s*\b(?<!&)[rR][eE][mM]\b(.*)$ 145 | name 146 | comment.block.pcode 147 | 148 | 149 | 150 | constants-and-special-vars 151 | 152 | patterns 153 | 154 | 155 | match 156 | \b(true|false|null)\b 157 | name 158 | constant.language.pcode 159 | 160 | 161 | match 162 | \b(%This|%Super)\b 163 | name 164 | variable.language.pcode 165 | 166 | 167 | 168 | events 169 | 170 | patterns 171 | 172 | 173 | comment 174 | Capture event PeopleCode 175 | match 176 | (?<=>>>>> Begin ).+?(?=[\s|$]) 177 | name 178 | entity.name.function.pcode 179 | 180 | 181 | 182 | functions 183 | 184 | patterns 185 | 186 | 187 | match 188 | (Function)\s+([\w]+) 189 | name 190 | entity.name.function.pcode 191 | 192 | 193 | 194 | keywords 195 | 196 | patterns 197 | 198 | 199 | match 200 | \b(Fetch Field|Store Field|SetSaveWarningFilter|array|of|And|out|ApiObject|boolean|datetime|Break|Returns|catch|CompIntfc|Component|Constant|Declare|Else|Error|Exit|extends|implements|False|Field|File|Global|import|Integer|private|end-class|end-get|end-set|Item|Local|Null|number|Or|As|date|Row|Record|Repeat|Return|Rowset|Step|Scroll|string|property|instance|Then|Throw|To|True|Warning|When|Abs|AccruableDays|AccrualFactor|Acos|ActiveRowCount|AddAttachment|AddEmailAddress|AddKeyListItem|AddSystemPauseTimes|AddToDate|AddToDateTime|AddToTime|All|AllOrNone|AllowEmplIdChg|Amortize|Asin|Atan|BlackScholesCall|BlackScholesPut|BootstrapYTMs|BPurgeDomainStatus|BulkDeleteField|BulkInsertField|BulkModifyPageFieldOrder|BulkUpdateIndexes|CallAppEngine|CancelPubHeaderXmlDoc|CancelPubXmlDoc|CancelSubXmlDoc|ChangeEmailAddress|Char|CharType|CheckMenuItem|Clean|ClearKeyList|ClearSearchDefault|ClearSearchEdit|Panel|PanelGroup|Code|CollectGarbage|CommitWork|CompareLikeFields|ComponentChanged|ConnectorRequest|ConnectorRequestURL|ContainsCharType|ContainsOnlyCharType|ConvertChar|ConvertCurrency|ConvertDatetimeToBase|ConvertRate|ConvertTimeToBase|CopyAttachments|CopyFields|CopyFromJavaArray|CopyRow|CopyToJavaArray|Cos|Cot|Count|create|CreateAnalyticInstance|CreateArray|CreateArrayAny|CreateArrayRept|CreateDirectory|CreateException|CreateJavaArray|CreateJavaObject|CreateMCFIMInfo|CreateMessage|CreateObject|CreateObjectArray|CreateProcessRequest|CreateRecord|CreateRowset|CreateRowsetCache|CreateSOAPDoc|CreateSQL|CreateWSDLMessage|CreateXmlDoc|CubicSpline|CurrEffDt|CurrEffRowNum|CurrEffSeq|CurrentLevelNumber|AddStyleSheet|CurrentRowNumber|Date|Date3|DatePart|DateTime6|DateTimeToHTTP|DateTimeToLocalizedString|DateTimeToTimeZone|DateTimeValue|DateValue|Day|Days|Days360|Days365|DBCSTrim|DBPatternMatch|Decrypt|Degrees|DeleteAttachment|DeleteEmailAddress|DeleteImage|DeleteItem|DeleteRecord|DeleteRow|DeleteSQL|DeleteSystemPauseTimes|DeQueue|DetachAttachment|DisableMenuItem|DiscardRow|DoCancel|DoModal|DoModalComponent|DoSave|DoSaveNow|EnableMenuItem|EncodeURL|EncodeURLForQueryString|Encrypt|EncryptNodePswd|EndMessage|EndModal|EndModalComponent|EnQueue|EscapeHTML|EscapeJavascriptString|EscapeWML|Exact|Exec|ExecuteRolePeopleCode|ExecuteRoleQuery|ExecuteRoleWorkflowQuery|Exp|ExpandBindVar|ExpandEnvVar|ExpandSqlBinds|Fact|FetchSQL|FetchValue|FieldChanged|FileExists|Find|FindCodeSetValues|FindFiles|FlushBulkInserts|FormatDateTime|Forward|GenerateActGuideContentUrl|GenerateActGuidePortalUrl|GenerateActGuideRelativeUrl|GenerateComponentContentRelURL|GenerateComponentContentURL|GenerateComponentPortalRelURL|GenerateComponentPortalURL|GenerateComponentRelativeURL|GenerateExternalPortalURL|GenerateExternalRelativeURL|GenerateHomepagePortalURL|GenerateHomepageRelativeURL|GenerateMobileTree|GenerateQueryContentURL|GenerateQueryPortalURL|GenerateQueryRelativeURL|GenerateScriptContentRelURL|GenerateScriptContentURL|GenerateScriptPortalRelURL|GenerateScriptPortalURL|GenerateScriptRelativeURL|GenerateTree|GenerateWorklistPortalURL|GenerateWorklistRelativeURL|get()|GetAESection|GetAnalyticGridCreateObject|GetAnalyticInstance|GetArchPubHeaderXmlDoc|GetArchPubXmlDoc|GetArchSubXmlDoc|GetAttachment|GetBiDoc|GetCalendarDate|GetChart|GetChartURL|GetCwd|GetEnv|GetField|GetFile|GetGrid|GetHTMLText|GetImageExtents|GetInterlink|GetJavaClass|GetLevel0|GetMessage|GetMessageInstance|GetMessageXmlDoc|GetMethodNames|GetNextNumber|GetNextNumberWithGaps|GetNextNumberWithGapsCommit|GetNextProcessInstance|GetNRXmlDoc|GetPage|GetProgramFunctionInfo|GetPubContractInstance|GetPubHeaderXmlDoc|GetPubXmlDoc|GetRecord|GetRelField|GetRow|GetRowset|GetRowsetCache|GetSession|GetSetId|GetSQL|GetStoredFormat|GetSubContractInstance|GetSubXmlDoc|GetSyncLogData|GetURL|GetUserOption|GetWLFieldValue|Gray|UnGray|Hash|HermiteCubic|Hide|HideMenuItem|HideRow|HideScroll|HistVolatility|Hour|IBPurgeNodesDown|Idiv|InboundPublishXmlDoc|InitChat|InsertImage|InsertItem|InsertRow|Int|IsAlpha|IsAlphaNumeric|IsDate|IsDateTime|IsDaylightSavings|IsDigits|IsDisconnectedClient|IsHidden|IsMenuItemAuthorized|IsMessageActive|IsModal|IsModalComponent|IsNumber|IsSearchDialog|IsTime|IsUserInPermissionList|IsUserInRole|IsUserNumber|Left|Len|LinearInterp|Ln|Log10|LogObjectUse|Lower|LTrim|MarkPrimaryEmailAddress|MarkWLItemWorked|Max|MCFBroadcast|MessageBox|Min|Minute|Mod|Month|MSFGetNextNumber|MsgGet|MsgGetExplainText|MsgGetText|NextEffDt|NextRelEffDt|NodeDelete|NodeRename|NodeSaveAs|NodeTranDelete|None|NotifyQ|Not|NumberToDisplayString|NumberToString|ObjectDoMethod|ObjectDoMethodArray|ObjectGetProperty|ObjectSetProperty|OnlyOne|OnlyOneOrNone|PingNode|PriorEffDt|PriorRelEffDt|PriorValue|Product|Proper|PublishXmlDoc|PutAttachment|Quote|Radians|Rand|RecordChanged|RecordDeleted|RecordNew|RelNodeTranDelete|RemoteCall|RemoveDirectory|RenameDBField|RenamePage|RenameRecord|Replace|Rept|ReSubmitPubHeaderXmlDoc|ReSubmitPubXmlDoc|ReSubmitSubXmlDoc|ReturnToServer|ReValidateNRXmlDoc|RevalidatePassword|Right|Round|RoundCurrency|RowCount|RowFlush|RowScrollSelect|RowScrollSelectNew|RTrim|ScrollFlush|ScrollSelect|ScrollSelectNew|Second|SendMail|SetAuthenticationResult|SetChannelStatus|SetComponentChanged|SetCursorPos|SetDBFieldAuxFlag|SetDBFieldCharDefn|SetDBFieldFormat|SetDBFieldFormatLength|SetDBFieldLabel|SetDBFieldLength|SetDBFieldNotUsed|SetDefault|SetDefaultAll|SetDefaultNext|SetDefaultNextRel|SetDefaultPrior|SetDefaultPriorRel|SetDisplayFormat|SetLabel|SetLanguage|SetMessageStatus|SetNextPage|SetPageFieldPageFieldName|SetPasswordExpired|SetPostReport|SetRecFieldEditTable|SetRecFieldKey|SetReEdit|SetSearchDefault|SetSearchDialogBehavior|SetSearchEdit|SetTempTableInstance|SetTracePC|SetTraceSQL|SetupScheduleDefnItem|SetUserOption|Sign|Sin|SinglePaymentPV|SortScroll|Split|SQLExec|Sqrt|StartWork|StopFetching|StoreSQL|StyleSheet|Substitute|Substring|String|SwitchUser|SyncRequestXmlDoc|Tan|Time|Time3|TimePart|TimeToTimeZone|TimeValue|TimeZoneOffset|TotalRowCount|Transfer|TransferExact|TransferMobilePage|TransferNode|TransferPage|TransferPortal|Transform|TransformEx|TransformExCache|TreeDetailInNode|TriggerBusinessEvent|Truncate|UnCheckMenuItem|Unencode|get|set|Ungray|Unhide|UnhideRow|UnhideScroll|UniformSeriesPV|UpdateSysVersion|UpdateValue|UpdateXmlDoc|Upper|Value|ValueUser|ViewAttachment|ViewContentURL|ViewURL|Weekday|WinEscape|WinExec|WinMessage|WriteToLog|Year|class|End-Class|end-evaluate|End-Evaluate|End-For|End-Function|End-If|method|end-method|end-try|End-While|evaluate|Evaluate|For|Function|If|try|while|XmlNode|SQL)\b 201 | name 202 | keyword 203 | 204 | 205 | match 206 | %(Super|Attachment_Success|Attachment_Failed|Action_Add|Action_Correction|Action_UpdateDisplayAll|Action_UpdateDisplay|ApplicationLogFence_Error|ApplicationLogFence_Level1|ApplicationLogFence_Level2|EffDtCheck|ApplicationLogFence_Level3|ApplicationLogFence_Warning|AsOfDate|AuthenticationToken|BPName|ClientDate|ClientTimeZone|CompIntfcName|Component|ContentID|ContentType|Copyright|Currency|Date|DateTime|DbName|DbServerName|DbType|DeviceType|EmailAddress|EmployeeId|ExternalAuthInfo|Exec_Synchronous|FilePath_Absolute|FilePath_Relative|FilePath|HPTabName|Import|IntBroker|IsMultiLanguageEnabled|Language_Base|Language_Data|Language_Data|Language_Use|Language|LocalNode|Market|MaxInterlinkSize|MaxMessageSize|Menu|MobilePage|Mode|MsgResult_OK|NavigatorHomePermissionList|Node|OperatorClass|OperatorId|OperatorRowLevelSecurityClass|OutDestFormat|OutDestType|Page|PanelGroup|Panel|PasswordExpired|PerfTime|PermissionLists|PID|Portal|PrimaryPermissionList|ProcessProfilePermissionList|PSAuthResult|Request|Response|ResultDocument|Roles|RowSecurityPermissionList|RunningInPortal|ServerTimeZone|Session|SignonUserId|SignOnUserPswd|SMTPBlackberryReplyTo|SMTPGuaranteed|SMTPSender|SQLRows|SyncServer|This|ThisMobileObject|Time|TransformData|UserDescription|UserId|WLInstanceID|WLName)\b 207 | name 208 | keyword 209 | 210 | 211 | match 212 | \b(try|end-try|catch|finally|throw)\b 213 | name 214 | keyword.control.catch-exception.pcode 215 | 216 | 217 | match 218 | \?|: 219 | name 220 | keyword.control.pcode 221 | 222 | 223 | match 224 | \b(return|break|case|continue|default|Do|While|For|Evaluate|If|Else)\b 225 | name 226 | keyword.control.pcode 227 | 228 | 229 | match 230 | \b(instanceof)\b 231 | name 232 | keyword.operator.pcode 233 | 234 | 235 | match 236 | (=|!=|<=|>=|<>|<|>) 237 | name 238 | keyword.operator.comparison.pcode 239 | 240 | 241 | match 242 | (=) 243 | name 244 | keyword.operator.assignment.pcode 245 | 246 | 247 | match 248 | (\-|\+|\*|\/|%) 249 | name 250 | keyword.operator.arithmetic.pcode 251 | 252 | 253 | match 254 | (!|&&|\|\|) 255 | name 256 | keyword.operator.logical.pcode 257 | 258 | 259 | match 260 | (?<=\S)\.(?=\S) 261 | name 262 | keyword.operator.dereference.pcode 263 | 264 | 265 | match 266 | ; 267 | name 268 | punctuation.terminator.pcode 269 | 270 | 271 | 272 | methods 273 | 274 | patterns 275 | 276 | 277 | match 278 | (method)\s+([\w]+)\n 279 | name 280 | entity.name.function.pcode 281 | 282 | 283 | 284 | object-types 285 | 286 | patterns 287 | 288 | 289 | begin 290 | \b((?:[a-z]\w*\.)*[A-Z]+\w*)(?=\[) 291 | end 292 | (?=[^\]\s]) 293 | name 294 | storage.type.object.array.pcode 295 | patterns 296 | 297 | 298 | begin 299 | \[ 300 | end 301 | \] 302 | patterns 303 | 304 | 305 | include 306 | #code 307 | 308 | 309 | 310 | 311 | 312 | 313 | captures 314 | 315 | 1 316 | 317 | name 318 | keyword.operator.dereference.pcode 319 | 320 | 321 | match 322 | \b(?:[a-z]\w*(\.))*[A-Z]+\w*\b 323 | name 324 | storage.type.pcode 325 | 326 | 327 | 328 | parameters 329 | 330 | patterns 331 | 332 | 333 | include 334 | #primitive-arrays 335 | 336 | 337 | include 338 | #primitive-types 339 | 340 | 341 | include 342 | #object-types 343 | 344 | 345 | match 346 | &\w+ 347 | name 348 | variable.parameter.pcode 349 | 350 | 351 | 352 | primitive-arrays 353 | 354 | patterns 355 | 356 | 357 | match 358 | \b(?:boolean|number|string)(\[\])*\b 359 | name 360 | storage.type.primitive.array.pcode 361 | 362 | 363 | 364 | primitive-types 365 | 366 | patterns 367 | 368 | 369 | match 370 | \b(?:boolean|number|string|Record|Field|Rowset)\b 371 | name 372 | storage.type.primitive.pcode 373 | 374 | 375 | 376 | storage-modifiers 377 | 378 | captures 379 | 380 | 1 381 | 382 | name 383 | storage.modifier.pcode 384 | 385 | 386 | match 387 | \b(public|private|protected|abstract)\b 388 | 389 | strings 390 | 391 | patterns 392 | 393 | 394 | begin 395 | (") 396 | beginCaptures 397 | 398 | 0 399 | 400 | name 401 | punctuation.definition.string.begin.pcode 402 | 403 | 404 | end 405 | (") 406 | endCaptures 407 | 408 | 0 409 | 410 | name 411 | punctuation.definition.string.end.pcode 412 | 413 | 414 | name 415 | string.quoted.double.pcode 416 | 417 | 418 | 419 | tracesql 420 | 421 | patterns 422 | 423 | 424 | match 425 | (?<=COM Stmt=)(.+)$ 426 | name 427 | entity.name.function.tracesql 428 | 429 | 430 | 431 | values 432 | 433 | patterns 434 | 435 | 436 | include 437 | #strings 438 | 439 | 440 | include 441 | #object-types 442 | 443 | 444 | include 445 | #constants-and-special-vars 446 | 447 | 448 | 449 | 450 | scopeName 451 | source.peoplecode.tracesql 452 | uuid 453 | cd1113f9-149f-4e18-9dec-c39a75a7c223 454 | 455 | 456 | -------------------------------------------------------------------------------- /ExtractCallStack.py: -------------------------------------------------------------------------------- 1 | import sublime, sublime_plugin, re 2 | 3 | class ExtractpccallstackCommand(sublime_plugin.TextCommand): 4 | 5 | # This method is only used for debugging 6 | def replaceViewContent(self, viewToReplace, replaceString): 7 | viewToReplaceAllTextRegion = sublime.Region(0, viewToReplace.size()) 8 | viewToReplace.replace(self.edit, viewToReplaceAllTextRegion, replaceString) 9 | viewToReplace.sel().clear() 10 | 11 | def run(self, edit): 12 | self.edit = edit 13 | 14 | # Grab the current view contents and store it in a new file 15 | originalView = self.view; 16 | 17 | originalViewContent = originalView.substr(sublime.Region(0, originalView.size())) 18 | newView = originalView.window().new_file() 19 | 20 | # First remove all lines that have a call method, call getter, or call setter followed by a start-ext, since the start-ext is sufficient 21 | # For example: the following call method line will be ignored since there is a start-ext immediately after it: 22 | # PSAPPSRV.4556 (2426) 1-8760 14.05.07 0.000000 call method SSF_CFS:SSF_CFQKey.SSFQKeyString #params=7 23 | # PSAPPSRV.4556 (2426) 1-8761 14.05.07 0.000000 >>> start-ext Nest=01 SSFQKeyString SSF_CFS.SSF_CFQKey.OnExecute getter 24 | newViewString = re.sub(r'(?m)(?:.*call\s+(getter|setter|method|constructor).*)\n(.*>>>\sstart-ext.*)', r'\2 \1', originalViewContent) 25 | 26 | # Add an end-get for relevant lines 27 | # I.e. Find all internal call getters and add end-gets. This is done by matching line number before the call getter and after the getter method has finished 28 | # Note: This is really ugly, but I couldn't find a better way to do this. Plus it's all 'easily' done in one line of code 29 | newViewString = re.sub(r'(\d+:.*)(\n.*call getter\s+(?:\w+:?)+\.\w+[\s\S]*?)(.*)(\1)', r'\1\2\3end-get;', newViewString) 30 | 31 | # Remove unnecessary DoModals 32 | newViewString = re.sub(r'(?m)(\d+:.*DoModal\(.*)([\s\S]+?EndModal[\s\S]+?)(\1)', r'\1\2', newViewString) 33 | 34 | # Add other code to also extract here e.g. RemoteCall calls, etc. 35 | additionalCodeToExtractWithoutIndent = ['RemoteCall', '%IntBroker.SyncRequest', '%IntBroker.Publish'] 36 | 37 | # Add other code to also extract and indent here e.g. Transfer etc. 38 | additionalCodeToExtractWithNonClosingIndent = ['TransferExact', 'TransferPage', 'Transfer', '%Response.RedirectURL', 'ViewURL'] 39 | 40 | # Add other code to also extract and indent and then close indent here e.g. DoModal, etc. 41 | additionalCodeToExtractWithClosingIndent = ['DoModalComponent', 'DoModal'] 42 | 43 | # Different variations of the same thing used by different regexs throughout this tool 44 | additionalCodeToExtract1 = '|'.join(additionalCodeToExtractWithoutIndent) + '|' + '|'.join(additionalCodeToExtractWithNonClosingIndent) + '|' + '|'.join(additionalCodeToExtractWithClosingIndent) # Transfer|TransferExact|DoModalComponent etc. 45 | additionalCodeToExtract2 = '.*|'.join(additionalCodeToExtractWithoutIndent) + '.*|' + '.*|'.join(additionalCodeToExtractWithNonClosingIndent) + '.*|' + '.*|'.join(additionalCodeToExtractWithClosingIndent) # Transfer.*|TransferExact.*|DoModalComponent etc. 46 | 47 | additionalCodeToExtract1 = 'OVERRIDECODETOPREVENTUNTESTEDNEWFEATURES' 48 | additionalCodeToExtract2 = 'OVERRIDECODETOPREVENTUNTESTEDNEWFEATURES' 49 | 50 | # Extract all lines containing start, end, Nest=, call int, call private, call method, End-Function, end-get, end-set and end-method 51 | # Note: we ignore call constructor and call setter 52 | str_list = re.findall(r'(?:(?:.*(?:start|end|resume|reend).*Nest=.*)|(?:.*call (?:int|private|method|getter|setter).*)|.*End-Function.*|.*end-get.*|.*end-set.*|.*end-method.*|.*\d+:.*?(?:%s)\(.*)' % additionalCodeToExtract1, newViewString, re.MULTILINE) 53 | newViewString = '\n'.join(str_list) 54 | 55 | # Get the unique session numbers and store them in a list 56 | sessionNos = re.findall(r'PSAPPSRV.\d+\s+\((\d+)\)', newViewString, re.MULTILINE) 57 | sessionNos = sorted(set(sessionNos)) 58 | 59 | sessionCount = 1 60 | 61 | for sessionNo in sessionNos: 62 | 63 | # print('sessionNos %s' % sessionNos) 64 | 65 | # Extract only those lines relating to the sessionNo 66 | str_list = re.findall(r'PSAPPSRV\.\d+\s+\(%s\).*' % sessionNo, newViewString, re.MULTILINE) 67 | sessionSpecificString = '\n'.join(str_list) 68 | 69 | # Remove header junk for each of the lines 70 | str_list = re.findall(r'(?:(?:(?:start|end|resume|reend).*Nest=.*)|(?:call (?:int|private|method|getter|setter).*)|End-Function.*|end-get.*|end-set.*|end-method.*|%s)' % additionalCodeToExtract2, sessionSpecificString, re.MULTILINE) 71 | #str_list = re.findall(r'(?:(?:(?:start|end|resume|reend).*Nest=.*)|(?:call (?:int|private|method|getter|setter).*)|End-Function.*|end-get.*|end-set.*)', sessionSpecificString, re.MULTILINE) 72 | sessionSpecificString = '\n'.join(str_list) 73 | 74 | # Get all the Nest values and store them in a list and store the lowest Nest value 75 | nestNos = re.findall(r'Nest=(\d+)', newViewString, re.MULTILINE) 76 | nestNos = sorted(set(nestNos)) 77 | lowestNestValue = int(min(nestNos)) 78 | 79 | # store lines in a list so that we can iterate through each line 80 | lines = sessionSpecificString.split('\n') 81 | 82 | sessionSpecificString = '' 83 | lastCall = '' 84 | nestLevel = 0 85 | nestLevelOffset = 0 86 | 87 | # extContext will store a list of contexts to keep track of all the start and start-ext calls 88 | extContext = [] 89 | 90 | # resumeContext will store a list of contexts to keep track of all the resume calls 91 | resumeContext = [] 92 | 93 | # Perform initial formatting based on Nest value 94 | for lineContents in lines: 95 | # extract Nest value from lineContents 96 | 97 | # print(lineContents) 98 | 99 | 100 | match = re.search(r'(start-ext|start|end-ext|end|resume|reend)\s+Nest=(\d+)', lineContents) 101 | if match: 102 | 103 | prevNestLevel = nestLevel 104 | nestLevel = nestLevelOffset + int(match.group(2)) - lowestNestValue 105 | 106 | # Always ensure that the next nest level is only indented by 1 tab, and not more 107 | if (nestLevel - prevNestLevel) > 1: 108 | nestLevel = prevNestLevel + 1 109 | 110 | startIndex = 0 111 | 112 | # If within a resume context 113 | if resumeContext: 114 | # The resume code already adds an extra tab, so don't need to indent here 115 | nestLevel -= 1 116 | 117 | for x in range(startIndex,nestLevel): 118 | lineContents = '\t' + lineContents 119 | sessionSpecificString = sessionSpecificString + lineContents + '\n' 120 | 121 | if match.group(1) == 'start': 122 | lastCall = 'start' 123 | # E.g. >>> start Nest=12 DERIVED_ADDR.ADDRESSLONG.RowInit 124 | matchExt = re.search(r'start\s+Nest=(?:\d+).*?((?:\w+\.?)+)', lineContents) 125 | # print('contents of extContext before push: %s' % extContext) 126 | extContext.append(matchExt.group(1)) 127 | if match.group(1) == 'start-ext': 128 | lastCall = 'start' 129 | # keep track of start-ext location so that we can append the location to call private and call int lines 130 | # E.g. >>> start-ext Nest=14 ActivePrograms_SCT SSR_STUDENT_RECORDS.SR_StudentData.StudentActivePrograms.OnExecute 131 | matchExt = re.search(r'start-ext\s+Nest=(?:\d+)\s+\w+\s+((?:\w+\.?)+)', lineContents) 132 | # print('contents of extContext before push: %s' % extContext) 133 | extContext.append(matchExt.group(1)) 134 | if match.group(1) == 'resume': 135 | lastCall = 'resume' 136 | resumeExt = re.search(r'resume\s+Nest=(?:\d+)\s*\.?\s*((?:\w+\.?)+)', lineContents) 137 | resumeContext.append(resumeExt.group(1)) 138 | if match.group(1) == 'end-ext': 139 | lastCall = 'end' 140 | # remove the last element from extContext 141 | # print('contents of extContext before pop: %s' % extContext) 142 | extContext.pop() 143 | if match.group(1) == 'end': 144 | lastCall = 'end' 145 | # remove the last element from extContext 146 | # print('contents of extContext before pop: %s' % extContext) 147 | extContext.pop() 148 | if match.group(1) == 'reend': 149 | lastCall = 'reend' 150 | # remove the last element from resumeContext 151 | resumeContext.pop() 152 | 153 | else: 154 | match = re.search(r'(call (int|setter|getter|private|method)|End-Function|end-get|end-set|end-method|%s)' % additionalCodeToExtract1, lineContents) 155 | #match = re.search(r'(call (int|setter|getter|private|method)|End-Function|end-get|end-set)', lineContents) 156 | if match: 157 | 158 | if lastCall == 'start' or (lastCall[:4] == 'call'): 159 | nestLevel += 1 160 | 161 | # if first 4 chars are 'call' 162 | if match.group(1)[:4] == 'call': 163 | 164 | if match.group(1) == 'call method': 165 | lastCall = 'callMethod' 166 | # Rearrange lines so that the method is at the start (like all other lines) 167 | lineContents = re.sub(r'call method\s+((?:\w+:?)+)\.(\w+)', r'call \2 \1.OnExecute', lineContents) 168 | 169 | if match.group(1) == 'call getter': 170 | lastCall = 'callGetter' 171 | # Rearrange the call getter so that it is in the same format as all the other calls 172 | lineContents = re.sub(r'call getter\s+((?:\w+:?)+)\.(\w+)', r'call getter \2 \1.OnExecute', lineContents) 173 | 174 | if match.group(1) == 'call setter': 175 | lastCall = 'callSetter' 176 | # Remove extra space after call setter and also rearrange setter so that it is at the start (like all other lines) 177 | # E.g. call setter EO:CA:Address.EditPageHeader 178 | lineContents = re.sub(r'call setter\s+((?:\w+:?)+)\.(\w+)', r'call setter \2 \1.OnExecute', lineContents) 179 | 180 | if match.group(1) == 'call private': 181 | lastCall = 'callPrivate' 182 | # Now we need to append the last value in extContext (i.e. extContext[-1]) 183 | if len(extContext) > 0: 184 | lineContents = re.sub(r'call private\s+(\w+)', r'call \1 %s' % extContext[-1], lineContents) 185 | 186 | if match.group(1) == 'call int': 187 | lastCall = 'callInt' 188 | # Now we need to append the last value in extContext (i.e. extContext[-1]) 189 | if len(extContext) > 0: 190 | lineContents = re.sub(r'call int\s+(\w+)', r'call \1 %s' % extContext[-1], lineContents) 191 | 192 | else: 193 | 194 | if match.group(1) in additionalCodeToExtractWithNonClosingIndent or match.group(1) in additionalCodeToExtractWithoutIndent or match.group(1) in additionalCodeToExtractWithClosingIndent: 195 | lastCall = 'additionalCode' 196 | lineContents = re.sub(r'(.*)', r'call \1', lineContents) 197 | else: 198 | 199 | if match.group(1)[:3].lower() == 'end': 200 | if match.group(1) == 'End-Function': 201 | lastCall ='endFunction' 202 | if match.group(1) == 'end-get': 203 | lastCall = 'endGet' 204 | if match.group(1) == 'end-set': 205 | lastCall = 'endSet' 206 | if match.group(1) == 'end-method': 207 | lastCall = 'endMethod' 208 | nestLevel -= 1 209 | 210 | startIndex = 0 211 | 212 | for x in range(startIndex,nestLevel + nestLevelOffset): 213 | lineContents = '\t' + lineContents 214 | 215 | if match.group(1) in additionalCodeToExtractWithNonClosingIndent: 216 | nestLevelOffset += 2 217 | 218 | sessionSpecificString = sessionSpecificString + lineContents + '\n' 219 | 220 | prevLineContents = lineContents 221 | 222 | # Remove Nest from each line since we no longer need it 223 | sessionSpecificString = re.sub(r'\s+Nest=\d+', '', sessionSpecificString) 224 | 225 | # Remove unnecessary trailer junk (e.g. params= or #params=) 226 | sessionSpecificString = re.sub(r'Dur=.*', '', sessionSpecificString) 227 | sessionSpecificString = re.sub(r'[\s]#?params=\d+', '', sessionSpecificString) 228 | 229 | #Are there any resume or reend statements? 230 | #If so, then reformat the session specific string based on the resume and reend statements 231 | found = re.search('(resume|reend)\s(.*)', sessionSpecificString) 232 | if found: 233 | # first remove any dots straight after the resume/reend (if there are any) 234 | sessionSpecificString = re.sub(r'(resume|reend)\s+\.\s+(.*)', r'\1 \2', sessionSpecificString) 235 | 236 | # Store remaining text line by line in a dict called results 237 | lines = sessionSpecificString.split('\n') 238 | results = {} 239 | lineNo = 1 240 | for lineContents in lines: 241 | results[lineNo] = lineContents 242 | lineNo = lineNo + 1 243 | 244 | resumeResults = {} 245 | reendResults = {} 246 | endResults = {} 247 | 248 | # Find resume, reend and end statements and store the line numbers in a dict along with the results 249 | for lineNo, line in results.items(): 250 | match = re.search(r'(resume|reend|end)\s.*?((?:\w+\.?)+((?:\s(?:\w+\.?)+)?))', line) 251 | if match: 252 | if match.group(1) == 'resume': 253 | resumeResults[lineNo] = match.group(2) 254 | if match.group(1) == 'reend': 255 | reendResults[lineNo] = match.group(2) 256 | if match.group(1) == 'end': 257 | endResults[lineNo] = match.group(2) 258 | 259 | # Add a tab to each line before resume until you reach an end for that event 260 | for resumeResultLineNo, resumeResultLine in resumeResults.items(): 261 | # If there is actually an end within the same session, then format all lines after the end and before the resume 262 | if resumeResultLine in endResults.values(): 263 | for x in range(resumeResultLineNo,0, -1): 264 | match = re.search(r'end\s+%s' % resumeResultLine, results[x]) 265 | if match: 266 | break; 267 | else: 268 | if x != resumeResultLineNo: 269 | results[x] = '\t' + results[x] 270 | 271 | # Add a tab to each line before reend until you reach a resume for that event 272 | for reendResultLineNo, reendResultLine in reendResults.items(): 273 | for x in range(reendResultLineNo,0, -1): 274 | match = re.search(r'resume\s.*?%s' % reendResultLine, results[x]) 275 | if match: 276 | break; 277 | else: 278 | if x != reendResultLineNo: 279 | results[x] = '\t' + results[x] 280 | 281 | # store results in sessionSpecificString 282 | sessionSpecificString = '' 283 | for lineNo, line in results.items(): 284 | sessionSpecificString = sessionSpecificString + results[lineNo] + '\n' 285 | 286 | # Clean lines 287 | # Remove the end-ext, End-Function, end-method, end and reend calls, since we no longer need them 288 | str_list = re.findall(r'(?:.*(?:start|resume).*)|.*(?:call\s.*).*|.*(?:%s).*' % additionalCodeToExtract1, sessionSpecificString, re.MULTILINE) 289 | sessionSpecificString = '\n'.join(str_list) 290 | 291 | # Prefix all calls with suffix .OnExecute (apart from getter, setter and app engine steps) with call method 292 | sessionSpecificString = re.sub(r'(?m)call\s(?!(?:getter|setter))(.*\.OnExecute)$', r'call method \1', sessionSpecificString) 293 | 294 | # Prefix all remaining calls with call function 295 | sessionSpecificString = re.sub(r'(?m)call\s(?!(?:method|getter|setter|%s))(.*(?!\.OnExecute))$' % additionalCodeToExtract1, r'call function \1', sessionSpecificString) 296 | 297 | # Rename eligible call methods to call constructors 298 | sessionSpecificString = re.sub(r'(?m)(?m)call\smethod\s+(\w+)(\s.*\1.OnExecute)', r'call constructor \1\2', sessionSpecificString) 299 | 300 | # Rename to call function those start-ext calls that do not have getters, setters or constructors appended 301 | sessionSpecificString = re.sub(r'(?m)start-ext\s(\w+)\s(\w+\.\w+\.\w+)$', r'call function \1 \2', sessionSpecificString) 302 | 303 | # Replace any remaining start-ext with calls based on the last word in the line 304 | # e.g. start-ext isSaveWarning PT_NAV2.NavOptions.OnExecute getter 305 | # becomes call getter isSaveWarning PT_NAV2.NavOptions.OnExecute 306 | sessionSpecificString = re.sub('start-ext\s(\w+)\s(.*)\s(constructor|method|getter|setter)', r'call \3 \1 \2', sessionSpecificString) 307 | 308 | # Finally rename CI functions 309 | sessionSpecificString = re.sub(r'(?m)start-ext\s(\w+)\s(\w+\.\w+)$', r'call function \1 \2', sessionSpecificString) 310 | 311 | # Replace any colons with dots 312 | sessionSpecificString = re.sub(':', r'.', sessionSpecificString) 313 | 314 | # We now have the complete callstack for the session 315 | # Insert the call stack in the new view 316 | newViewAllTextRegion = sublime.Region(0, newView.size()) 317 | if sessionCount == 1: 318 | newView.insert(edit, newViewAllTextRegion.end(), 'Session %s:\n' % sessionNo + sessionSpecificString) 319 | else: 320 | newView.insert(edit, newViewAllTextRegion.end(), '\n\nSession %s:\n' % sessionNo + sessionSpecificString) 321 | newView.sel().clear() 322 | 323 | # Increment session count, go to next sessionNo if available 324 | sessionCount += 1 325 | 326 | # Set Syntax to PeopleCodeCallStack syntax 327 | newView.set_syntax_file('Packages/PeopleCodeTools/PeopleCodeCallStack.tmLanguage') 328 | -------------------------------------------------------------------------------- /PeopleCode.tmLanguage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fileTypes 6 | 7 | ppl 8 | pcode 9 | 10 | name 11 | PeopleCode 12 | patterns 13 | 14 | 15 | include 16 | #code 17 | 18 | 19 | repository 20 | 21 | classes 22 | 23 | begin 24 | (?i)(?=class\s+[\w]+$) 25 | end 26 | (?i)(?=end-class;) 27 | name 28 | meta.method.pcode 29 | patterns 30 | 31 | 32 | begin 33 | (?i)(class)\s+([\w]+)$ 34 | beginCaptures 35 | 36 | 1 37 | 38 | name 39 | storage.modifier.pcode 40 | 41 | 2 42 | 43 | name 44 | entity.name.function.pcode 45 | 46 | 47 | end 48 | (?i)(?=end-class) 49 | name 50 | meta.method.identifier.pcode 51 | patterns 52 | 53 | 54 | include 55 | #code 56 | 57 | 58 | 59 | 60 | 61 | code 62 | 63 | patterns 64 | 65 | 66 | include 67 | #classes 68 | 69 | 70 | include 71 | #comments 72 | 73 | 74 | include 75 | #methods 76 | 77 | 78 | include 79 | #functions 80 | 81 | 82 | include 83 | #events 84 | 85 | 86 | include 87 | #parameters 88 | 89 | 90 | include 91 | #assertions 92 | 93 | 94 | include 95 | #constants-and-special-vars 96 | 97 | 98 | include 99 | #keywords 100 | 101 | 102 | include 103 | #storage-modifiers 104 | 105 | 106 | include 107 | #strings 108 | 109 | 110 | include 111 | #all-types 112 | 113 | 114 | 115 | comments 116 | 117 | patterns 118 | 119 | 120 | captures 121 | 122 | 0 123 | 124 | name 125 | punctuation.definition.comment.pcode 126 | 127 | 128 | match 129 | /\*\*/ 130 | name 131 | comment.block.empty.pcode 132 | 133 | 134 | include 135 | text.html.pcodedoc 136 | 137 | 138 | include 139 | #comments-inline 140 | 141 | 142 | include 143 | #comments-methods 144 | 145 | 146 | include 147 | #comments-enclosing 148 | 149 | 150 | include 151 | #comments-rem 152 | 153 | 154 | 155 | comments-enclosing 156 | 157 | patterns 158 | 159 | 160 | begin 161 | <\* 162 | captures 163 | 164 | 0 165 | 166 | name 167 | punctuation.definition.comment.pcode 168 | 169 | 170 | end 171 | \*> 172 | name 173 | comment.block.pcode 174 | 175 | 176 | 177 | comments-inline 178 | 179 | patterns 180 | 181 | 182 | begin 183 | /\* 184 | captures 185 | 186 | 0 187 | 188 | name 189 | punctuation.definition.comment.pcode 190 | 191 | 192 | end 193 | \*/ 194 | name 195 | comment.block.pcode 196 | 197 | 198 | 199 | comments-methods 200 | 201 | patterns 202 | 203 | 204 | begin 205 | /\+ 206 | captures 207 | 208 | 0 209 | 210 | name 211 | punctuation.definition.comment.pcode 212 | 213 | 214 | end 215 | \+/ 216 | name 217 | comment.block.pcode 218 | 219 | 220 | 221 | comments-rem 222 | 223 | patterns 224 | 225 | 226 | comment 227 | comment out single line REM statements 228 | match 229 | \s*\b(?<!&)[rR][eE][mM]\b(.*)$ 230 | name 231 | comment.block.pcode 232 | 233 | 234 | 235 | constants-and-special-vars 236 | 237 | patterns 238 | 239 | 240 | match 241 | (?i)\b(true|false|null)\b 242 | name 243 | constant.language.pcode 244 | 245 | 246 | match 247 | (?i)\b(%This|%Super)\b 248 | name 249 | variable.language.pcode 250 | 251 | 252 | 253 | events 254 | 255 | patterns 256 | 257 | 258 | comment 259 | Also capture event PeopleCode - using Find In - Save PeopleCode to File 260 | match 261 | ^\[([^\]]+)\]$ 262 | name 263 | entity.name.function.pcode 264 | 265 | 266 | 267 | functions 268 | 269 | begin 270 | (?i)(?=Function\s+[\w]+\(.*\).*) 271 | end 272 | (?i)(?=End-Function;) 273 | name 274 | meta.Function.pcode 275 | patterns 276 | 277 | 278 | begin 279 | (?i)(Function)\s+([\w]+)(\(.*\)).* 280 | beginCaptures 281 | 282 | 1 283 | 284 | name 285 | storage.modifier.pcode 286 | 287 | 2 288 | 289 | name 290 | entity.name.function.pcode 291 | 292 | 293 | end 294 | (?i)(?=End-Function) 295 | name 296 | meta.Function.identifier.pcode 297 | patterns 298 | 299 | 300 | include 301 | #code 302 | 303 | 304 | 305 | 306 | 307 | keywords 308 | 309 | patterns 310 | 311 | 312 | match 313 | (?i)\b(SetSaveWarningFilter|array|of|And|out|ApiObject|boolean|datetime|Break|Returns|catch|CompIntfc|ComponentLife|Component|Constant|Declare|Else|Error|Exit|extends|implements|False|Field|File|Global|import|Integer|private|end-class|end-set|end-get|Item|Local|Null|number|Or|As|date|Row|Record|Repeat|Return|Rowset|Step|Scroll|string|property|instance|Then|Throw|To|True|Warning|When|Abs|AccruableDays|AccrualFactor|Acos|ActiveRowCount|AddAttachment|AddEmailAddress|AddKeyListItem|AddSystemPauseTimes|AddToDate|AddToDateTime|AddToTime|All|AllOrNone|AllowEmplIdChg|Amortize|Asin|Atan|BlackScholesCall|BlackScholesPut|BootstrapYTMs|BPurgeDomainStatus|BulkDeleteField|BulkInsertField|BulkModifyPageFieldOrder|BulkUpdateIndexes|CallAppEngine|CancelPubHeaderXmlDoc|CancelPubXmlDoc|CancelSubXmlDoc|ChangeEmailAddress|Char|CharType|CheckMenuItem|Clean|ClearKeyList|ClearSearchDefault|ClearSearchEdit|Panel|PanelGroup|Code|CollectGarbage|CommitWork|CompareLikeFields|ComponentChanged|ConnectorRequest|ConnectorRequestURL|ContainsCharType|ContainsOnlyCharType|ConvertChar|ConvertCurrency|ConvertDatetimeToBase|ConvertRate|ConvertTimeToBase|CopyAttachments|CopyFields|CopyFromJavaArray|CopyRow|CopyToJavaArray|Cos|Cot|Count|create|CreateAnalyticInstance|CreateArray|CreateArrayAny|CreateArrayRept|CreateDirectory|CreateException|CreateJavaArray|CreateJavaObject|CreateMCFIMInfo|CreateMessage|CreateObject|CreateObjectArray|CreateProcessRequest|CreateRecord|CreateRowset|CreateRowsetCache|CreateSOAPDoc|CreateSQL|CreateWSDLMessage|CreateXmlDoc|CubicSpline|CurrEffDt|CurrEffRowNum|CurrEffSeq|CurrentLevelNumber|AddStyleSheet|CurrentRowNumber|Date|Date3|DatePart|DateTime6|DateTimeToHTTP|DateTimeToLocalizedString|DateTimeToTimeZone|DateTimeValue|DateValue|Day|Days|Days360|Days365|DBCSTrim|DBPatternMatch|Decrypt|Degrees|DeleteAttachment|DeleteEmailAddress|DeleteImage|DeleteItem|DeleteRecord|DeleteRow|DeleteSQL|DeleteSystemPauseTimes|DeQueue|DetachAttachment|DisableMenuItem|DiscardRow|DoCancel|DoModal|DoModalX|DoModalComponent|DoModalXComponent|DoSave|DoSaveNow|EnableMenuItem|EncodeURL|EncodeURLForQueryString|Encrypt|EncryptNodePswd|EndMessage|EndModal|EndModalComponent|EnQueue|EscapeHTML|EscapeJavascriptString|EscapeWML|Exact|Exec|ExecuteRolePeopleCode|ExecuteRoleQuery|ExecuteRoleWorkflowQuery|Exp|ExpandBindVar|ExpandEnvVar|ExpandSqlBinds|Fact|FetchSQL|FetchValue|FieldChanged|FileExists|Find|FindCodeSetValues|FindFiles|FlushBulkInserts|FormatDateTime|Forward|GenerateActGuideContentUrl|GenerateActGuidePortalUrl|GenerateActGuideRelativeUrl|GenerateComponentContentRelURL|GenerateComponentContentURL|GenerateComponentPortalRelURL|GenerateComponentPortalURL|GenerateComponentRelativeURL|GenerateExternalPortalURL|GenerateExternalRelativeURL|GenerateHomepagePortalURL|GenerateHomepageRelativeURL|GenerateMobileTree|GenerateQueryContentURL|GenerateQueryPortalURL|GenerateQueryRelativeURL|GenerateScriptContentRelURL|GenerateScriptContentURL|GenerateScriptPortalRelURL|GenerateScriptPortalURL|GenerateScriptRelativeURL|GenerateTree|GenerateWorklistPortalURL|GenerateWorklistRelativeURL|get()|GetAESection|GetAnalyticGridCreateObject|GetAnalyticInstance|GetArchPubHeaderXmlDoc|GetArchPubXmlDoc|GetArchSubXmlDoc|GetAttachment|GetBiDoc|GetCalendarDate|GetChart|GetChartURL|GetCwd|GetEnv|GetField|GetFile|GetGrid|GetHTMLText|GetImageExtents|GetInterlink|GetJavaClass|GetLevel0|GetMessage|GetMessageInstance|GetMessageXmlDoc|GetMethodNames|GetNextNumber|GetNextNumberWithGaps|GetNextNumberWithGapsCommit|GetNextProcessInstance|GetNRXmlDoc|GetPage|GetProgramFunctionInfo|GetPubContractInstance|GetPubHeaderXmlDoc|GetPubXmlDoc|GetRecord|GetRelField|GetRow|GetRowset|GetRowsetCache|GetSession|GetSetId|GetSQL|GetStoredFormat|GetSubContractInstance|GetSubXmlDoc|GetSyncLogData|GetURL|GetUserOption|GetWLFieldValue|Gray|UnGray|Hash|HermiteCubic|Hide|UnHide|HideMenuItem|HideRow|HideScroll|HistVolatility|Hour|IBPurgeNodesDown|Idiv|InboundPublishXmlDoc|InitChat|InsertImage|InsertItem|InsertRow|Int|IsAlpha|IsAlphaNumeric|IsDate|IsDateTime|IsDaylightSavings|IsDigits|IsDisconnectedClient|IsHidden|IsMenuItemAuthorized|IsMessageActive|IsModal|IsModalComponent|IsNumber|IsSearchDialog|IsTime|IsUserInPermissionList|IsUserInRole|IsUserNumber|Left|Len|LinearInterp|Ln|Log10|LogObjectUse|Lower|LTrim|MarkPrimaryEmailAddress|MarkWLItemWorked|Max|MCFBroadcast|MessageBox|Min|Minute|Mod|Month|MSFGetNextNumber|MsgGet|MsgGetExplainText|MsgGetText|NextEffDt|NextRelEffDt|NodeDelete|NodeRename|NodeSaveAs|NodeTranDelete|None|NotifyQ|Not|NumberToDisplayString|NumberToString|ObjectDoMethod|ObjectDoMethodArray|ObjectGetProperty|ObjectSetProperty|OnlyOne|OnlyOneOrNone|PingNode|PriorEffDt|PriorRelEffDt|PriorValue|Product|Proper|PublishXmlDoc|PutAttachment|Quote|Radians|Rand|RecordChanged|RecordDeleted|RecordNew|RelNodeTranDelete|RemoteCall|RemoveDirectory|RenameDBField|RenamePage|RenameRecord|Replace|Rept|ReSubmitPubHeaderXmlDoc|ReSubmitPubXmlDoc|ReSubmitSubXmlDoc|ReturnToServer|ReValidateNRXmlDoc|RevalidatePassword|Right|Round|RoundCurrency|RowCount|RowFlush|RowScrollSelect|RowScrollSelectNew|RTrim|ScrollFlush|ScrollSelect|ScrollSelectNew|Second|SendMail|SetAuthenticationResult|SetChannelStatus|SetComponentChanged|SetCursorPos|SetDBFieldAuxFlag|SetDBFieldCharDefn|SetDBFieldFormat|SetDBFieldFormatLength|SetDBFieldLabel|SetDBFieldLength|SetDBFieldNotUsed|SetDefault|SetDefaultAll|SetDefaultNext|SetDefaultNextRel|SetDefaultPrior|SetDefaultPriorRel|SetDisplayFormat|SetLabel|SetLanguage|SetMessageStatus|SetNextPage|SetPageFieldPageFieldName|SetPasswordExpired|SetPostReport|SetRecFieldEditTable|SetRecFieldKey|SetReEdit|SetSearchDefault|SetSearchDialogBehavior|SetSearchEdit|SetTempTableInstance|SetTracePC|SetTraceSQL|SetupScheduleDefnItem|SetUserOption|Sign|Sin|SinglePaymentPV|SortScroll|Split|SQLExec|Sqrt|StartWork|StopFetching|StoreSQL|StyleSheet|Substitute|Substring|String|SwitchUser|SyncRequestXmlDoc|Tan|Time|Time3|TimePart|TimeToTimeZone|TimeValue|TimeZoneOffset|TotalRowCount|Transfer|TransferExact|TransferMobilePage|TransferModeless|TransferNode|TransferPage|TransferPanel|TransferPortal|Transform|TransformEx|TransformExCache|TreeDetailInNode|TriggerBusinessEvent|Truncate|UnCheckMenuItem|Unencode|get|set|Ungray|Unhide|UnhideRow|UnhideScroll|UniformSeriesPV|UpdateSysVersion|UpdateValue|UpdateXmlDoc|Upper|Value|ValueUser|ViewAttachment|ViewContentURL|ViewURL|Weekday|WinEscape|WinExec|WinMessage|WriteToLog|Year|class|End-Class|end-evaluate|End-Evaluate|End-For|End-Function|End-If|method|end-method|end-try|End-While|evaluate|Evaluate|For|Function|If|try|while|XmlNode|SQL)\b 314 | name 315 | keyword 316 | 317 | 318 | match 319 | (?i)%(Attachment_Success|Attachment_Failed|Action_Add|Action_Correction|Action_UpdateDisplayAll|Action_UpdateDisplay|ApplicationLogFence_Error|ApplicationLogFence_Level1|ApplicationLogFence_Level2|EffDtCheck|ApplicationLogFence_Level3|ApplicationLogFence_Warning|AsOfDate|AuthenticationToken|BPName|ClientDate|ClientTimeZone|CompIntfcName|Component|ContentID|ContentType|Copyright|Currency|Date|DateTime|DbName|DbServerName|DbType|DeviceType|EmailAddress|EmployeeId|ExternalAuthInfo|Exec_Synchronous|FilePath_Absolute|FilePath_Relative|FilePath|HPTabName|Import|IntBroker|IsMultiLanguageEnabled|Language_Base|Language_Data|Language_Data|Language_Use|Language|LocalNode|Market|MaxInterlinkSize|MaxMessageSize|Menu|MobilePage|Mode|MsgResult_OK|NavigatorHomePermissionList|Node|OperatorClass|OperatorId|OperatorRowLevelSecurityClass|OutDestFormat|OutDestType|Page|PanelGroup|Panel|PasswordExpired|PerfTime|PermissionLists|PID|Portal|PrimaryPermissionList|ProcessProfilePermissionList|PSAuthResult|ExtAuthResult|Request|Response|ResultDocument|Roles|RowSecurityPermissionList|RunningInPortal|ServerTimeZone|Session|SignonUserId|SignOnUserPswd|SMTPBlackberryReplyTo|SMTPGuaranteed|SMTPSender|SQLRows|SyncServer|This|ThisMobileObject|Time|TransformData|UserDescription|UserId|WLInstanceID|WLName|Super)\b 320 | name 321 | keyword 322 | 323 | 324 | match 325 | (?i)\b(try|end-try|catch|finally|throw)\b 326 | name 327 | keyword.control.catch-exception.pcode 328 | 329 | 330 | match 331 | \?|: 332 | name 333 | keyword.control.pcode 334 | 335 | 336 | match 337 | (?i)\b(return|break|case|continue|default|Do|While|For|Evaluate|If|Else)\b 338 | name 339 | keyword.control.pcode 340 | 341 | 342 | match 343 | (?i)\b(instanceof)\b 344 | name 345 | keyword.operator.pcode 346 | 347 | 348 | match 349 | (=|!=|<=|>=|<>|<|>) 350 | name 351 | keyword.operator.comparison.pcode 352 | 353 | 354 | match 355 | (=) 356 | name 357 | keyword.operator.assignment.pcode 358 | 359 | 360 | match 361 | (\-|\+|\*|\/|%) 362 | name 363 | keyword.operator.arithmetic.pcode 364 | 365 | 366 | match 367 | (!|&&|\|\|) 368 | name 369 | keyword.operator.logical.pcode 370 | 371 | 372 | match 373 | (?<=\S)\.(?=\S) 374 | name 375 | keyword.operator.dereference.pcode 376 | 377 | 378 | match 379 | ; 380 | name 381 | punctuation.terminator.pcode 382 | 383 | 384 | 385 | methods 386 | 387 | begin 388 | (?i)(?=method\s+[\w]+$) 389 | end 390 | (?i)(?=end-method;) 391 | name 392 | meta.method.pcode 393 | patterns 394 | 395 | 396 | begin 397 | (?i)(method)\s+([\w]+)$ 398 | beginCaptures 399 | 400 | 1 401 | 402 | name 403 | storage.modifier.pcode 404 | 405 | 2 406 | 407 | name 408 | entity.name.function.pcode 409 | 410 | 411 | end 412 | (?i)(?=end-method) 413 | name 414 | meta.method.identifier.pcode 415 | patterns 416 | 417 | 418 | include 419 | #code 420 | 421 | 422 | 423 | 424 | 425 | object-types 426 | 427 | patterns 428 | 429 | 430 | begin 431 | \b((?:[a-z]\w*\.)*[A-Z]+\w*)(?=\[) 432 | end 433 | (?=[^\]\s]) 434 | name 435 | storage.type.object.array.pcode 436 | patterns 437 | 438 | 439 | begin 440 | \[ 441 | end 442 | \] 443 | patterns 444 | 445 | 446 | include 447 | #code 448 | 449 | 450 | 451 | 452 | 453 | 454 | captures 455 | 456 | 1 457 | 458 | name 459 | keyword.operator.dereference.pcode 460 | 461 | 462 | match 463 | \b(?:[a-z]\w*(\.))*[A-Z]+\w*\b 464 | name 465 | storage.type.pcode 466 | 467 | 468 | 469 | parameters 470 | 471 | patterns 472 | 473 | 474 | match 475 | &\w+ 476 | name 477 | variable.parameter.pcode 478 | 479 | 480 | 481 | primitive-arrays 482 | 483 | patterns 484 | 485 | 486 | match 487 | (?i)\b(?:boolean|number|string)(\[\])*\b 488 | name 489 | storage.type.primitive.array.pcode 490 | 491 | 492 | 493 | primitive-types 494 | 495 | patterns 496 | 497 | 498 | match 499 | (?i)\b(?:boolean|number|string|Record|Field|Rowset)\b 500 | name 501 | storage.type.primitive.pcode 502 | 503 | 504 | 505 | storage-modifiers 506 | 507 | captures 508 | 509 | 1 510 | 511 | name 512 | storage.modifier.pcode 513 | 514 | 515 | match 516 | (?i)\b(public|private|protected|abstract)\b 517 | 518 | strings 519 | 520 | patterns 521 | 522 | 523 | begin 524 | (") 525 | beginCaptures 526 | 527 | 0 528 | 529 | name 530 | punctuation.definition.string.begin.pcode 531 | 532 | 533 | end 534 | (") 535 | endCaptures 536 | 537 | 0 538 | 539 | name 540 | punctuation.definition.string.end.pcode 541 | 542 | 543 | name 544 | string.quoted.double.pcode 545 | 546 | 547 | begin 548 | ' 549 | beginCaptures 550 | 551 | 0 552 | 553 | name 554 | punctuation.definition.string.begin.pcode 555 | 556 | 557 | end 558 | ' 559 | endCaptures 560 | 561 | 0 562 | 563 | name 564 | punctuation.definition.string.end.pcode 565 | 566 | 567 | name 568 | string.quoted.single.pcode 569 | 570 | 571 | 572 | values 573 | 574 | patterns 575 | 576 | 577 | include 578 | #strings 579 | 580 | 581 | include 582 | #object-types 583 | 584 | 585 | include 586 | #constants-and-special-vars 587 | 588 | 589 | 590 | 591 | scopeName 592 | source.peoplecode 593 | uuid 594 | 2B449DF6-6B1D-11D9-94EC-000D93589AFG 595 | 596 | 597 | --------------------------------------------------------------------------------