Skip to content

Commit c8e9033

Browse files
committed
Update dependencies and correct to API changes.
1 parent 5a30cfe commit c8e9033

File tree

2 files changed

+94
-94
lines changed

2 files changed

+94
-94
lines changed

scala-console/build.sbt

Lines changed: 90 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,91 @@
1-
// @formatter:off
2-
3-
name := "ijp-scala-console"
4-
organization := "net.sf.ij-plugins"
5-
version := "1.4.1-SNAPSHOT"
6-
7-
crossScalaVersions := Seq("2.11.8", "2.12.1")
8-
scalaVersion <<= crossScalaVersions { versions => versions.head }
9-
10-
// set the main class for packaging the main jar
11-
// 'run' will still auto-detect and prompt
12-
// change Compile to Test to set it for the test jar
13-
mainClass in(Compile, packageBin) := Some("net.sf.ij_plugins.scala.console.ScalaConsoleApp")
14-
15-
// set the main class for the main 'run' task
16-
// change Compile to Test to set it for 'test:run'
17-
mainClass in(Compile, run) := Some("net.sf.ij_plugins.scala.console.ScalaConsoleApp")
18-
19-
libraryDependencies ++= Seq(
20-
"com.beachape" %% "enumeratum" % "1.5.3",
21-
"org.fxmisc.richtext" % "richtextfx" % "0.7-M2",
22-
"org.scala-lang" % "scala-compiler" % scalaVersion.value,
23-
"org.scala-lang.modules" %% "scala-java8-compat" % "0.8.0",
24-
"org.scalafx" %% "scalafx" % "8.0.102-R11",
25-
"org.scalafx" %% "scalafxml-core-sfx8" % "0.3",
26-
"org.scalafx" %% "scalafx-extras" % "0.1.0-SNAPSHOT",
27-
"net.imagej" % "ij" % "1.51f",
28-
"junit" % "junit" % "4.12" % "test",
29-
"com.novocode" % "junit-interface" % "0.11" % "test"
30-
)
31-
32-
scalacOptions in(Compile, compile) ++= Seq(
33-
"-target:jvm-1.8",
34-
"-encoding", "UTF-8",
35-
"-unchecked",
36-
"-deprecation",
37-
"-Xlint",
38-
"-feature",
39-
"-Xfuture",
40-
"–optimise",
41-
"-Yno-adapted-args",
42-
"-Ywarn-dead-code",
43-
"-Ywarn-numeric-widen"
44-
// "-Ywarn-value-discard",
45-
// "-Ywarn-unused",
46-
// "-Ywarn-unused-import"
47-
)
48-
49-
resolvers += "ImageJ Releases" at "http://maven.imagej.net/content/repositories/releases/"
50-
51-
// fork a new JVM for 'run' and 'test:run'
52-
fork := true
53-
54-
// add a JVM option to use when forking a JVM for 'run'
55-
javaOptions += "-Xmx2G"
56-
57-
58-
// Needed by ScalaFXML
59-
autoCompilerPlugins := true
60-
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
61-
62-
// Set the prompt (for this build) to include the project id.
63-
shellPrompt in ThisBuild := { state => "sbt:" + Project.extract(state).currentRef.project + "> " }
64-
65-
enablePlugins(SbtImageJ)
66-
67-
ijRuntimeSubDir := "sandbox"
68-
ijPluginsSubDir := "ij-plugins"
69-
cleanFiles += ijPluginsDir.value
70-
71-
// Info needed sync with Maven central.
72-
pomExtra in Global := {
73-
<url>(your project URL)</url>
74-
<licenses>
75-
<license>
76-
<name>GNU Lesser General Public License</name>
77-
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
78-
</license>
79-
</licenses>
80-
<scm>
81-
<connection>scm:svn://svn.code.sf.net/p/ij-plugins/code/trunk</connection>
82-
<developerConnection>scm:svn://svn.code.sf.net/p/ij-plugins/code/trunk</developerConnection>
83-
<url>http://sourceforge.net/projects/ij-plugins/</url>
84-
</scm>
85-
<developers>
86-
<developer>
87-
<id>jsacha</id>
88-
<name>Jarek Sacha</name>
89-
</developer>
90-
</developers>
1+
// @formatter:off
2+
3+
name := "ijp-scala-console"
4+
organization := "net.sf.ij-plugins"
5+
version := "1.5.0"
6+
7+
crossScalaVersions := Seq("2.11.8", "2.12.1")
8+
scalaVersion <<= crossScalaVersions { versions => versions.head }
9+
10+
// set the main class for packaging the main jar
11+
// 'run' will still auto-detect and prompt
12+
// change Compile to Test to set it for the test jar
13+
mainClass in(Compile, packageBin) := Some("net.sf.ij_plugins.scala.console.ScalaConsoleApp")
14+
15+
// set the main class for the main 'run' task
16+
// change Compile to Test to set it for 'test:run'
17+
mainClass in(Compile, run) := Some("net.sf.ij_plugins.scala.console.ScalaConsoleApp")
18+
19+
libraryDependencies ++= Seq(
20+
"com.beachape" %% "enumeratum" % "1.5.4",
21+
"org.fxmisc.richtext" % "richtextfx" % "0.7-M3",
22+
"org.scala-lang" % "scala-compiler" % scalaVersion.value,
23+
"org.scala-lang.modules" %% "scala-java8-compat" % "0.8.0",
24+
"org.scalafx" %% "scalafx" % "8.0.102-R11",
25+
"org.scalafx" %% "scalafxml-core-sfx8" % "0.3",
26+
"org.scalafx" %% "scalafx-extras" % "0.1.0",
27+
"net.imagej" % "ij" % "1.51f",
28+
"junit" % "junit" % "4.12" % "test",
29+
"com.novocode" % "junit-interface" % "0.11" % "test"
30+
)
31+
32+
scalacOptions in(Compile, compile) ++= Seq(
33+
"-target:jvm-1.8",
34+
"-encoding", "UTF-8",
35+
"-unchecked",
36+
"-deprecation",
37+
"-Xlint",
38+
"-feature",
39+
"-Xfuture",
40+
"–optimise",
41+
"-Yno-adapted-args",
42+
"-Ywarn-dead-code",
43+
"-Ywarn-numeric-widen"
44+
// "-Ywarn-value-discard",
45+
// "-Ywarn-unused",
46+
// "-Ywarn-unused-import"
47+
)
48+
49+
resolvers += "ImageJ Releases" at "http://maven.imagej.net/content/repositories/releases/"
50+
51+
// fork a new JVM for 'run' and 'test:run'
52+
fork := true
53+
54+
// add a JVM option to use when forking a JVM for 'run'
55+
javaOptions += "-Xmx2G"
56+
57+
58+
// Needed by ScalaFXML
59+
autoCompilerPlugins := true
60+
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
61+
62+
// Set the prompt (for this build) to include the project id.
63+
shellPrompt in ThisBuild := { state => "sbt:" + Project.extract(state).currentRef.project + "> " }
64+
65+
enablePlugins(SbtImageJ)
66+
67+
ijRuntimeSubDir := "sandbox"
68+
ijPluginsSubDir := "ij-plugins"
69+
cleanFiles += ijPluginsDir.value
70+
71+
// Info needed sync with Maven central.
72+
pomExtra in Global := {
73+
<url>(your project URL)</url>
74+
<licenses>
75+
<license>
76+
<name>GNU Lesser General Public License</name>
77+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
78+
</license>
79+
</licenses>
80+
<scm>
81+
<connection>scm:svn://svn.code.sf.net/p/ij-plugins/code/trunk</connection>
82+
<developerConnection>scm:svn://svn.code.sf.net/p/ij-plugins/code/trunk</developerConnection>
83+
<url>http://sourceforge.net/projects/ij-plugins/</url>
84+
</scm>
85+
<developers>
86+
<developer>
87+
<id>jsacha</id>
88+
<name>Jarek Sacha</name>
89+
</developer>
90+
</developers>
9191
}

scala-console/src/main/scala/net/sf/ij_plugins/scala/console/editor/EditorCodeArea.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import java.util.function.Consumer
2929
import java.util.regex.Pattern
3030

3131
import org.fxmisc.flowless.VirtualizedScrollPane
32-
import org.fxmisc.richtext.model.{RichTextChange, StyleSpans, StyleSpansBuilder}
32+
import org.fxmisc.richtext.model.{RichTextChange, StyleSpans, StyleSpansBuilder, StyledText}
3333
import org.fxmisc.richtext.{CodeArea, LineNumberFactory}
3434

3535
import scala.compat.java8.FunctionConverters._
@@ -87,12 +87,12 @@ class EditorCodeArea {
8787
codeArea.stylesheets += this.getClass.getResource("scala-keywords.css").toExternalForm
8888

8989
private val filterOp:
90-
RichTextChange[util.Collection[String], util.Collection[String]] => Boolean =
90+
RichTextChange[util.Collection[String], StyledText[util.Collection[String]], util.Collection[String]] => Boolean =
9191
ch => !ch.getInserted.equals(ch.getRemoved)
9292

9393
codeArea.richChanges.filter(asJavaPredicate(filterOp)).subscribe(
94-
new Consumer[RichTextChange[util.Collection[String], util.Collection[String]]] {
95-
override def accept(t: RichTextChange[util.Collection[String], util.Collection[String]]): Unit = {
94+
new Consumer[RichTextChange[util.Collection[String], StyledText[util.Collection[String]], util.Collection[String]]] {
95+
override def accept(t: RichTextChange[util.Collection[String], StyledText[util.Collection[String]], util.Collection[String]]): Unit = {
9696
codeArea.setStyleSpans(0, computeHighlighting(codeArea.getText()))
9797
}
9898
})

0 commit comments

Comments
 (0)