Haxe Toolkit plugin v1.3 for IntelliJ IDEA, Android Studio, and other JetBrains products is now available

[EDIT: Updates for patch release 1.3.1]

Hello folks,

We’ve updated the Haxe Toolkit plugin for IntelliJ IDEA to work with all versions through 2020.2.1. We’ve also added a ton of other features such as metadata handling, better type checking, ‘final’ support, unparseable code highlighting, and a host of other useful fixes and additions.

You can pick it up at the usual places:

If you find this product useful, please let us know. You can reply to this announcement!
If you make your living using this plugin, please consider supporting us on Patreon:

If your enterprise uses this product as part of your normal work flow, please contact us (at ) to see how we can improve your development speed by implementing the features that you need every day.


Change notes:

1.3.1 (HaxeFoundation release)

  • Allow both 'inline' and 'extern' to exist on functions and vars.
  • Correctly resolve when 'using' static extensions such as StringTools.
  • Correctly resolve expressions inside of parenthesis.

1.3 (HaxeFoundation release)

  • IDEA Versions 2020.2, 2020.1 and 2019.3 support.
  • Add fine-grained control of the semantic annotator to the Settings panel. (File->Settings->Editor->Inspections->Haxe)
  • Rewrite metadata handling:
    • Allow metadata at all positions.
    • Validate object syntax in compile-time metadata.
    • Parse code in run-time metadata, and highlight errors.
    • Check @forward(<names>) for existing method names.
    • Allow completion within metadata parens.
    • Add UI to allow reformatting and color options.
  • Allow immediate array accesses on literal arrays. (e.g. var a=["1","2"][1];)
  • Fix several issues with type checking, particularly when generics are involved.
  • Allow non-standard orderings of class and method modifiers (e.g. final, private, extern) and warn on duplicates.
  • Recover from circular class dependencies.
  • Better error messages for a number of parsing errors.
  • Fix not finding packages which begin with and underscore. (Issue 941)
  • Handle function-level type parameters during semantic checks. (Issue 973)
  • Don't use class type parameters when resolving static function parameters.
  • Better handling of function types an mismatched assignments. (Issues 943, 773)
  • Fix crash when reading libraries if the library name was empty. (Issue 949)
  • Haxe 4: Allow dotted identifiers in conditional compilation.
  • Haxe 4: Allow dotted meta names.
  • Haxe 4: Allow 'final' on var declarations in switch cases.
  • Mark attempts to write to 'final' variables.
  • Handle Map types as extended map types. (e.g. IntMap, StringMap, etc.)
  • Better constant detection and handling of default parameters for methods.
    • Detect function type constants and report accordingly.
    • Detect initialization calculations containing only constants as constant.
    • Detect several standard library functions as returning constants when their arguments are constant. (e.g."1"))
    • Detect identifiers/constants referencing other constants as still constant.
    • Detect enums without parameters as constants.
    • Better flagging of errors when default parameters are not constants.
  • Much better handling of generics throughout, including type error checking code.
  • Use type parameters from left-hand (e.g. left.right) expressions when resolving right-hand fields and method return types.
  • Color unparseable data when typing; shows developers where functionality is limited while code is invalid.
  • Better handling/recovery of errors in String Interpolation. (e.g. '${expr}')
  • Allow/disallow variable declarations in various places.
  • Require semi-colon on return statements in non-lambda bodies.
  • Better recovery on class parsing errors.
  • Fix PsiInvalidElementAccessExceptions (Issue #953)
  • Upgrade smart-enter statement fixer for 'if' statements.
  • Better handling of missing bodies when using smart-enter.
  • Properly handle generics on typedefs over generic types.
  • Properly unify EnumValue with enum values.
  • Fix indenting for map comprehensions.
  • Fix and update inspection descriptions in settings dialog.
  • Implement "Implement methods" for missing interface functions.
  • Fix the case where generic parameters used in superclasses were not being correctly translated through the type hierarchy when resolving (or were resolving to the wrong type).

Oh my dear! This is a God-send!!! Can’t describe what a good news this is! I’ve just finished adapting my project to VS Code simply because your plugin was a bit… well… acting up on me (“IDE encountered an error” + some files completely dead & without any completion / refactoring / navigation support).

All the problems are now gone! :). And, to top it off, the Haxe file icon is now correctly changing its color to reflect the pinned state of the tab :D. Superb work!

I do plan to keep working with VS Code as well, due to a “live reload” JavaScript debug workflow I’ve set up there with help from @Leo . But refactoring is still missing in VS Code. So far, nothing beats IJ’s refactoring capabilities & smarts. I’m so happy you’ve put this one out @ebishton :slight_smile:

1 Like

@Kyliathy Sometimes when you quit IntelliJ IDEA – particularly when in the middle of indexing the project sources – the indices become corrupt and that affects the IDE in exactly the way you state (and it’s not a plugin-specific problem). When you see this, the solution is to use the “File->Invalidate Caches/Restart” menu item. Indices will be rebuilt upon restarting and life should get better.

Thanks for the kind words!!

Hello! Just tried this out - so far so good! One thing I’ve noticed is I can’t seem to set up any breakpoints for debugging. Is debugging supported yet?

Debugging of Hxcpp targets works, if you install the Protocol_1.1 branch of the hxcpp haxelib (from github, the instructions are in the Unfortunately, there was a change in Haxe 4.1 that requires an update to the protocol branch, and/or a fix to the plugin, neither of which has happened yet, so hxcpp debugging works with 4.0.x and earlier versions of Haxe.

Debugging of Flash (AIR) targets works once you install the Flash/Flex support plugin.

Other targets do not have debugging support at this time.

It shows a lot of code as “unparseable data”, although the project is compiled by Haxe correctly. Here is a screenshot, “unparseable data” is grey:

Or here is what happened after I added “if-throw” - everything below turned red and even when I remove the “if-throw” - it remains red! What could that be, I wonder…

@Shalmu Thanks for trying out the plugin, and for caring enough to make a bug report.

It is easier for us to track the bugs, you can put more detail in them, and you will get more visibility with the team if you file issues using the bug tracker on github: GitHub - HaxeFoundation/intellij-haxe: Haxe plugin for IntelliJ Platform based IDEs (IDEA, Android-Studio). When you file them, please paste code examples as well, so that we can build tests quickly.

As far as these specific issues go, we are regularly tuning the parser when we find new issues. I’m not sure whether this case of unparsable code has been fixed at this point. For the red screen, that is an issue I don’t recognize, so it’s possible that we’ve never seen it before.