Commit graph

3859 commits

Author SHA1 Message Date
Benoît Minisini
173e9a699d Another fix of 'gambas' highlighting when 'CanRewrite' is FALSE.
[GB.HIGHLIGHT]
* BUG: Another fix of 'gambas' highlighting when 'CanRewrite' is FALSE.
* BUG: Fix 'webpage' highlighting of '<%/%>'.
2023-11-03 18:07:06 +01:00
Benoît Minisini
7179b5f18d TextEditor: 'Highlight' property returns the highlighter key as before, not the highlighter display name.
[GB.FORM.EDITOR]
* BUG: TextEditor: 'Highlight' property returns the highlighter key as before, not the highlighter display name.
2023-11-03 13:43:49 +01:00
Benoît Minisini
252617baef Fix 'gambas' highlighting when 'CanRewrite' is FALSE. Fix highlighting recursion when 'CanRewrite' is TRUE.
[GB.HIGHLIGHT]
* BUG: Fix 'gambas' highlighting when 'CanRewrite' is FALSE.
* BUG: Fix highlighting recursion when 'CanRewrite' is TRUE.
* NEW: TextHighlighter: 'ToHTML()', 'ToANSI()' and 'Paint()' now take the 'CanRewrite' property into account.
* NEW: Raise an error if we try to load 'gb.highlight' whereas 'gb.eval.highlight' is already loaded.
2023-11-03 01:21:44 +01:00
Benoît Minisini
982f48f0bb TextEditor: 'Keywords' property works again.
[GB.FORM.EDITOR]
* BUG: TextEditor: 'Keywords' property works again.
2023-11-02 21:17:23 +01:00
Benoît Minisini
b9bdfc5363 Fix translation of color names.
[GB.HIGHLIGHT]
* BUG: Fix translation of color names.
2023-11-01 23:28:55 +01:00
Benoît Minisini
b2e4cea881 Fix highlighter colors management.
[GB.HIGHLIGHT]
* NEW: TextHighlighter: Syntax for specifying a default to use if the color name is not defined in the theme.
* NEW: TextHighlighter: 'Key' is now the internal highlighter name.
* NEW: TextHighlighter: 'Name' now returns the highlighter display name.
* NEW: TextHighlighter: 'Register()' now takes the highlighter internal name, its display name, and the path of the definition file.
* BUG: TextHighlighter: 'List' property is now more accurate.
* NEW: TextHighlighter: 'Colors' is a new property that returns the color names used by a specific highlighter.
* BUG: TextHighlighterStyle: Fix the 'Background' property.
* NEW: TextHighlighterTheme: Make color names translatable.
* NEW: TextHighlighterTheme: Some colors are now registered as "common colors". They are returned by the 'Colors' property.
* NEW: TextHighlighterTheme: '_Register()' has been renamed as '_RegisterColor()'.
* NEW: Many highlighter fixes. Define default colors.
2023-11-01 18:26:15 +01:00
Benoît Minisini
f3419c8786 'TextHighlighter.CanRewrite' is now dynamic. 'TextHighlighter._Register()' is now 'TextHighlighter._RegisterColor()'.
[GB.FORM.EDITOR]
* BUG: 'TextHighlighter.CanRewrite' is now dynamic.
* BUG: 'TextHighlighter._Register()' is now 'TextHighlighter._RegisterColor()'.
2023-11-01 18:14:38 +01:00
Benoît Minisini
13be9a4a53 Calling 'Object.Attach()' on a control now triggers an automatic refresh.
[GB.WEB.GUI]
* NEW: Calling 'Object.Attach()' on a control now triggers an automatic refresh.
2023-10-31 19:02:23 +01:00
Benoît Minisini
0f3eb95f4b The component is now deprecated. Raise an error early if we try to load 'gb.eval.highlight' when 'gb.highlight' is loaded.
[GB.EVAL.HIGHLIGHT]
* NEW: The component is now deprecated.
* NEW: Raise an error early if we try to load 'gb.eval.highlight' when 'gb.highlight' is loaded.
2023-10-31 13:35:14 +01:00
Benoît Minisini
350b5e8b22 Some fixes.
[GB.HIGHLIGHT]
* NEW: TextHighlighter: 'CanRewrite' is now dynamic.
* NEW: Highlighters whose name starts with an underscore are ignored by the 'TextHighlighter.List' property.
* NEW: Rename internal highlighters so that they are not returned by the 'TextHighlighter.List' property.
* NEW: Cosmetic changes in some highlighters.
2023-10-31 02:47:11 +01:00
Benoît Minisini
f6c54541f6 Use 'gb.highlight' instead of the deprecated 'gb.eval.highlight'.
[GB.MARKDOWN]
* BUG: Use 'gb.highlight' instead of the deprecated 'gb.eval.highlight'.
2023-10-31 02:37:10 +01:00
Benoît Minisini
051111520b Fix 'css' highlighting.
[GB.HIGHLIGHT]
* BUG: Fix 'css' highlighting.
2023-10-30 00:33:37 +01:00
Benoît Minisini
378623a500 Compile custom highlighter without using sub-processes.
[GB.HIGHLIGHT]
* NEW: Compile custom highlighter without using sub-processes.
2023-10-29 19:53:58 +01:00
Benoît Minisini
f111277e55 TextHighlighter: Implement 'ToANSI()' method.
[GB.HIGHLIGHT]
* NEW: TextHighlighter: Implement 'ToANSI()' method.
* BUG: Fix 'javascript' and 'sql' highlighting.
2023-10-29 19:38:53 +01:00
Benoît Minisini
e5944b8b50 Remove the 'Wait' instruction, that should be useless now.
[GB.HIGHLIGHT]
* BUG: Remove the 'Wait' instruction, that should be useless now.
2023-10-29 16:49:41 +01:00
Benoît Minisini
67d024b283 Résolution du conflit. 2023-10-29 16:48:59 +01:00
Benoît Minisini
4325f62269 Create custom highlighter component with two 'Shell' instructions. Add the 'limit' instruction.
[GB.HIGHLIGHT]
* BUG: Create custom highlighter component with two 'Shell' instructions, one for the compiler, and one for the archiver.
* NEW: Add the 'limit' command so that a state can define the 'TextHighlighter.Limit' flag.
* NEW: TextHighlighter: Handle the 'Limit' flag in the ToHTML() method.
* NEW: Use the 'limit' command in 'javascript' and 'diff' highlighting.
2023-10-29 16:48:08 +01:00
gambix
284c7c34dd Little patch to allow loading of slow generated texthighlighter
[GB.HIGHLIGHT]
BUG: TextHighLighter: Little patch to allow loading of slow generated texthighlighter
2023-10-29 15:30:47 +01:00
Benoît Minisini
587bc846a0 Fix 'sh' highlighting.
[GB.HIGHLIGHT]
* NEW: Fix 'sh' highlighting.
2023-10-29 01:43:00 +02:00
Benoît Minisini
f6367792f2 Try to enhance 'sh' highlighting.
[GB.HIGHLIGHT]
* NEW: Try to enhance 'sh' highlighting. Bash syntax is really cumbersome, so it will never be perfect.
2023-10-29 01:35:05 +02:00
Benoît Minisini
a7cc38a53f Merge branch 'bsteers4-master-patch-70480' into 'master'
Make sh.highlight

See merge request gambas/gambas!313
2023-10-28 23:01:49 +00:00
Benoît Minisini
1ea56909dc TextHighlighter: Fix Paint() method.
[GB.HIGHLIGHT]
* BUG: TextHighlighter: Fix Paint() method.
2023-10-29 00:47:45 +02:00
Bruce Steers
9add7f1693 tweak sh highlight 2023-10-28 23:45:40 +01:00
Benoît Minisini
e815d714d3 Correctly set 'TextHighlighter.CanRewrite'. This really should not be a global variable!
[GB.FORM.EDITOR]
* BUG: Correctly set 'TextHighlighter.CanRewrite'. This really should not be a global variable!
2023-10-29 00:36:23 +02:00
Benoît Minisini
9f21f0c9c0 Fix 'gambas' and 'webpage' highlighting.
[GB.HIGHLIGHT]
* BUG: Catch the possible errors returned by the archiver when compiling a generated highlighting component.
* NEW: TextHighlighter: ToHTML() and Paint() routine ignore the 'TextHighlighter.CanRewrite' property (this is not their job).
* BUG: Use the new 'Highlight' properties to fix the Gambas highlighter.
* BUG: Fix 'webpage' highlighting.
2023-10-29 00:02:29 +02:00
Bruce Steers
2d5dd6ddac add escape chars to sh 2023-10-28 19:08:13 +01:00
Bruce Steers
f924966bcd Make sh.highlight
[GB.HIGHLIGHT]
* NEW: create initial sh highlight file
2023-10-28 11:54:09 +00:00
Benoît Minisini
685037ef54 Fix 'Application.Host' and 'Application.Port'. The port is not stored in CGI["SERVER_PORT"], but in the port part of CGI["HTTP_HOST"].
[GB.WEB]
* BUG: Fix 'Application.Host' and 'Application.Port'. The port is not stored in CGI["SERVER_PORT"], but in the port part of CGI["HTTP_HOST"].
2023-10-28 09:59:36 +02:00
Benoît Minisini
74eeb810af Compile 'gb.highlight' before 'gb.form.editor' that requires it.
[CONFIGURATION]
* BUG: Compile 'gb.highlight' before 'gb.form.editor' that requires it.
2023-10-28 09:55:28 +02:00
Benoît Minisini
2afa5ed141 Merge branch 'master' of gitlab.com:gambas/gambas 2023-10-28 02:27:46 +02:00
Benoît Minisini
a13ebacff9 Fix 'diff' highlighting again.
[GB.HIGHLIGHT]
* BUG: Fix 'diff' highlighting again.
2023-10-28 02:27:07 +02:00
Benoît Minisini
f27d3bd32a Fix 'diff' highlighting.
[GB.HIGHLIGHT]
* BUG: Fix 'diff' highlighting.
2023-10-28 02:21:50 +02:00
Benoît Minisini
43fb947da0 ScrollArea: Adapt mouse wheel scrolling to client size.
[GB.GUI.BASE]
* NEW: GridView: Lighter row highlighting.
* NEW: ScrollArea: Adapt mouse wheel scrolling to client size.
2023-10-28 02:18:29 +02:00
Benoît Minisini
dc411f61c6 TerminalView: Take high resolution mouse wheel into account.
[GB.FORM.TERMINAL]
* BUG: TerminalView: Take high resolution mouse wheel into account.
2023-10-28 02:15:25 +02:00
Benoît Minisini
ed7a2c7807 The component is not experimental anymore.
[GB.HIGHLIGHT]
* NEW: The component is not experimental anymore.
2023-10-28 02:00:32 +02:00
Benoît Minisini
c2a73592d0 Use the new 'gb.highlight' component instead of 'gb.eval.highlight'.
[GB.FORM.EDITOR]
* NEW: Use the new 'gb.highlight' component instead of 'gb.eval.highlight'.
2023-10-28 02:00:00 +02:00
Benoît Minisini
3e4cd94dbb Manye fixed and enhancements. Add 'diff' and 'sql' highlighting. Add TextHighlighter.Paint() method.
[GB.HIGHLIGHT]
* NEW: Regular expressions are now written between / and /.
* NEW: Normal strings can be written between " and " to be able to write escape characters like newline or tab.
* NEW: "between here and ..." and "from here to ..." command syntax.
* NEW: "from" and "between" accept regular expression or normal strings as patterns.
* NEW: The "match" command now only matches a pattern or a normal string.
* NEW: Children state of a "match ..." command follow the matched text.
* NEW: TextHighlighter: Paint() has been implemented.
* NEW: TextHighlighter: FromFile() has been removed, and replaced by the Register() method.
* NEW: TextHighlighterTheme: The Colors property returns the color names registered by all the highlighters.
* BUG: Fix highlighting embedding.
* BUG: Fix 'c', 'cplusplus', 'css', 'html', 'javascript', 'webpage' highlighting.
* NEW: Add 'diff', 'sql' highlighting.
* OPT: Move test files in the 'Project' directory so that they do not go inside the executable.
2023-10-28 01:58:15 +02:00
Benoît Minisini
770151492d Merge branch 'bsteers4-master-patch-36817' into 'master'
Update TextHighlighter_Sh.class to fix escaped quotes

See merge request gambas/gambas!312
2023-10-26 20:32:22 +00:00
Benoît Minisini
d85498e2ad Add 'css' highlighting, fix some bugs, add some enhancements.
[GB.HIGHLIGHT]
* BUG: Fix embedded highlighting management.
* BUG: Correctly handle UTF-8 text everywhere now.
* NEW: Some little syntax changes in definition file.
* NEW: Add '@include' command for including inside a definition file another file.
* NEW: TextHighlighter.ToHTML() takes embedded highlighting into account using automatic background colors.
* NEW: Add 'c', 'cpluscplus' and 'webpage' highlighting.
2023-10-26 22:31:10 +02:00
Benoît Minisini
75ae8bee70 Fix disabled controls rendering.
[GB.WEB.GUI]
* BUG: WebMenu: Enabled proerty is taken into account.
* BUG: All disabled controls are rendered gray out now.
2023-10-26 04:09:49 +02:00
Bruce Steers
11f03b7f12 Update TextHighlighter_Sh.class, really fix escaped quotes
[GB.EVAL.HIGHLIGHT]
* BUG: also fix escaped single quotes
2023-10-24 09:18:51 +00:00
Bruce Steers
35c915c417 Update TextHighlighter_Sh.class to fix escaped quotes
[GB.EVAL.HIGHLIGHT]
* BUG: correctly position pointer after finding escaped quote \" in SH highlighting.

#  i noticed this glitch when an sh file has escaped quotes \" \" , the closing \" char was not highlighted.
2023-10-24 08:34:39 +00:00
Benoît Minisini
72417abe78 Add 'css' highlighting, fix some bugs, add some enhancements.
[GB.HIGHLIGHT]
* BUG: Fix intermediate state return on end of text.
* NEW: Add 'css' highlighting.
* NEW: Add imbricated 'css' inside 'html' highlighting.
* NEW: "word" and "symbol" commands can take their arguments in a file.
* NEW: Allow to define substitutions variable in definition files.
* BUG: Correctly Handle highlighting of a text token of more than 255 characters.
* NEW: Start to port Gambas highlighting to the new design.
2023-10-22 01:00:19 +02:00
Benoît Minisini
12efdb2bf9 Support for embedded highlighting.
[GB.HIGHLIGHT]
* NEW: Support for embedded highlighting.
* NEW: The "keyword" command is like "word", but it adds the specified words to the list of keywords.
* NEW: Javascript is highlighted inside HTML.
2023-10-21 09:19:23 +02:00
Benoît Minisini
f3618751d8 Some fixes in javascript highlighter.
[GB.HIGHLIGHT]
* BUG: Some fixes in javascript highlighter.
2023-10-20 03:03:07 +02:00
Benoît Minisini
3b9b1d8bfd Merge branch 'master' of gitlab.com:gambas/gambas 2023-10-20 01:49:34 +02:00
Benoît Minisini
1e296e46dc Add "match ... to ..." syntax. Allow children states in "match ... to ..." and "from ... to ...".
[GB.HIGHLIGHT]
* NEW: Add "match ... to ..." syntax.
* NEW: Allow children states in "match ... to ..." and "from ... to ...".
* NEW: Add 'html.highlight'.
2023-10-20 01:47:06 +02:00
gambix
08e8a06008 Bug on the tile ordering
[GB.MAP]
* BUG: _MapTile, Correction on bad file naming for tiles (curious artifact on httpClient.Tag).
2023-10-19 10:56:04 +02:00
Benoît Minisini
5cabfec061 Add 'gb.highlight' component to the list of components to compile.
[CONFIGURATION]
* NEW: Add 'gb.highlight' component to the list of components to compile.

[GB.HIGHLIGHT]
* NEW: Update project icon.

[GB.WEB.FEED]
* NEW: Update project icon.
2023-10-19 04:05:47 +02:00
Benoît Minisini
68b53e0367 Initial implementation.
[GB.HIGHLIGHT]
* NEW: Initial implementation.
2023-10-19 04:00:54 +02:00