Hi
I'm evaluating UE for use with xHarbour/Clipper and have had a go at setting up a wordfile to provide syntax highlighting and code folding for Clipper/xHarbour, but it's not at all pretty (yet) !
The problems I'm having are:
1. Syntax highlighting is not working consistently.
For example, the C1 wordlist is:
hbcheckbox hblistbox hbobject hbpersistent hbpushbutton hbradiobutton hbradiogroup hbscrollbar menuitem popup
tbcolumn tbrowse thtmldocument thtmliterator thtmliteratorregex thtmliteratorscan thtmlnode tipclient tipclientftp
tipclienthttp tipclientpop tipclientsmtp tipmail topbarmenu tstream tstreamfilereader tstreamfilewriter turl
txmldocument txmliterator txmliteratorregex txmliteratorscan txmlnode win32bmp win32prn
But when UE displays a .prg file containing all of the above C1 words, not all of them are highlighted in the color assigned to that category of keywords. Specifically, the following words aren't correctly highlighted:
menuitem popup tipclientftp turl win32bmp win32prn.
As another example, the C2 wordlist is:
#command #define #error #if #ifdef #ifndef #include #pragma #stdout #translate #uncommand #undef #untranslate #xcommand #xtranslate #xuncommand #xuntranslate
But when UE displays a .prg file containing all of the above C2 words, it correctly highlights all of the above words except for #xuntranslate.
As another example, the C3 wordlist is:
access announce assign associate begin break case catch class classdata classmethod data delegate destructor do each enable end endclass error exit exported extend external field for from function global handler hidden if init inline local memvar message method object operator override parameters pragma private procedure protected public readonly recover request return sequence shared static struct switch try type typedef var virtual while with
When UE displays a .prg file containing all of the above C3 words, the following words are not highlighted: begin break case catch class classdata classmethod data delegate destructor do each enable end endclass error exit exported extend external function global handler hidden if init inline local memvar message method object operator override parameters pragma private procedure protected public sequence shared static struct switch try type typedef var virtual while with
And one more example: The C4 wordlist is:
accept all alternate append autopen autorder autoshare average background backgroundtick bell blank box cancel century checkbox clear close
color commit confirm console continue copy count create cursor date dbflockscheme decimals default delete deleted delimiters descending device dircase
dirseparator eject eol epoch erase errorlog errorloop escape eventmask exact exclusive extended file filecase filter find fixed
gets go hardcommit index input intensity join key keyboard list listbox locate log margin memoblock memory menu optimize order
pack path printer prompt pushbutton quit radiogroup read recall reindex relation release rename replace restore run save say scope
scopebottom scopetop scoreboard screen seek select set skip softseek sort store strictread structure style sum tag tasks text time to
total trace typeahead unique unlock update use videomode wait wrap zap
When UE displays a file containing all of the above C4 words, the following words are not highlighted:
background backgroundtick bell blank box cancel century checkbox clear close date dbflockscheme decimals default delete deleted delimiters descending device dircase
eject eol epoch erase errorlog errorloop escape eventmask exact exclusive extended file filecase filter find fixed
hardcommit index input intensity join key keyboard list listbox locate log margin memoblock memory menu optimize order
quit radiogroup read recall reindex relation release rename replace restore run save say scope
tag tasks text time to
unique unlock update use videomode wait wrap zap
2. Code folding not working consistently.
Code folding works consistently for the following constructs:
But not for the following constructs:
3. Jump to include file
Also, I'd like to be able to place the cursor on a line containing an #include statement, eg. #include 'Stdio.ch' and get UE to locate and open the #include file by pressing a hotkey.
These problems I'm experiencing are probably the result of some dumb mistake of mine in my wordfile (included below), so if you have any pointers or suggestions I'd be thankful to hear them.
Any pointers or suggestions would be appreciated.
Thanks
rl
Here is the complete contents of my wordfile (xHarbour.uew) between the ('- - - - - cut here - - - - -' lines)
- - - - - cut here - - - - -
/L20"Clipper/xHarbour" Line Comment = // Nocase Line Comment Alt = * Block Comment On = /* Block Comment Off = */ Escape Char = \ String Chars = "' File Extensions = PRG CH
/Colors = 12632256,12632256,8421376,8421504,255,
/Colors Back = 0,0,16777215,16777215,16777215,
/Colors Auto Back = 0,1,1,1,1,
/Font Style = 0,0,0,0,0,
Colors Back = 0,0,16777215,16777215,16777215,
Font Style = 0,0,0,0,0,
Colors Back = 0,0,16777215,16777215,16777215,
Font Style = 0,0,0,0,0,
Colors Back = 0,0,16777215,16777215,16777215,
Font Style = 0,0,0,0,0,
Colors Back = 0,0,16777215,16777215,16777215,
Font Style = 0,0,0,0,0,
/Delimiters = ~!@%^&*()-+=|\/{}[]:;"'<> , .?
/Function String 1 = "%[CLASS]+CLASS"
/Function String 2 = "%[METHOD]+METHOD"
/Function String 3 = "%[PROCEDURE]+PROCEDURE"
/Function String 4 = "%[FUNCTION]+FUNCTION"
/Ignore Strings SOL = "*" "//" "/*" "*/" "#"
/Open Fold Strings = "{" "class" "method" "procedure" "exit procedure" "init procedure" "function" "if" "do case" "do while" "for"
/Close Fold Strings = "}" "endclass" "return" "return" "return" "return" "return" "endif" "endcase" "enddo" "next"
/C1 Colors = 16711680 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
hbcheckbox hblistbox hbobject hbpersistent hbpushbutton hbradiobutton hbradiogroup hbscrollbar menuitem popup
tbcolumn tbrowse thtmldocument thtmliterator thtmliteratorregex thtmliteratorscan thtmlnode tipclient tipclientftp
tipclienthttp tipclientpop tipclientsmtp tipmail topbarmenu tstream tstreamfilereader tstreamfilewriter turl
txmldocument txmliterator txmliteratorregex txmliteratorscan txmlnode win32bmp win32prn
/C2 Colors = 255 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
#command #define #error #if #ifdef #ifndef #include #pragma #stdout #translate #uncommand #undef #untranslate #xcommand #xtranslate #xuncommand #xuntranslate
/C3 Colors = 33023 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
access announce assign associate begin break case catch classdata classmethod data delegate destructor do each enable end endclass error exit exported extend external
field for from global handler hidden if init inline local memvar message object operator override parameters pragma private protected public
readonly recover request return sequence shared static struct switch try type typedef var virtual while with
/C4 Colors = 32768 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
accept all alternate append autopen autorder autoshare average background backgroundtick bell blank box cancel century checkbox clear close
color commit confirm console continue copy count create cursor date dbflockscheme decimals default delete deleted delimiters descending device dircase
dirseparator eject eol epoch erase errorlog errorloop escape eventmask exact exclusive extended file filecase filter find fixed
gets go hardcommit index input intensity join key keyboard list listbox locate log margin memoblock memory menu optimize order
pack path printer prompt pushbutton quit radiogroup read recall reindex relation release rename replace restore run save say scope
scopebottom scopetop scoreboard screen seek select set skip softseek sort store strictread structure style sum tag tasks text time to
total trace typeahead unique unlock update use videomode wait wrap zap
- - - - - cut here - - - - -
I'm evaluating UE for use with xHarbour/Clipper and have had a go at setting up a wordfile to provide syntax highlighting and code folding for Clipper/xHarbour, but it's not at all pretty (yet) !
The problems I'm having are:
1. Syntax highlighting is not working consistently.
For example, the C1 wordlist is:
hbcheckbox hblistbox hbobject hbpersistent hbpushbutton hbradiobutton hbradiogroup hbscrollbar menuitem popup
tbcolumn tbrowse thtmldocument thtmliterator thtmliteratorregex thtmliteratorscan thtmlnode tipclient tipclientftp
tipclienthttp tipclientpop tipclientsmtp tipmail topbarmenu tstream tstreamfilereader tstreamfilewriter turl
txmldocument txmliterator txmliteratorregex txmliteratorscan txmlnode win32bmp win32prn
But when UE displays a .prg file containing all of the above C1 words, not all of them are highlighted in the color assigned to that category of keywords. Specifically, the following words aren't correctly highlighted:
menuitem popup tipclientftp turl win32bmp win32prn.
As another example, the C2 wordlist is:
#command #define #error #if #ifdef #ifndef #include #pragma #stdout #translate #uncommand #undef #untranslate #xcommand #xtranslate #xuncommand #xuntranslate
But when UE displays a .prg file containing all of the above C2 words, it correctly highlights all of the above words except for #xuntranslate.
As another example, the C3 wordlist is:
access announce assign associate begin break case catch class classdata classmethod data delegate destructor do each enable end endclass error exit exported extend external field for from function global handler hidden if init inline local memvar message method object operator override parameters pragma private procedure protected public readonly recover request return sequence shared static struct switch try type typedef var virtual while with
When UE displays a .prg file containing all of the above C3 words, the following words are not highlighted: begin break case catch class classdata classmethod data delegate destructor do each enable end endclass error exit exported extend external function global handler hidden if init inline local memvar message method object operator override parameters pragma private procedure protected public sequence shared static struct switch try type typedef var virtual while with
And one more example: The C4 wordlist is:
accept all alternate append autopen autorder autoshare average background backgroundtick bell blank box cancel century checkbox clear close
color commit confirm console continue copy count create cursor date dbflockscheme decimals default delete deleted delimiters descending device dircase
dirseparator eject eol epoch erase errorlog errorloop escape eventmask exact exclusive extended file filecase filter find fixed
gets go hardcommit index input intensity join key keyboard list listbox locate log margin memoblock memory menu optimize order
pack path printer prompt pushbutton quit radiogroup read recall reindex relation release rename replace restore run save say scope
scopebottom scopetop scoreboard screen seek select set skip softseek sort store strictread structure style sum tag tasks text time to
total trace typeahead unique unlock update use videomode wait wrap zap
When UE displays a file containing all of the above C4 words, the following words are not highlighted:
background backgroundtick bell blank box cancel century checkbox clear close date dbflockscheme decimals default delete deleted delimiters descending device dircase
eject eol epoch erase errorlog errorloop escape eventmask exact exclusive extended file filecase filter find fixed
hardcommit index input intensity join key keyboard list listbox locate log margin memoblock memory menu optimize order
quit radiogroup read recall reindex relation release rename replace restore run save say scope
tag tasks text time to
unique unlock update use videomode wait wrap zap
2. Code folding not working consistently.
Code folding works consistently for the following constructs:
Code: Select all
// example 1
function <function_name>
..
return ( <return_value> )
// example 2
do while <condition>
..
enddo
// example 3
if <condition>
..
endif
Code: Select all
// example 4
init procedure <procedure_name>
..
return
// example 5
class <class_name>
..
endclass
// example 6
method <method_name>
..
return
// example 7
static procedure <procedure_name>
..
return
Also, I'd like to be able to place the cursor on a line containing an #include statement, eg. #include 'Stdio.ch' and get UE to locate and open the #include file by pressing a hotkey.
These problems I'm experiencing are probably the result of some dumb mistake of mine in my wordfile (included below), so if you have any pointers or suggestions I'd be thankful to hear them.
Any pointers or suggestions would be appreciated.
Thanks
rl
Here is the complete contents of my wordfile (xHarbour.uew) between the ('- - - - - cut here - - - - -' lines)
- - - - - cut here - - - - -
/L20"Clipper/xHarbour" Line Comment = // Nocase Line Comment Alt = * Block Comment On = /* Block Comment Off = */ Escape Char = \ String Chars = "' File Extensions = PRG CH
/Colors = 12632256,12632256,8421376,8421504,255,
/Colors Back = 0,0,16777215,16777215,16777215,
/Colors Auto Back = 0,1,1,1,1,
/Font Style = 0,0,0,0,0,
Colors Back = 0,0,16777215,16777215,16777215,
Font Style = 0,0,0,0,0,
Colors Back = 0,0,16777215,16777215,16777215,
Font Style = 0,0,0,0,0,
Colors Back = 0,0,16777215,16777215,16777215,
Font Style = 0,0,0,0,0,
Colors Back = 0,0,16777215,16777215,16777215,
Font Style = 0,0,0,0,0,
/Delimiters = ~!@%^&*()-+=|\/{}[]:;"'<> , .?
/Function String 1 = "%[CLASS]+CLASS"
/Function String 2 = "%[METHOD]+METHOD"
/Function String 3 = "%[PROCEDURE]+PROCEDURE"
/Function String 4 = "%[FUNCTION]+FUNCTION"
/Ignore Strings SOL = "*" "//" "/*" "*/" "#"
/Open Fold Strings = "{" "class" "method" "procedure" "exit procedure" "init procedure" "function" "if" "do case" "do while" "for"
/Close Fold Strings = "}" "endclass" "return" "return" "return" "return" "return" "endif" "endcase" "enddo" "next"
/C1 Colors = 16711680 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
hbcheckbox hblistbox hbobject hbpersistent hbpushbutton hbradiobutton hbradiogroup hbscrollbar menuitem popup
tbcolumn tbrowse thtmldocument thtmliterator thtmliteratorregex thtmliteratorscan thtmlnode tipclient tipclientftp
tipclienthttp tipclientpop tipclientsmtp tipmail topbarmenu tstream tstreamfilereader tstreamfilewriter turl
txmldocument txmliterator txmliteratorregex txmliteratorscan txmlnode win32bmp win32prn
/C2 Colors = 255 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
#command #define #error #if #ifdef #ifndef #include #pragma #stdout #translate #uncommand #undef #untranslate #xcommand #xtranslate #xuncommand #xuntranslate
/C3 Colors = 33023 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
access announce assign associate begin break case catch classdata classmethod data delegate destructor do each enable end endclass error exit exported extend external
field for from global handler hidden if init inline local memvar message object operator override parameters pragma private protected public
readonly recover request return sequence shared static struct switch try type typedef var virtual while with
/C4 Colors = 32768 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
accept all alternate append autopen autorder autoshare average background backgroundtick bell blank box cancel century checkbox clear close
color commit confirm console continue copy count create cursor date dbflockscheme decimals default delete deleted delimiters descending device dircase
dirseparator eject eol epoch erase errorlog errorloop escape eventmask exact exclusive extended file filecase filter find fixed
gets go hardcommit index input intensity join key keyboard list listbox locate log margin memoblock memory menu optimize order
pack path printer prompt pushbutton quit radiogroup read recall reindex relation release rename replace restore run save say scope
scopebottom scopetop scoreboard screen seek select set skip softseek sort store strictread structure style sum tag tasks text time to
total trace typeahead unique unlock update use videomode wait wrap zap
- - - - - cut here - - - - -