scijava / script-editor-jython

Jython plugin for the SciJava Script Editor
BSD 2-Clause "Simplified" License
2 stars 2 forks source link

NullPointerException parsing Jython scripts with hanging brackets #11

Open artgolden opened 2 years ago

artgolden commented 2 years ago

image

When the script has ) on an empty line. There has to be some specific surrounding, but I am not sure which. Attaching an example file with this behavior.

If you remove bracket on an empty line in this expression:

        logging.info("New file \n%s\n Full path:\n%s\n Original name: \n%s\n Original path: \n%s\n" % (new_file_name,
                                                                                                     os.path.join(
                                                                                                         direction_dirs[embryo_direction - 1], new_file_name),
                                                                                                    file_name,
                                                                                                    file_path)
                    )

the error disappears. nullexception_bracket.txt

acardona commented 2 years ago

Thanks for the explanations. This is an error upstream with RSyntaxArea, should be filed at https://github.com/bobbylight/RSyntaxTextArea