瀏覽代碼

Highlighters korrigiert

Simon Grossenbacher 9 年之前
父節點
當前提交
a60ed8a6e9
共有 11 個文件被更改,包括 436 次插入14 次删除
  1. 3 3
      AppConfig.json
  2. 167 0
      Colors/Blue.json
  3. 121 0
      Highlighters/Headers.json
  4. 2 2
      Highlighters/JSON.json
  5. 121 0
      Highlighters/Params.json
  6. 二進制
      RESTDebugger.exe
  7. 2 0
      prj/RESTDebugger.dproj
  8. 二進制
      prj/RESTDebugger.res
  9. 6 6
      prj/RESTDebugger.stat
  10. 3 3
      src/_frmMain.dfm
  11. 11 0
      src/_frmMain.pas

+ 3 - 3
AppConfig.json

@@ -5,12 +5,12 @@
 	},
 	},
 	"Project": {
 	"Project": {
 		"AutoOpenLastUsed": true,
 		"AutoOpenLastUsed": true,
-		"LastUsed": "C:\\dev\\RESTDebugger\\Test-Config.rdproj",
+		"LastUsed": "C:\\dev\\MobileERP\\MobileERPService\\MobileERP-Webservices.rdproj",
 		"AutoSaveProject": true
 		"AutoSaveProject": true
 	},
 	},
 	"MainWindowPos": {
 	"MainWindowPos": {
-		"Left": 1160,
-		"Top": 319,
+		"Left": 839,
+		"Top": 252,
 		"Width": 720,
 		"Width": 720,
 		"Height": 930,
 		"Height": 930,
 		"StayOnTop": false
 		"StayOnTop": false

+ 167 - 0
Colors/Blue.json

@@ -0,0 +1,167 @@
+{
+   "Colors": {
+      "Info": {
+         "General": {
+            "Version": "1.8.1",
+            "Date": "30.10.2016"
+         },
+         "Author": {
+            "Name": "Lasse Rautiainen",
+            "Mail": "lasse@bonecode.com"
+         }
+      },
+      "Editor": {
+         "Colors": {
+            "Background": "clWhite",
+            "ActiveLineBackground": "$00E6FAFF",
+            "CodeFoldingActiveLineBackground": "$00E6FAFF",
+            "CodeFoldingBackground": "clWhite",
+            "CodeFoldingCollapsedLine": "$00CC9999",
+            "CodeFoldingFoldingLine": "$00CC9999",
+            "CodeFoldingFoldingLineHighlight": "$00CC9999",
+            "CodeFoldingIndent": "$00CC9999",
+            "CodeFoldingIndentHighlight": "$00CC9999",
+            "CodeFoldingHintBackground": "clWhite",
+            "CodeFoldingHintBorder": "$00CC9999",
+            "CodeFoldingHintText": "clNone",
+            "CodeFoldingHintIndicatorBackground": "clWhite",
+            "CodeFoldingHintIndicatorBorder": "$00CC9999",
+            "CodeFoldingHintIndicatorMark": "$00CC9999",
+            "CompletionProposalBackground": "clWhite",
+            "CompletionProposalForeground": "clBlack",
+            "CompletionProposalSelectedBackground": "clHighlight",
+            "CompletionProposalSelectedText": "clHighlightText",
+            "LeftMarginActiveLineBackground": "$00E6FAFF",
+            "LeftMarginBackground": "clWhite",
+            "LeftMarginBorder": "clWhite",
+            "LeftMarginLineNumberLine": "$00CC9999",
+            "LeftMarginLineNumbers": "$00CC9999",
+            "LeftMarginLineStateModified": "clYellow",
+            "LeftMarginLineStateNormal": "clLime",
+            "LeftMarginBookmarkPanel": "clWhite",
+            "MatchingPairMatched": "clAqua",
+            "MatchingPairUnderline": "$00CC9999",
+            "MatchingPairUnmatched": "clYellow",
+            "MinimapBackground": "clNone",
+            "MinimapBookmark": "$00999999",
+            "MinimapVisibleLines": "$00E6FAFF",
+            "RightMargin": "clSilver",
+            "RightMovingEdge": "clSilver",
+            "SearchHighlighterBackground": "$0078AAFF",
+            "SearchHighlighterForeground": "clBlack",
+            "SearchInSelectionBackground": "$00FCFDCD",
+            "SearchMapActiveLine": "$00F0F0F0",
+            "SearchMapBackground": "$00F4F4F4",
+            "SearchMapForeground": "$0078AAFF",
+            "SelectionBackground": "$00A56D53",
+            "SelectionForeground": "clHighlightText",
+            "SyncEditBackground": "$00FCFDCD",
+            "SyncEditEditBorder": "$00333333",
+            "SyncEditWordBorder": "$00A56D53",
+            "WordWrapIndicatorArrow": "$00333333",
+            "WordWrapIndicatorLines": "$009f6f2f"
+         },
+         "Fonts": {
+            "LineNumbers": "Consolas",
+            "Text": "Consolas",
+            "Minimap": "Consolas",
+            "CodeFoldingHint": "Consolas",
+            "CompletionProposal": "Consolas"
+         },
+         "FontSizes": {
+            "LineNumbers": "8",
+            "Text": "9",
+            "Minimap": "1",
+            "CodeFoldingHint": "8",
+            "CompletionProposal": "8"
+         }
+      },
+      "Elements": [
+         {
+            "Name": "Editor",
+            "Foreground": "$00333333",
+            "Background": "clWhite"
+         },
+         {
+            "Name": "Comment",
+            "Foreground": "$00999999",
+            "Background": "clWhite",
+            "Style": "Italic"
+         },
+         {
+            "Name": "String",
+            "Foreground": "$005049d4",
+            "Background": "clWhite"
+         },
+         {
+            "Name": "Directive",
+            "Foreground": "$00999900",
+            "Background": "clWhite"
+         },
+         {
+            "Name": "Character",
+            "Foreground": "$00cf9f4f",
+            "Background": "clWhite"
+         },
+         {
+            "Name": "ReservedWord",
+            "Foreground": "$009f6f2f",
+            "Background": "clWhite",
+            "Style": "Bold"
+         },
+         {
+            "Name": "Symbol",
+            "Foreground": "clNavy",
+            "Background": "clWhite"
+         },
+         {
+            "Name": "Number",
+            "Foreground": "$00AAAA33",
+            "Background": "clWhite"
+         },
+         {
+            "Name": "HexNumber",
+            "Foreground": "$00AAAA33",
+            "Background": "clWhite"
+         },
+         {
+            "Name": "HighlightedBlock",
+            "Foreground": "clBlack",
+            "Background": "$00f9f7f7"
+         },
+         {
+            "Name": "HighlightedBlockSymbol",
+            "Foreground": "clNavy",
+            "Background": "$00f9f7f7"
+         },
+         {
+            "Name": "AssemblerComment",
+            "Foreground": "$00999999",
+            "Background": "$00f9f7f7",
+            "Style": "Italic"
+         },
+         {
+            "Name": "AssemblerReservedWord",
+            "Foreground": "$009f6f2f",
+            "Background": "$00f9f7f7",
+            "Style": "Bold"
+         },
+         {
+            "Name": "Attribute",
+            "Foreground": "$00cf9f4f",
+            "Background": "clWhite"
+         },
+         {
+            "Name": "Method",
+            "Foreground": "$009f6f2f",
+            "Background": "clWhite",
+            "Style": "Bold"
+         },
+         {
+            "Name": "MethodName",
+            "Foreground": "$00333333",
+            "Background": "clWhite"
+         }
+      ]
+   }
+}

+ 121 - 0
Highlighters/Headers.json

@@ -0,0 +1,121 @@
+{
+   "Highlighter": {
+      "Info": {
+         "General": {
+            "Version": "1.8.1",
+            "Date": "30.10.2016",
+            "Sample": [
+               "; Comment\r\n",
+               "[Section]\r\n",
+               "Name=Value"
+            ]
+         },
+         "Author": {
+            "Name": "Lasse Rautiainen",
+            "Mail": "lasse@bonecode.com"
+         }
+      },
+      "MainRules": {
+         "Attributes": {
+            "Element": "Editor"
+         },
+         "SubRules": {
+            "Range": [
+               {
+                  "Type": "LineComment",
+                  "Attributes": {
+                     "Element": "Comment"
+                  },
+                  "Properties": {
+                     "CloseOnEndOfLine": true,
+                     "OpenBeginningOfLine": true
+                  },
+                  "TokenRange": {
+                     "Open": ";"
+                  }
+               },
+               {
+                  "Type": "String",
+                  "Attributes": {
+                     "Element": "ReservedWord"
+                  },
+                  "Properties": {
+                     "CloseOnEndOfLine": true
+                  },
+                  "TokenRange": {
+                     "Open": "[",
+                     "Close": "]"
+                  }
+               },
+               {
+                  "Type": "String",
+                  "Attributes": {
+                     "Element": "String"
+                  },
+                  "Properties": {
+                     "CloseOnEndOfLine": true
+                  },
+                  "TokenRange": {
+                     "Open": ":"
+                  }
+               }
+            ],
+            "KeyList": [
+               {
+                  "Type": "Symbol",
+                  "Words": [
+                     ":"
+                  ],
+                  "Attributes": {
+                     "Element": "Symbol"
+                  }
+               }
+            ]
+         }
+      }
+   },
+   "CodeFolding": {
+      "Ranges": [
+         {
+            "Options": {
+               "MatchingPairHighlight": false
+            },
+            "SkipRegion": [
+               {
+                  "OpenToken": ";",
+                  "RegionType": "SingleLine"
+               }
+            ],
+            "FoldRegion": [
+               {
+                  "OpenToken": "[",
+                  "CloseToken": "[",
+                  "Properties": {
+                     "OpenTokenBeginningOfLine": true,
+                     "CloseTokenBeginningOfLine": true,
+                     "OpenIsClose": true,
+                     "TokenEndIsPreviousLine": true,
+                     "OpenTokenEnd": "]"
+                  }
+               }
+            ]
+         }
+      ]
+   },
+   "MatchingPair": {
+      "Pairs": [
+         {
+            "OpenToken": "[",
+            "CloseToken": "]"
+         }
+      ]
+   },
+   "CompletionProposal": {
+      "SkipRegion": [
+         {
+            "OpenToken": ";",
+            "RegionType": "SingleLine"
+         }
+      ]
+   }
+}

+ 2 - 2
Highlighters/JSON.json

@@ -2,8 +2,8 @@
    "Highlighter": {
    "Highlighter": {
       "Info": {
       "Info": {
          "General": {
          "General": {
-            "Version": "1.7.0",
-            "Date": "20.09.2016",
+            "Version": "1.8.1",
+            "Date": "30.10.2016",
             "Sample": [
             "Sample": [
                "{\r\n",
                "{\r\n",
                "  \"firstName\": \"John\",\r\n",
                "  \"firstName\": \"John\",\r\n",

+ 121 - 0
Highlighters/Params.json

@@ -0,0 +1,121 @@
+{
+   "Highlighter": {
+      "Info": {
+         "General": {
+            "Version": "1.8.1",
+            "Date": "30.10.2016",
+            "Sample": [
+               "; Comment\r\n",
+               "[Section]\r\n",
+               "Name=Value"
+            ]
+         },
+         "Author": {
+            "Name": "Lasse Rautiainen",
+            "Mail": "lasse@bonecode.com"
+         }
+      },
+      "MainRules": {
+         "Attributes": {
+            "Element": "Editor"
+         },
+         "SubRules": {
+            "Range": [
+               {
+                  "Type": "LineComment",
+                  "Attributes": {
+                     "Element": "Comment"
+                  },
+                  "Properties": {
+                     "CloseOnEndOfLine": true,
+                     "OpenBeginningOfLine": true
+                  },
+                  "TokenRange": {
+                     "Open": ";"
+                  }
+               },
+               {
+                  "Type": "String",
+                  "Attributes": {
+                     "Element": "ReservedWord"
+                  },
+                  "Properties": {
+                     "CloseOnEndOfLine": true
+                  },
+                  "TokenRange": {
+                     "Open": "[",
+                     "Close": "]"
+                  }
+               },
+               {
+                  "Type": "String",
+                  "Attributes": {
+                     "Element": "String"
+                  },
+                  "Properties": {
+                     "CloseOnEndOfLine": true
+                  },
+                  "TokenRange": {
+                     "Open": "="
+                  }
+               }
+            ],
+            "KeyList": [
+               {
+                  "Type": "Symbol",
+                  "Words": [
+                     "="
+                  ],
+                  "Attributes": {
+                     "Element": "Symbol"
+                  }
+               }
+            ]
+         }
+      }
+   },
+   "CodeFolding": {
+      "Ranges": [
+         {
+            "Options": {
+               "MatchingPairHighlight": false
+            },
+            "SkipRegion": [
+               {
+                  "OpenToken": ";",
+                  "RegionType": "SingleLine"
+               }
+            ],
+            "FoldRegion": [
+               {
+                  "OpenToken": "[",
+                  "CloseToken": "[",
+                  "Properties": {
+                     "OpenTokenBeginningOfLine": true,
+                     "CloseTokenBeginningOfLine": true,
+                     "OpenIsClose": true,
+                     "TokenEndIsPreviousLine": true,
+                     "OpenTokenEnd": "]"
+                  }
+               }
+            ]
+         }
+      ]
+   },
+   "MatchingPair": {
+      "Pairs": [
+         {
+            "OpenToken": "[",
+            "CloseToken": "]"
+         }
+      ]
+   },
+   "CompletionProposal": {
+      "SkipRegion": [
+         {
+            "OpenToken": ";",
+            "RegionType": "SingleLine"
+         }
+      ]
+   }
+}

二進制
RESTDebugger.exe


文件差異過大導致無法顯示
+ 2 - 0
prj/RESTDebugger.dproj


二進制
prj/RESTDebugger.res


+ 6 - 6
prj/RESTDebugger.stat

@@ -1,10 +1,10 @@
 [Stats]
 [Stats]
-EditorSecs=5382
-DesignerSecs=2308
-InspectorSecs=1132
-CompileSecs=144004
-OtherSecs=1440
+EditorSecs=5351
+DesignerSecs=2365
+InspectorSecs=1138
+CompileSecs=155728
+OtherSecs=1388
 StartTime=27.10.2016 18:27:37
 StartTime=27.10.2016 18:27:37
 RealKeys=0
 RealKeys=0
 EffectiveKeys=0
 EffectiveKeys=0
-DebugSecs=4087
+DebugSecs=4446

+ 3 - 3
src/_frmMain.dfm

@@ -31,7 +31,7 @@ object frmMain: TfrmMain
     BevelOuter = bvNone
     BevelOuter = bvNone
     Color = clWhite
     Color = clWhite
     ParentBackground = False
     ParentBackground = False
-    TabOrder = 3
+    TabOrder = 2
     object Label1: TLabel
     object Label1: TLabel
       Left = 25
       Left = 25
       Top = 31
       Top = 31
@@ -329,7 +329,7 @@ object frmMain: TfrmMain
     Height = 372
     Height = 372
     Align = alTop
     Align = alTop
     BevelOuter = bvNone
     BevelOuter = bvNone
-    TabOrder = 1
+    TabOrder = 0
     object Label2: TLabel
     object Label2: TLabel
       Left = 8
       Left = 8
       Top = 16
       Top = 16
@@ -1085,7 +1085,7 @@ object frmMain: TfrmMain
       Category = 0
       Category = 0
       Hint = 'Run'
       Hint = 'Run'
       Visible = ivAlways
       Visible = ivAlways
-      ShortCut = 116
+      ShortCut = 120
       OnClick = tbbtnRunClick
       OnClick = tbbtnRunClick
     end
     end
     object dxBarSubItem4: TdxBarSubItem
     object dxBarSubItem4: TdxBarSubItem

+ 11 - 0
src/_frmMain.pas

@@ -403,6 +403,17 @@ begin
   FActivePreset := '';
   FActivePreset := '';
 
 
   EditorContent.Highlighter.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'Highlighters\JSON.json');
   EditorContent.Highlighter.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'Highlighters\JSON.json');
+  EditorContent.Highlighter.Colors.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'Colors\Blue.json');
+
+  EditorHeaders.Highlighter.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'Highlighters\Headers.json');
+  EditorHeaders.Highlighter.Colors.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'Colors\Blue.json');
+
+  EditorURLParams.Highlighter.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'Highlighters\Params.json');
+  EditorURLParams.Highlighter.Colors.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'Colors\Blue.json');
+
+  EditorExtraHeaders.Highlighter.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'Highlighters\Params.json');
+  EditorExtraHeaders.Highlighter.Colors.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'Colors\Blue.json');
+
 
 
   if ParamStr(1) <> '' then
   if ParamStr(1) <> '' then
   begin
   begin

部分文件因文件數量過多而無法顯示