bioSyntax support for ImageJ 1.x macro language



Hey; I’m a dev for bioSyntax and I’m looking to make syntax highlighting definitions for ImageJ macro language.

Are there any additional language definitions which are not included in in the Reference Guide?

Syntax highlighting for ImageJ1 macros

Dear @ababaian,

as far as I know, there is no proper definition apart from the reference guide. And even with the reference guide, I am not entirely sure if it is complete. In doubt, you’d have to look at the implementation and or ask for help here (that’s why I have split your question into a new topic).

It might be worth to take a look at @Kota’s implementation for Notepad++:



I think the best would be to convert the source code in GitHub for the latest listing.


edit: I replaced the above URL. Correct source is ij.macro.Functions, not Constants.

The IJ macro below will print all macro functions based on the website index, which I have been using for listing macro functions.

str = File.openUrlAsString("");
lineA = split(str, "\n");
all = ""
for (i=0; i<lineA.length; i++){
    if (startsWith(lineA[i], "<b>")){
        endindex = indexOf(lineA[i], "</b>");
        comm = substring(lineA[i], 3, endindex);
        if (indexOf(comm, "(") > 0)
            firstaftpare = substring(comm, indexOf(comm, "(")+1, indexOf(comm, "(")+2);
            //if (firstaftpare != "\""){
                comm = substring(comm, 0, indexOf(comm, "("));
        print(comm );
        all += comm + " ";


@haesleinhuepf just completed the code completion for the ImageJ macro language. It uses but also adds a few things on top.

There is also syntax highlighting for ImageJ macro as part of the SciJava script editor. (This specific highlighter is slated to be moved to imagej/imagej-legacy, but for now is still part of scijava/script-editor.)