Auto code completion for IJ macro

imagej
macro
auto-completion

#61

Happy to test it @haesleinhuepf, but I’m getting a 404 on that imagej-legacy jar link.


#62

Sorry @dnmason

Could you please try again? I just restored the file:
https://cloud.mpi-cbg.de/index.php/s/RGTopgyYULzciAE

Thanks!
Robert


#63

Seems to work well with a clean install of 2.0.0-rc-68/1.52h

No autocomplete for me on single line comments, multiline comments or end of line comments. Ctrl + space also does nothing once you’re in a comment.

autocomplete

Great job!


#64

I just implemented auto completion and online help for ImageJ macro in the script editor. I think that’s quite useful. Or at least I would have loved to have it when I started with macro programming. It’s basic but functional, as you can see here:


#65

Hey @shontie

which language are you using in the script editor? The auto-completion is supposed to work for IJ macro only for now. IJ macro is not really object oriented and input. is not supposed to open any pulldown as there are no methods for objects…

Furthermore, please take care to use the forum functions properly. Your post looks like @frauzufall wrote it and my words look like yours…

Cheers,
Robert


#66

@shontie

I also just tested the IJ. issue you reported and in my Fiji it works:

Can you maybe explain in more detail what you did?

Cheers,
Robert


#67

Hi @haesleinhuepf!

I’ve been using this new functionality a lot lately, and it really speeds up coding. It also has changed the way new users approach macros.

What I realized today is that the autocompletition doesn’t work when typing nested commands, as in:

Could it be possible to include autocompletition in these cases?

Thanks again for the great work!

Cheers,
Nico


#68

Hey @NicoDF

thanks for the suggestion. Nested auto-completion works if you put a space before the method call:

The bracket is considered as part of a command in order to make this working:

But I see your point. Also the run("... commands often don’t work because they are missing parameters in the auto-complete. Furthermore, apparently there is a bug at the moment, because the quotation mark is not considered as part of the command… I can fix that one soonish.


#69

However, I like user-driven software development and I don’t want to nanny coders. Thus, let’s make a poll. I like polls :wink:

What appears more important to you? Auto-completion in nested calls or auto-completion of the string behind the run method? (Examples shown above)

  • print(getP...
  • run("...

0 voters


#70

Dear *,

we’re considering a little update to the IJ macro auto-completion. However, before we ship it to everyone, it would be nice if some volunteers could just test it in order to ensure that it’s not confusing. The idea is: If you search for bit, the new auto-completion might suggest run("8-bit") as well:

Furthermore, the nested auto-completion discussed above should work now…

To test it, please download imagej-legacy.jar and put it in the jars directory of your Fiji installation. Please remove the other image-legacy.jar in the same folder.

Thanks for the support and let me know what you think!

Cheers,
Robert


#71

I tried but it only appears the first option of bitDepth


#72

Hey @mmvpgs,

are you sure you deleted the old imagej-legacy jar file? Oh and, did you restart Fiji after that?

Thanks for testing!

Cheers,
Robert


#73

Sorry, I put it in the wrong folder. It is working!

Cheers,
Mafalda