• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

JAST 1.1.1

JAST-Release-1.1.0-THW-Header.jpg

Release1.1.0-THW-Footer.jpg

DemoGif1.1.0.gif


Source: zach-cloud/JAST

To use tool: Download the JAST .zip file, extract to a location, and execute "run.sh". You can also use "run-cli.sh" if you prefer to use the tool as a command-line (most users won't).

Open source credits:
- JMPQ3 ( inwc3/JMPQ3 ) - MPQ Extraction
- RichTextFX ( FXMisc/RichTextFX ) - JASS Code Editor area
- Apache Commons
- PJASS (Syntax Checker)
Contents

JAST 1.1.1 (Binary)

Cool idea!

It would be cool if JassHelper with vJASS is included to compile to jass. Also, because of this..
  • vjass keywords like this, thistype, struct without don't get highlighted
  • multiline comments are wrongly highlighted
Syntax checking for vjass threw a null pointer exception. I tried then with simple jass
JASS:
function test takes nothing returns nothing
endfunction
but it threw a nullpointer exception, too. (without further details)

Btw, for windows users, in case you wonder why you can't start it.. just change the file exctension from the "run.sh" to "run.bat" and then one can run it.
 
Level 4
Joined
May 26, 2020
Messages
11
Hey @IcemanBo thanks for the reply! This tool was made to parse full map scripts (war3map.j) and so it expects a globals section to exist. This section can be empty. For example if you add:
JASS:
globals
endglobals
before your code and then try syntax checking, it should work. This applies for basically all operations it can do.

Giving a NullPointer exception definitely isn't a friendly way of handling that, and I should really fix it so that it doesn't expect a globals section. Coming soon! Good point about Windows users; I myself am on Windows 10 but I can run it as a .sh file, but I also have some dev tools installed so maybe one of those knows how to interpret .sh files. Maybe I'll make a .bat and a .sh from now on.

@loktar Thanks for the feedback! I definitely agree that VJass is critical and I'm hoping to make it as soon as possible! I'll also look into JASSHelper. That is a great idea.

Also it looks like my posts need to be approved by a moderator; any way that restriction could be removed?
 
Last edited:

eejin

Tool Moderator
Level 12
Joined
Mar 6, 2017
Messages
221
The function to open .w3x files doesn't seem to work. I've tried opening multiple files ranging from default Blizzard maps, pre Reforged map formats and post Reforged map formats (all unprotected). It does say that the file has loaded succesfully in the status bar. If this issue is resolved I will mark it as Approved.

Some other things I noticed:
- Line number contrast is very low in all themes
upload_2020-5-29_13-38-9.png


- Scroll bar is very small and contrast is very low
upload_2020-5-29_13-38-58.png

In the small image it is decently visible as the image is very small so there is not much space to search, but when I fullscreen the application it is barely visible.

- Select all (CTRL A) has a very harsh color with low contrast to the selected text.
upload_2020-5-29_13-41-43.png

Consider copying the Visual Studio color scheme (also note that empty space is not colored blue)
upload_2020-5-29_13-44-11.png

It also moves you to the end of the file instead of remaining at the current position. This might be a matter of preference though as different editors have different behaviour

- The open file dialog does remember where you last opened a file across sessions, but not within a session.

1. Open file dialog and open a file
2. Open file dialog again and note that it did not remember the last location
3. Close and reopen program
4. Open file dialog and note that it is now located at where you selected the file in step 1

- Scrolling rapidly through the file by means of the scroll bar of pg dwn/pg up is very slow and stuttery
- Program does not seem to remember the window geometry from your last session which would be a nice addition
 

Attachments

  • upload_2020-5-29_13-42-12.png
    upload_2020-5-29_13-42-12.png
    26.3 KB · Views: 177
  • upload_2020-5-29_13-43-49.png
    upload_2020-5-29_13-43-49.png
    26.7 KB · Views: 187
Level 4
Joined
May 26, 2020
Messages
11
Hey @eejin , thanks for the review and great points! I definitely agree with what you say.

The w3x map opening does work, however it's a little un-intuitive in its current state. Do the following:
1) In the Open menu, select a .w3x map
2) In the Utility menu, select "Extract MPQ" (option 2)
This will extract critical map files into the "tempFiles" directory of JAST.
I definitely think this can be improved though. Sorry for not documenting this! I think it should extract automatically when you open a .w3x.
You can do a similar thing for .w3a files and such to find names of objects (though this one is a little more unreliable at the current time).

The line number coloring was pulled from existing IDEs. Specifically, the "Dark Theme" coloring is from IntelliJ's dark theme. The Jasscraft coloring is from Jasscraft. The light theme is from IntelliJ's light theme. I can increase the contrast here but what I've found is that with line numbers, this can be somewhat distracting. I think the real problem is that line number color does not change on the line that is currently selected.

Definitely agree that select all doesn't look great right now. Not sure if there's much I can do about that, since it's native to Java's text area, but I will look into that.

You are absolutely correct about the open dialog and that is pretty annoying. I'll fix it.

I think that the scrolling is due to the syntax highlighting. I've never used pg up/down myself, I will check it out.

By window geometry, do you mean the size of the window? I can make it remember that.
 
Level 7
Joined
Jun 5, 2018
Messages
180
@eejin posted some pertinent points! Here, I'd also like to add some points:
- Could you please release a Windows OS version? Someone like me doesn't want to intall JRE.
- Using Tool Bar will make your tool beautiful and convenient to use.
- Add an icon for your awesome tool, please.
 

eejin

Tool Moderator
Level 12
Joined
Mar 6, 2017
Messages
221
Ok I approved the tool after seeing that .w3x opening does indeed work. Maybe you could open a little explorer window to show the contents of the (autoextracted) MPQ à la the Visual Studio explorer window for folder based project:
upload_2020-5-30_13-35-55.png


As for contrast. Here is a screenshot.
upload_2020-5-30_13-27-24.png

At a comfortable distance from my monitor ~40-50 cm I find it hard to see the line numbers, scroll bar position and caret position.

I find that Visual Studio, Sublime Text and Visual Studio Code all have very nice readable themes so maybe you could add one of them as a theme at least?
upload_2020-5-30_13-33-30.png
 

Attachments

  • upload_2020-5-30_13-32-21.png
    upload_2020-5-30_13-32-21.png
    41.4 KB · Views: 197
Level 4
Joined
May 26, 2020
Messages
11
I see your point. I will adjust the line number coloring when I release next ver, and also make it simpler to open MPQs. I was also thinking of making the themes fully customizable by including them as resources (they are simply a .css file) which users can modify. Though this might take a little bit of rework.

Thanks so much for approving! An explorer for the extracted files is a great idea; I will add that to the backlog.

Unfortunately having Java installed is a strict requirement of running this program. It's not possible to compile a Java program in a way that you can run it without Java installed on any OS. Excellent point that the tool definitely needs an icon. I'll think about it; don't know what to make the icon right now. Could you clarify what you mean by tool bar?
 
Level 7
Joined
Jun 5, 2018
Messages
180
Excellent point that the tool definitely needs an icon. I'll think about it; don't know what to make the icon right now. Could you clarify what you mean by tool bar?
I recommend you to use the format conversion softwares like icofx and Photoshop to make an icon for your awesome tool.
Tool bar is a row of buttons with icons, aiming to provide better user experience for softwares. You can refer to MFC CToolBar class for more information. Here, I also give you an example using world editor:
无标题.png
 
Level 4
Joined
May 26, 2020
Messages
11
New version.

Changelog:
If you resize the window, it will remember the size desired and start with that size.
Fixed a bug with the file choosers not remembering your directory per session (note: the open and save dialogs are remembered separately, this is intentional)
Contrast for the line number font has been increased for dark theme/jasscraft theme
MPQs will auto-extract upon being opened now (no extra click required) to the "tempFiles" directory.
Experimental VJASS support added. The system will recognize "library"
Specifically, JAST will now recognize "library", "scope", "struct", and "method" declarations.
JASSHelper is packaged with the application rather than PJASS. Syntax check will execute JASSHelper.

I'll work on adding the other suggestions
 
Level 25
Joined
Feb 2, 2006
Messages
1,669
Hi, interesting tool. What is the advantage over using A new TESH Syntax Highlighter for Warcraft 3 ?
I have loaded this file here: wowr/Systems.j at master · tdauth/wowr

I would prefer Ctrl+Space for the auto completion and an automatic tooltip with a selection box like with TESH. You can use some timeout until it pops up.
The auto completion is a bit weird like with TESH. After typing function it suggests some natives instead of letting me writing a name.
After writing the name of the function it still suggests natives instead of "takes".
It would be awesome to have some JASS/vJass editor which can handle the context.

It's a bit slow and when I scroll up, the highlighting will be rendered but is not prerendered.
Folding of blocks is not possible.

It does not highlight the latest natives like BlzTriggerRegisterFrameEvent.
 
Top