JFlex Support
for IntelliJ IDEA

Compatible with  IntelliJ IDEA
18 505
Enables JFlex support in IntelliJ IDEA.

Download plugin

Recent change notes

1.5.1 - Updated for IDEA 11, components refactored to extensions. (Jan Dolecek)
1.5.0 - Updated for IDEA 10, not using jflex.bat or jflex.sh anymore, executing JFlex.Main directly instead.
1.4.1 - Added support for disable compiler
1.4.0 - Updated for IDEA 9.
1.3.0 - Updated for IDEA 8.
1.2.0 - Embedded Java code support, "Find Usages" for macroses and states, flex files can be excluded from compile, "File not generated" bug fixed, settings GUI fixed.
Unfortunately lexer class generation is not compatible with Idea 13. The tutorial: http://confluence.jetbrains.com/display/IntelliJIDEA/Lexer+and+Parser+Definition says we have to disable the option "Settings → Compiler → Use external build", in order to make code generation work. But this option is no longer present in Idea 13. Can you guys fix this?
Please note, that currently (1.5.1) external builds (Settings -> Compiler -> Use external build) are not supported by jflex source generator. Disable external builds as a workaround.
Is there any documentation besides the plugin options and the source code? The full documentation URL has the single line "Plugin for IntelliJ IDEA to enables JFlex support."

I'm looking for basic information like where are the java files generated. Can't seem to find them, but I'm unsure if I compile the flex file successfully. I just do right-click compile on the flex file, right? Or are the class generated from the flex file when I make the project?

Thank you kindly
I'm getting message "JFlex home path is invalid" because there are not any folder like "..\IntelliJ IDEA Community Edition 11.0.2\tools\jflex" after instalation plugin from repository. What is wrong?
Seems great, but I'm not able to compile a .flex file in IDEA 11 using this plugin :( Perhaps broken in the newest IDEA?
Plugin is nice, but there are some problems while editing large .flex files. It moves cursor around the code line randomly.
Please, install latest 10.0.2 EAP. You can download it here http://confluence.jetbrains.net/display/IDEADEV/IDEA+X+EAP
I'm on 10.0.1, but it doesn't seem to work (Idea complains that the plugin is incompatible in the Plugins->Installed tab? Any ideas?
The code has been updated for IDEA 10.
Now it should handle IDEA's source repository jflex correctly. It used jflex.bat and jflex.sh files, that are not great any more as jflex.bat must be edited to use proper JAVA_HOME, and jflex.sh is now jflex (extension removed). I decided to call JFlex.Main directly, in fact this is the only thing that these tiny shell scripts do.
This plugin doesn't work for on Macs or Linux for a number of reasons:
1. It expects the jflex script to be called jflex.sh when its actually called just 'jflex'. This results in a correct home directory being rejected.
2. The call to runtime.exec uses a single string which doesn't work reliably in mac world - you need the string array version.
3. To successfully invoke the script needs to fork a shell (/bin/bash -c) which it doesn't.
4. Finally it needs to prefix the script name with "./" to find it in the home/bin directory.
Once you fix all that it works ok when you build the project.
Note that if you download the community source you get a patched version of JFlex that uses CharSequence rather than char[] - use this for language plugins.
Don\'t know what\'s wrong, but the plugin always claims that the JFlex home path is invalid, although I\'ve given him already the path to my JFlex installation.

Is there anybody using this plugin?
If yes, how did you do that without any documentation?
i cannot figure out how this plugin works. i assume it is suppose to generate a class from my.flex file but if it does i have no idea where it puts it. there is no documentation. very disappointing.
Can't get it to work for 8.0...
Great plugin. Don't know why it was not rated yet. Guess not so many people are into developing language parsers or similar stuff. But if, than this is the way to go..
This plugin actualy works with 7.0
Please  sign in  to leave a comment.