1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

A new TESH Syntax Highlighter for Warcraft 3

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

  1. Glowackos

    Glowackos

    Joined:
    Feb 28, 2011
    Messages:
    15
    Resources:
    0
    Resources:
    0
    Bug report. I've hit this several times now.

    I edit a trigger. ctrl+s to save. Map comes up with an error about some missing library. I navigate to a different trigger and then click back to the one I had been editing earlier and discover that everything is gone, replaced by this small snippet of corruption:

    Corrupted TESH.PNG

    So the error about the missing library is because my several hundred or so lines of code in that trigger have disappeared. Worst is that this gets saved. Luckily I version control my project well, but this could be pretty bad for those who don't make backups often.

    I haven't been able to pin down how to reproduce this reliably yet, but will provide details if/when I figure it out. It's happened twice to me today in the span of an hour, and a few more times in the past few weeks. The only additional info I can give at this stage is that if I try to ctrl+z on the trigger after this has happened, WE crashes.



    e: K, so it has nothing to do with saving. Seems like in some cases, if i swap to another trigger and swap back, the whole trigger is corrupted. Something to do with saving/loading the text from memory. One time this happened, it pulled through some random map constants through. I should've taken a screenshot, but didn't. Will do next time I see it.

    Once the trigger is corrupted, trying to paste the original code back in it doesn't stick - swapping to another trigger and back, reverts to corruptedness. So far the best solution I've found is to delete the trigger, create a new one and paste the old code there. So, I'm inclined to say it's something to do with the metadata you save for that trigger, be it clipboard history, scrollposition, or something else. Something is going awry. Hopefully this'll be enough to help pin it down.
     
    Last edited: Oct 23, 2016
  2. Sounds very fatal, I'd recommend you use TESH that ships with JNGP until this receives a patch (implying it will).

    Are you referring to JassHelper's back-up feature, or?
     
  3. Glowackos

    Glowackos

    Joined:
    Feb 28, 2011
    Messages:
    15
    Resources:
    0
    Resources:
    0
    Nah, more sophisticated :)

    I wrote a GMSI script to extract all trigger data out of the map, which i then version with Git.
     
  4. Oh, I see.

    I like global management systems incorporated too.
     
  5. Glowackos

    Glowackos

    Joined:
    Feb 28, 2011
    Messages:
    15
    Resources:
    0
    Resources:
    0
  6. That's actually nice :D

    Thanks for the link
     
  7. MindWorX

    MindWorX

    Joined:
    Aug 3, 2004
    Messages:
    690
    Resources:
    5
    Tools:
    1
    Tutorials:
    4
    Resources:
    5
    Any update on the input latency brought up by KILLCIDE?
     
  8. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    961
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Yes, the problem is already fixed (however, not released yet). It is related to the inter-process communication of tesh and WE...

    In the new version, both tesh and WE run in the same process which makes things a lot easier and faster.

    I hope I will be able to release a new version during the upcoming public holidays...
     
  9. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,496
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    That's great to hear looking_for_help! Any news on when you plan on letting users configure the highlighting?
     
  10. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    961
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Currently working on this... I'm really not happy with the amount of time this is already taking, but fixing one problem often creates 5 new problems...

    To give a quick insight on the current state what has been already done/fixed:

    • Trigger editor delay is fixed (this one was hard)
    • Trigger corruption is fixed
    • New or custom keywords (like from ZinC and so on) can be added to a database conveniently
    • Search/Replace, Function list and menu items already reworked and functional
    • Lexer only scans text affected by modifications (this is a major performance improvement since Scintilla wasn't designed to be able to do this for context sensitive Code)
    • Lots of small new features (will be listed on release)
    Whats open is to make stuff like colors configurable, add calltips and some error handling for file I/O...
     
    Last edited: Dec 18, 2016
  11. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,496
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Awesome! I'm sure it's safe to say that people would rather wait a long time for a new, updated TESH than having an extremely buggy one released.

    Also, the images you have linked in your first post are all broken.
     
  12. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    961
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Exactly.

    Yes, I will make some new images.
     
  13. MindWorX

    MindWorX

    Joined:
    Aug 3, 2004
    Messages:
    690
    Resources:
    5
    Tools:
    1
    Tutorials:
    4
    Resources:
    5
    Got an ETA on just the delay fix? I'm currently working on the JNGP replacement, and it appears TESH2 affects the entire editor. Even making new objects is slowed down. I'd love to include your updated version, but it is currently a pain to use.
     
  14. LeP

    LeP

    Joined:
    Feb 13, 2008
    Messages:
    449
    Resources:
    0
    Resources:
    0
    Any thoughts on integrating jassdb?
     
  15. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    961
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Can't really give an estimate, sorry... The thing is I had to rewrite (almost) everything to fix the problem, so I'm currently just re-implementing features which I can't just copy/paste due to different meachnisms.

    I will use the upcoming public holidays but I can't promise that it will be finished very soon (though I will try).

    Nice project, didn't know this before.

    Function list descriptions will be configurable from outside (via a database), so you will be able to integrate this pretty easy (and then probably upload the modifed db here such that everyone can use it).
     
  16. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    961
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Update to version 0.9

    Yes, its finally done. It took much longer than initially planned, but I think it was worth it. This is a complete rewrite of the TESH 2.0, basically started from scratch. First lets start with a change list (probably not all changes are included here since there are so many):

    • 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 about 40 did-you-know messages
    • Improved performance
    • Fixed various bugs

    In the attached screenshot you can see some of the new styling which is now possible with the new TESH:

    [​IMG]

    Or some customized dark styling (just one example):

    [​IMG]


    And attached some impressions from the new options dialog with some short explanations.

    General options

    Here you can setup some general options. For example you can enable/disable warnings here, configure if you want to see margins like line numbers and/or folding flags, if you want to have calltips, a vertical line and so on.

    [​IMG]


    Autocomplete options

    Here you can configure the behavior of the autocomplete list. You can for example specify a minimum number of characters before the list pops up, how many items should be listed, that enter always closes the list and adds a newline or that the list is closed on the first full match. Also case sensitivity or automatically added braces when accepting items from the autocomplete list can be turned on and off here.

    [​IMG]


    Style options

    Basically every style available in the TESH can be configured here. There are almost the double number of configurable styles compared to the old TESH, you can even customize things like calltip, indicator or AI function styles. Numbers are now seperated into three categories (integer, hex and float) and can be styled differently. Block comments are highlighted correctly even when nested and you can specify different colors for nesting levels up to level 2. URL Hyperlinks can be styled as well and are CTRL-Click sensitive, just as standard hotspots.

    [​IMG]


    Additionally in the following screenshot, there are the new TESH menu items shown. Notice that the template menu items can be configured individually by just placing the templates in a .txt or a .j file in the tesh/templates folder (or subfolders therein).

    New menu items

    Here the new menu entries are shown. User includes are loaded from the files in tesh/includes folder. Trigger templates are loaded from tesh/templates folder. The "Load Template" button loads the content of the file from tesh/templates/standard.txt. By changing the content of this file, you can also change the template that is loaded when clicking on this button. If no such file exists, a default template is loaded.

    [​IMG]


    I hope you like it.
     
    Last edited: Mar 27, 2017
  17. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,667
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Looks really great, I'll try it out soon.
     
  18. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,181
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    This is very impressive!
     
  19. DD_legionTN

    DD_legionTN

    Joined:
    Dec 19, 2012
    Messages:
    410
    Resources:
    0
    Resources:
    0
    This going to make all of our mapping life much more easier then before since the latency bug was bugging us so hard. And I like the improvement of tesh functions too, gonna improve much for my scripting life in WE!
     
  20. moyackx

    moyackx

    Joined:
    Feb 15, 2006
    Messages:
    790
    Resources:
    7
    Maps:
    4
    Spells:
    2
    Tutorials:
    1
    Resources:
    7
    It looks like pure sex, almost pornographic vJASS coding. I'll try it soon and, of course, it will be added to the JNGP :D