Skip to content

reqT/reqT-syntax

Repository files navigation

reqT-syntax

Syntax highlighting lib for reqT based on RSyntaxTextArea and JFlex. Many thanks to those excellent projects! The repo is used to build a customized rsyntaxtextarea.jar to be used as a lib for reqT.

How to build

The build process is a bit tricky as it involves manual patching of a generated lexer source file. It involves updating the grammar (if desired), then generating the lexer using jflex, then building the rsyntaxttextarea.jar, then putting that jar in the reqT repo and rebuild reqT. Detailed instructions follows.

Prerequisites

Install these applications first if you don't have them already:

  • Java JDK to compile the code
  • JFlex to generate token generator
  • Apache Ant to build the project

Steps

  1. If you have changed the metamodel of reqT inside reqT, regenerate the reqT-flex-clauses.txt by using the -f parameter to reqt with the command java -jar reqT.jar -f and a new file will be written.

  2. Insert the new clauses from the reqT-flex-clause.txt file in the ReqTTokenGenerator.flex file (look for comment /* reqT BEGIN */ in the file to find what to replace).

  3. Run jflex ReqTTokenMaker.flex to generate a new ReqTTokenMaker.java

  4. Patch by hand the generated ReqTTokenGenerator.java file according to the instructions in how-to-patch.txt

  5. Put the patched ReqTTokenGenerator.java in this dir by replacing the old one: src\org\fife\ui\rsyntaxtextarea\modes Copy-replace in your desktop or use commands in terminal similar to:

     rm src/org/fife/ui/rsyntaxtextarea/modes/ReqTTokenMaker.java
     cp ReqTTokenMaker.java src/org/fife/ui/rsyntaxtextarea/modes/.
    
  6. Run ant to build a new rsyntaxtextarea.jar (ignore the 4 deprecation warnings)

  7. Put the dist/rsyntaxtextarea.jar file in your reqT repo under reqT/lib

  8. Run the makebin script and then the build script in the main reqT repo

About

Syntax highlighting module for reqT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages