A new TESH Syntax Highlighter for Warcraft 3

Discussion in 'Warcraft Editing Tools' started by looking_for_help, Dec 28, 2013.

  1. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    950
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    TESH 2.0 - A new Trigger Editor Script Highlighter for Warcraft 3
    by looking_for_help


    1. Introduction

    It's been a long time since the first Trigger Editor Script Highlighter (TESH) was released by SFilip in 2007. His outstanding work was improved several times by others like Zoxc, Van Damm and Artificial, as well as by the developers of the Horus extension. The TESH adds some very nice Syntax Highlighting and Code-Completion functionality to the Warcraft 3 Editor and made coding in JASS and vJASS much more comfortable and nicer. However, after many years of extensive use, there are still some problems or things that could be solved nicer in order to make vJASS coding even more comfortable. As the original TESH is written in Delphi which is not free anymore and the source code is hardly commented at all, it was not possbile to build up such an extension on the original TESH source. For this reason, and because some of the features I had in mind required a modification of the Scintilla Source-Code itself, I decided to rewrite everything in C++ and restart with it completely from the scratch.


    2. Installation and Requirements

    To install the new TESH to your Warcrat 3 Trigger Editor, just download the attached zip-file, unzip it and put the folder in your jassnewgenpack5d installation folder:

    1. Download the attached zip-file.
    2. Unzip it using 7zip for example.
    3. Place it in your jassnewgenpack5d folder replacing the former one.
    4. Make sure you don't use any other version of the SciLexer.dll and Hook.dll than delivered with this package, otherwise you will get an error message.


    3. New Functionality

    There is tons of new functionality, both compared to the first TESH and to the older versions of TESH 2.0 (before version 0.9).

    Many of the features are already listed in the Version 0.9 changelog and the Version 0.9.1 changelog. To list some here:

    • Fixed the input latency bug in the World Editor
    • Fixed the trigger corruption bug.
    • Added options dialog to allow user customization of styles and general options
    • Almost double styles configurable compared to the old TESH
    • Various options allow you to configure autocomplete behavior as well
    • Different general options allow you for example to enable/disable warnings, use reduced folding or enable/disable auto-braces, vertical line, line numbers and many more
    • Autocomplete window can now be configured to dynamically grow/shrink while typing and only listing matching items
    • Escape characters are now highlighted within strings
    • Int, Hex and Float numbers can now be styled differently
    • Nested block-comments are now highlighted correctly depending on their nesting level
    • Nesting levels can have a different style as well in block-comments (up to a nest level of 2)
    • URL hyperlinks in strings and comments are now highlighted and are CTRL-Click sensitive
    • Braces have now a primary and a secondary style for highlighting matches
    • User includes (functions) can be added to the highlighter by customized text files (like in the old TESH)
    • User includes can be reloaded and removed without the need to restart the editor
    • Function list also adds user includes
    • Function list now distinguishes between (normal) constants and events
    • Trigger templates can now be configured (both the button and the menu entries)
    • Users can build their own structure for trigger templates which is updated on the fly in the TESH menu
    • Keywords (normal, string and character keywords) are now stored in a SQLite database and can therefore also be modified from outside (including calltips and function list descriptions)
    • Search string for Trigger Editor window can now be configured by the .ini file "trigger_editor_name.ini"
    • New about dialog with more than 40 did-you-know messages
    • Improved performance
    • Fixed various bugs

    And attached some screenshots:

    [​IMG]

    Or some customized dark styling (just one example):

    [​IMG]




    4. Version History

    Attached is the version history of the TESH documented with links to the corresponding update which contain further information.

    Version Histroy

     

    Attached Files:

    Last edited: May 8, 2018
  2. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    950
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
  3. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,500
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Nice!

    Does it autocomplete user-defined variables or functions?
     
  4. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    950
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Not yet, but once all the static functionality is done (everything listed in the Todo-List) this will also get implemented.

    However before I start with the dynamic part, I want to be sure the static part works perfectly, so every feedback is highly appreciated :)
     
  5. edo494

    edo494

    Joined:
    Apr 16, 2012
    Messages:
    3,856
    Resources:
    5
    Spells:
    1
    JASS:
    4
    Resources:
    5
    I was waiting for this moment :D

    looks sweet, even tho some things are not yet implemented, its already almost superior to the current TESH

    btw if you want the full common.j and blizzard.j

    They are taken from Vexorian's JassHelper from JNGP 2.0.6 and are placed in dropbox because they are huge(460 KB, and forum attachments are max 48 KB)
     
  6. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    950
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    A little (and late) christmas present for the community ;)

    Thank you very much, will implement the missing keywords soon.
     
  7. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,297
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    same icons as C# i see. Will this work with JNGP 2.0 too?
     
  8. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    950
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    It should, yes. If you encounter problems with it, please let me know.
     
  9. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,297
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    tried it. It gives the following error when I start WE.
    System Error
    The program could not run because MSVCP120.dll is missing.
     
  10. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,500
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Download VC++ redist, not sure which year.
     
  11. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    950
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Just tried it and for me it works fine... What are your system specifications?

    EDIT:

    Thx, that could be the reason.
     
  12. Cokemonkey11

    Cokemonkey11

    Wurst Reviewer

    Joined:
    May 9, 2006
    Messages:
    3,138
    Resources:
    17
    Maps:
    5
    Spells:
    3
    Tutorials:
    2
    JASS:
    7
    Resources:
    17
    That's a microsoft binary, google for a download link and install it in system32 folder.

    On topic: Congratulations lfh and thanks for another great contribution, I'll install it and let you know if I encounter any errors.

    When you're finished with the static part you should contact (moyack I think?) who is trying to compile JNGP 2.x, I'm sure he'll use this

    Edit: I was also missing the file. I copied it to both system32 and ./jassnewgenpack5d/ to avoid a restart. I'll upload the file I used here
     

    Attached Files:

  13. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    950
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Thank you very much :)
     
  14. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,297
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    I got every version :-/
    2005
    2008
    2010
    2012
    2013

    which one am I missing :-/
     
  15. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    950
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Did you try the one from coke?
     
  16. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,297
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    Just did. Copied to windows\system32 and the newgen folder

    edit: no it didnt
     
  17. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    950
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Ok... so does it work now or not? :D

    EDIT:
    Can you post your system specifications (which operating system etc.) and the exact error message then please?
     
  18. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,297
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    Its in swedish so I can not give it exactly as it is.
    worldedit121.exe - System Error
    The program couldnt start because MSVCR120.dll is missing on the computer. You can try solving this problem by re-installing the program.

    im using windows 7 I can use both 86 and 64 bit programs.
     
  19. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    950
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
  20. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,297
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    I had to install it in 86 bit too to make it work. Now it gives the error when I open the trigger editor.
    But now there is another popup too. That says hook.dll could not be loaded or failed to load
     
    Last edited: Sep 22, 2015