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.
This commit is contained in:
parent
b891f3a81e
commit
0f3eb95f4b
4 changed files with 14 additions and 8 deletions
|
@ -1,4 +1,6 @@
|
|||
[Component]
|
||||
Key=gb.eval.highlight
|
||||
Version=3.18.90
|
||||
State=3
|
||||
Requires=gb.eval
|
||||
Excludes=gb.highlight
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gb.eval.highlight 3.16.90\n"
|
||||
"POT-Creation-Date: 2021-11-05 16:03 UTC\n"
|
||||
"POT-Creation-Date: 2023-09-23 11:38 UTC\n"
|
||||
"PO-Revision-Date: 2021-11-05 11:54 UTC\n"
|
||||
"Last-Translator: Benoît Minisini <g4mba5@gmail.com>\n"
|
||||
"Language: fr\n"
|
||||
|
|
|
@ -7,6 +7,14 @@ Static Property Read Styles As String[]
|
|||
Static Private $aStyles As String[]
|
||||
Static Private $aStyleNames As String[]
|
||||
|
||||
Static Public Sub _init()
|
||||
|
||||
If Component.IsLoaded("gb.highlight") Then
|
||||
Error.Raise("'gb.eval.highlight' component is not compatible with 'gb.highlight'.")
|
||||
Endif
|
||||
|
||||
End
|
||||
|
||||
Static Private Function Styles_Read() As String[]
|
||||
|
||||
If Not $aStyles Then
|
||||
|
|
|
@ -46,12 +46,8 @@ Private Const TAG_CODE As Integer = 1
|
|||
'
|
||||
Public Sub Main()
|
||||
|
||||
Dim hHighlighter As TextHighlighter
|
||||
Dim hTheme As TextHighlighterTheme
|
||||
|
||||
hHighlighter = TextHighlighter["gambas"]
|
||||
hTheme = New TextHighlighterTheme
|
||||
'hTheme.Invert()
|
||||
Print hHighlighter.ToANSI(File.Load("UnitTest/TestProgram"), hTheme)
|
||||
Highlight.Analyze("Dim I As Integer%> <div>", True,, True)
|
||||
Print Highlight.TextAfter; "|"
|
||||
Print Highlight.LengthBefore
|
||||
|
||||
End
|
||||
|
|
Loading…
Reference in a new issue