org.autoplot.jythonsupport.JythonRefactory

Provide one class that manages backwards compatibility as package names are changed. See https://sourceforge.net/p/autoplot/feature-requests/528/

JythonRefactory( )


fixImports

fixImports( String s ) → String

Convert old names to modern names, for example "org.virbo.autoplot" to "org.autoplot". Autoplot became its own project early on, but the code was slow to update.

Parameters

s - the script

Returns:

the script with new names.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


fixImports

fixImports( String s, String name ) → String

Convert old names to modern names, for example "org.virbo.autoplot" to "org.autoplot". Autoplot became its own project early on, but the code was slow to update.

Parameters

s - the script
name - name for the script, e.g. the filename.

Returns:

the script with new names.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


fixImports

fixImports( java.io.InputStream in ) → java.io.InputStream

read in the stream, replacing import statements with new packages. This also fixes the old BoxSelected procedure name, which should have been boxSelected on day 1.

Parameters

in - the input stream containing Jython code.

Returns:

new stream, approximately the same length and same number of lines.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


fixImports

fixImports( java.io.InputStream in, String name ) → java.io.InputStream

read in the stream, replacing import statements with new packages. This also fixes the old BoxSelected procedure name, which should have been boxSelected on day 1.

Parameters

in - the input stream containing Jython code.
name - string identifier for the code (e.g. the filename).

Returns:

new stream, approximately the same length and same number of lines.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


main

main( String[] args ) → void

Parameters

args - a java.lang.String[]

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]