Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Minor FX upgrade, use pluralize, clear status bar for R code

AuthorDaveJarvis <email>
Date2020-07-12 22:27:46 GMT-0700
Commitbc7a58ac08db6928ff20c9b423afcb4ca4b0b1ac
Parent08d0488
.idea/compiler.xml
<project version="4">
<component name="CompilerConfiguration">
- <bytecodeTargetLevel target="11" />
+ <bytecodeTargetLevel target="14" />
</component>
</project>
.idea/misc.xml
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
- <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="false" project-jdk-name="14" project-jdk-type="JavaSDK">
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_14" default="true" project-jdk-name="14" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build" />
</component>
R/conversion.R
# Returns a human-readable string that provides the elapsed time between
# two numbers in terms of years, months, and days. If any unit value is zero,
-# the unit is not included. The words (year, month, day) are pluralised
+# the unit is not included. The words (year, month, day) are pluralized
# according to English grammar. The numbers are written out according to
# Chicago Manual of Style. This applies the serial comma.
# -----------------------------------------------------------------------------
pl.numeric <- function( s, n ) {
- concat( cms( n ), concat( " ", pluralise( s, n ) ) )
+ concat( cms( n ), concat( " ", pluralize( s, n ) ) )
}
# -----------------------------------------------------------------------------
-# Pluralise s if n is not equal to 1.
+# Pluralize s if n is not equal to 1.
# -----------------------------------------------------------------------------
pl <- function( s, n=2 ) {
build.gradle
// JavaFX
implementation 'org.reactfx:reactfx:1.4.1'
- implementation 'org.controlsfx:controlsfx:11.0.1'
+ implementation 'org.controlsfx:controlsfx:11.0.2'
implementation 'org.fxmisc.richtext:richtextfx:0.10.5'
implementation 'org.fxmisc.wellbehaved:wellbehavedfx:0.3.3'
version = gitVersion()
-sourceCompatibility = JavaVersion.VERSION_11
def launcherClassName = "com.${applicationName}.Launcher"
src/main/java/com/scrivenvar/processors/InlineRProcessor.java
import static com.scrivenvar.processors.text.TextReplacementFactory.replace;
import static java.lang.Math.min;
+import static java.lang.String.format;
/**
*/
private void init() {
+ getNotifier().clear();
+
try {
final var bootstrap = getBootstrapScript();
eval( replace( bootstrap, map ) );
}
-
- getNotifier().clear();
} catch( final Exception ex ) {
getNotifier().notify( ex );
@Override
public String process( final String text ) {
+ getNotifier().clear();
+
final int length = text.length();
return getScriptEngine().eval( r );
} catch( final ScriptException ex ) {
- getNotifier().notify( ex );
- return "";
+ final String expr = r.substring( 0, min( r.length(), 30 ) );
+ final String msg = format(
+ "Error with [%s...]: %s", expr, ex.getMessage() );
+ getNotifier().notify( msg );
}
+
+ return "";
}
Delta17 lines added, 11 lines removed, 6-line increase