diff --git a/pom.xml b/pom.xml index 9c1ba9b..c305150 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.scijava pom-scijava - 27.0.1 + 32.0.0-beta-4 @@ -102,6 +102,10 @@ Institute of Molecular Cell Biology and Genetics. org.scijava scijava-common + + org.scijava + script-editor + @@ -109,6 +113,10 @@ Institute of Molecular Cell Biology and Genetics. jython-slim ${jython-slim.version} + + com.fifesoft + rsyntaxtextarea + @@ -117,4 +125,10 @@ Institute of Molecular Cell Biology and Genetics. test + + + scijava.public + https://maven.scijava.org/content/groups/public + + diff --git a/src/main/java/org/scijava/plugins/scripting/jython/JythonScriptSyntaxHighlighter.java b/src/main/java/org/scijava/plugins/scripting/jython/JythonScriptSyntaxHighlighter.java new file mode 100644 index 0000000..08db318 --- /dev/null +++ b/src/main/java/org/scijava/plugins/scripting/jython/JythonScriptSyntaxHighlighter.java @@ -0,0 +1,46 @@ +/* + * #%L + * Python scripting language plugin to be used with PyImageJ. + * %% + * Copyright (C) 2021 - 2022 SciJava developers. + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +package org.scijava.plugins.scripting.jython; + +import org.fife.ui.rsyntaxtextarea.modes.PythonTokenMaker; +import org.scijava.plugin.Plugin; +import org.scijava.ui.swing.script.SyntaxHighlighter; + +/** + * SyntaxHighlighter for Python (Jython). + * + * @author Karl Duderstadt + */ +@Plugin(type = SyntaxHighlighter.class, name = "python-(jython)") +public class JythonScriptSyntaxHighlighter extends PythonTokenMaker implements +SyntaxHighlighter +{ + // Everything implemented in PythonTokenMaker +}