Skip to content

Commit

Permalink
Merge remote-tracking branch 'JMRI/master' into eb-catalog-i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
silverailscolo committed Dec 16, 2017
2 parents 41791fb + 6d519b0 commit f39ec8b
Show file tree
Hide file tree
Showing 97 changed files with 4,327 additions and 1,084 deletions.
24 changes: 14 additions & 10 deletions .classpath
Expand Up @@ -40,7 +40,7 @@
</attributes>
</classpathentry>
<classpathentry kind="lib" path="lib/annotations.jar"/>
<classpathentry kind="lib" path="lib/commons-lang3-3.2.1.jar"/>
<classpathentry kind="lib" path="lib/commons-lang3-3.7.jar"/>
<classpathentry kind="lib" path="lib/ecj.jar"/>
<classpathentry kind="lib" path="lib/gluegen-rt.jar"/>
<classpathentry kind="lib" path="lib/jakarta-regexp-1.5.jar"/>
Expand Down Expand Up @@ -76,7 +76,7 @@
<classpathentry kind="lib" path="lib/jackson-databind-2.8.5.jar"/>
<classpathentry kind="lib" path="lib/jackson-annotations-2.8.5.jar"/>
<classpathentry kind="lib" path="lib/i18nchecker.jar"/>
<classpathentry kind="lib" path="lib/commons-io-1.3.1.jar"/>
<classpathentry kind="lib" path="lib/commons-io-2.6.jar"/>
<classpathentry kind="lib" path="lib/bluecove-2.1.1-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="lib/bluecove-bluez-2.1.1-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="lib/bluecove-gpl-2.1.1-SNAPSHOT.jar"/>
Expand Down Expand Up @@ -124,13 +124,17 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="lib/cucumber-core-1.2.5.jar"/>
<classpathentry kind="lib" path="lib/cucumber-java-1.2.5.jar"/>
<classpathentry kind="lib" path="lib/cucumber-java8-1.2.5.jar"/>
<classpathentry kind="lib" path="lib/cucumber-junit-1.2.5.jar"/>
<classpathentry kind="lib" path="lib/cucumber-jvm-deps-1.0.5.jar"/>
<classpathentry kind="lib" path="lib/gherkin-2.12.2.jar"/>
<classpathentry kind="lib" path="lib/gherkin-jvm-deps-1.0.3.jar"/>
<classpathentry kind="lib" path="lib/gherkin3-3.0.0.jar"/>
<classpathentry kind="lib" path="lib/cucumber-core-2.0.1.jar"/>
<classpathentry kind="lib" path="lib/cucumber-java-2.0.1.jar"/>
<classpathentry kind="lib" path="lib/cucumber-java8-2.0.1.jar"/>
<classpathentry kind="lib" path="lib/cucumber-junit-2.0.1.jar"/>
<classpathentry kind="lib" path="lib/cucumber-jvm-deps-1.0.6.jar"/>
<classpathentry kind="lib" path="lib/cucumber-picocontainer-2.0.1.jar"/>
<classpathentry kind="lib" path="lib/gherkin-4.1.3.jar"/>
<classpathentry kind="lib" path="lib/gherkin-jvm-deps-1.0.4.jar"/>
<classpathentry kind="lib" path="lib/picocontainer-2.15.jar"/>
<classpathentry kind="lib" path="lib/tag-expressions-1.0.1.jar"/>
<classpathentry kind="lib" path="lib/typetools-0.5.0.jar"/>
<classpathentry kind="lib" path="lib/webdrivermanager-2.0.1.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
19 changes: 19 additions & 0 deletions .settings/Debug PanelPro.launch
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/jmri/java/src/apps/PanelPro/PanelPro.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="apps.PanelPro.PanelPro"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-Djava.security.policy=${project_path}/lib/security.policy -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dapple.awt.graphics.EnableQ2DX=true -Dlog4j.ignoreTCL=true -Dfile.encoding=UTF-8 -Djinput.plugins=net.bobis.jinput.hidraw.HidRawEnvironmentPlugin -Dpurejavacomm.loglevel=0 PanelProConfig2.xml"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="jmri"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms256m -Xmx640m"/>
</launchConfiguration>
4 changes: 0 additions & 4 deletions .travis.yml
Expand Up @@ -18,10 +18,6 @@ before_install:
# install graphviz on macOS
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install graphviz ; fi
# install geckodriver on linux
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://github.com/mozilla/geckodriver/releases/download/v0.19.0/geckodriver-v0.19.0-linux64.tar.gz ; mkdir geckodriver ; tar -xzf geckodriver-v0.19.0-linux64.tar.gz -C geckodriver ; export PATH=$PATH:$PWD/geckodriver ; fi
# install chromedriver on linux
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://chromedriver.storage.googleapis.com/2.33/chromedriver_linux64.zip ; mkdir chromedriver ; cd chromedriver; unzip ../chromedriver_linux64.zip ;cd .. ; export PATH=$PATH:$PWD/chromedriver ; fi

install:
- mvn verify -DskipTests=true -Dmaven.javadoc.skip=true -B -V
Expand Down
137 changes: 43 additions & 94 deletions build.xml
Expand Up @@ -36,9 +36,9 @@
<!-- # JVM arguments to pass to the JVM running the JMRI application -->
<!-- jvm.args= -->
<!-- # paths to append to the classpath -->
<!-- cp.append= -->
<!-- # paths to prepend to the classpath -->
<!-- cp.prepend= -->
<!-- cp.append= -->
<!-- # paths to prepend to the classpath -->
<!-- cp.prepend= -->
<!-- # The directory where Findbugs is installed -->
<!-- findbugs.home= -->
<!-- # You can specify a DecoderPro/PanelPro config file at runtime -->
Expand Down Expand Up @@ -181,7 +181,7 @@
<pathelement location="${libdir}/xAPlib.jar"/>
<pathelement location="${libdir}/jna-4.4.0.jar"/>
<pathelement location="${libdir}/jna-platform-4.4.0.jar"/>
<pathelement location="${libdir}/commons-lang3-3.2.1.jar"/>
<pathelement location="${libdir}/commons-lang3-3.7.jar"/>
<pathelement location="${libdir}/jakarta-regexp-1.5.jar"/>
<pathelement location="${libdir}/jackson-core-2.8.5.jar"/>
<pathelement location="${libdir}/jackson-annotations-2.8.5.jar"/>
Expand All @@ -205,7 +205,7 @@
<pathelement location="${libdir}/pi4j-device.jar"/>
<pathelement location="${libdir}/pi4j-gpio-extension.jar"/>
<pathelement location="${libdir}/pi4j-service.jar"/>
<pathelement location="${libdir}/commons-io-1.3.1.jar"/>
<pathelement location="${libdir}/commons-io-2.6.jar"/>
<pathelement location="${libdir}/bluecove-2.1.1-SNAPSHOT.jar"/>
<pathelement location="${libdir}/bluecove-bluez-2.1.1-SNAPSHOT.jar"/>
<pathelement location="${libdir}/bluecove-gpl-2.1.1-SNAPSHOT.jar"/>
Expand Down Expand Up @@ -254,18 +254,20 @@
<pathelement location="${libdir}/system-rules-1.16.0.jar"/>
<pathelement location="${libdir}/org-openide-util-lookup-RELEASE82.jar"/>
<!-- cucumber and it's dependencies -->
<pathelement location="${libdir}/cucumber-core-1.2.5.jar"/>
<pathelement location="${libdir}/cucumber-java-1.2.5.jar"/>
<pathelement location="${libdir}/cucumber-java8-1.2.5.jar"/>
<pathelement location="${libdir}/cucumber-junit-1.2.5.jar"/>
<pathelement location="${libdir}/cucumber-jvm-deps-1.0.5.jar"/>
<pathelement location="${libdir}/cucumber-picocontainer-1.2.5.jar"/>
<pathelement location="${libdir}/gherkin-2.12.2.jar"/>
<pathelement location="${libdir}/gherkin3-3.0.0.jar"/>
<pathelement location="${libdir}/gherkin-jvm-deps-1.0.3.jar"/>
<pathelement location="${libdir}/cucumber-core-2.0.1.jar"/>
<pathelement location="${libdir}/cucumber-java-2.0.1.jar"/>
<pathelement location="${libdir}/cucumber-java8-2.0.1.jar"/>
<pathelement location="${libdir}/cucumber-junit-2.0.1.jar"/>
<pathelement location="${libdir}/cucumber-jvm-deps-1.0.6.jar"/>
<pathelement location="${libdir}/cucumber-picocontainer-2.0.1.jar"/>
<pathelement location="${libdir}/gherkin-4.1.3.jar"/>
<pathelement location="${libdir}/gherkin-jvm-deps-1.0.4.jar"/>
<pathelement location="${libdir}/picocontainer-2.15.jar"/>
<pathelement location="${libdir}/tag-expressions-1.0.1.jar"/>
<pathelement location="${libdir}/typetools-0.5.0.jar"/>
<!-- Selenium and it's dependencies -->
<pathelement location="${libdir}/selenium-server-standalone-3.6.0.jar"/>
<pathelement location="${libdir}/webdrivermanager-2.0.1.jar"/>
</path>

<!-- path to run regular executables -->
Expand Down Expand Up @@ -687,45 +689,41 @@
<!-- By default, we set them explicitly, so that new ones will show up -->
<!-- See http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm -->
<!-- -->
<target name="-ecj-compile-internal"> <!-- internal target for compiling Java source from a specified directory using ECJ -->
<!-- Compile the java code from ${source} into ${target} -->
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
<mkdir dir="${java.target.directory}"/>
<javac srcdir="${java.source.directory}"
destdir="${java.target.directory}"
source="${source_version}"
target="${jre_version}"
includeantruntime="false"
debug="yes" >
<compilerclasspath>
<pathelement path="${libdir}/ecj.jar"/>
</compilerclasspath>
<compilerarg value="@${basedir}/java/ecj.warning.options"/>
<classpath refid="${java.class.path}"/>
</javac>
</target>
<macrodef name="ecj-compile">
<attribute name="javac.source"/>
<attribute name="javac.target" default="${target}"/>
<attribute name="javac.deprecation" default="${deprecation}"/>
<attribute name="javac.classpath" default="compile.class.path"/>
<sequential>
<mkdir dir="@{javac.target}"/> <!-- ensure destdir exists -->
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
<javac srcdir="@{javac.source}"
destdir="@{javac.target}"
source="${source_version}"
target="${jre_version}"
includeantruntime="false"
debug="yes">
<compilerclasspath>
<pathelement path="${libdir}/ecj.jar"/>
</compilerclasspath>
<compilerarg value="@${basedir}/java/ecj.warning.options"/>
<classpath refid="@{javac.classpath}"/>
</javac>
</sequential>
</macrodef>

<target name="warnings"
description="compile source with warning generation on, omitting tests; requires Ant 1.8 and ecj.jar"
depends="check-ant-requirements, clean, init, copyfiles, compile-generated-source">
<antcall target="-ecj-compile-internal">
<param name="java.source.directory" value="${source}"/>
<param name="java.target.directory" value="${target}"/>
<param name="java.class.path" value="compile.class.path"/>
</antcall>
<ecj-compile javac.source="${source}"/>
</target>

<target name="tests-warnings"
description="compile test sources with warning generation on; requires Ant 1.8 and ecj.jar"
depends="check-ant-requirements, clean, init, copyfiles, warnings">
<antcall target="-ecj-compile-internal">
<param name="java.source.directory" value="${test}"/>
<param name="java.target.directory" value="${testtarget}"/>
<param name="java.class.path" value="test.class.path"/>
</antcall>
<ecj-compile javac.source="${test}" javac.target="${testtarget}" javac.classpath="test.class.path"/>
</target>


<!-- end of program build targets -->

<!-- ============================================================================= -->
Expand Down Expand Up @@ -869,7 +867,7 @@
</java>
</target>

<!-- see comment just above -->
<!-- see comment just above -->
<target name="-debug-jmri-application"
if="debugger"
depends="runtime-library-selection">
Expand Down Expand Up @@ -1351,7 +1349,7 @@
<sysproperty key="log4j.ignoreTCL" path="true/"/>
<sysproperty key="java.library.path" path=".:${libdir}:${arch.lib.path}"/>
<sysproperty key="jmri.prefsdir" path="${tempdir}"/>
<sysproperty key="cucumber.options" value="--tags ~@Ignore"/>
<sysproperty key="cucumber.options" value="--tags 'not @Ignore'"/>

<classpath refid="test.class.path"/>

Expand Down Expand Up @@ -2327,55 +2325,6 @@
<echo message="new release branch ${branch-name} created"/>
</target>

<!-- CI Test runners -->
<target name="travis-ci" description="Parallel execution of CI tasks on Travis CI">
<parallel threadCount="1"> <!-- allow up to four tasks at once -->
<antcall target="checknonascii" />
<sequential>
<antcall target="compile-generated-source" />
<antcall target="javadoc" />
<antcall target="ci-test-travis" />
</sequential>
</parallel>
</target>

<target name="travis-ci-coverage" description="Parallel execution of CI tasks on Travis CI">
<parallel threadCount="1"> <!-- allow up to four tasks at once -->
<antcall target="checknonascii" />
<sequential>
<antcall target="compile-generated-source" />
<antcall target="javadoc" />
<antcall target="ci-test-travis-coveragecheck" />
</sequential>
</parallel>
</target>


<target name="appveyor" description="Parallel execution of CI tasks on Appveyor">
<parallel threadCount="1"> <!-- allow up to four tasks at once -->
<antcall target="checkPropertiesFiles" />
<antcall target="ci-test-appveyor-coveragecheck" />
</parallel>
</target>

<!-- - - - - - - - - - - - - - - - - -
target: lockMetaFiles
- - - - - - - - - - - - - - - - - -->
<target name="lockMetaFiles" description="Lock META-INT files">
<echo>locking META-INT files</echo>
<chmod perm="ugo+rx">
<fileset dir="${target/classes/META-INF}"/>
</chmod>
</target>

<!-- - - - - - - - - - - - - - - - - -
target: unlockMetaFiles
- - - - - - - - - - - - - - - - - -->
<target name="unlockMetaFiles" description="Unlock META-INT files">
<echo>unlocking META-INT files</echo>
<chmod perm="ugo+rx+w">
<fileset dir="${target/classes/META-INF}"/>
</chmod>
</target>
<target name="appveyor" description="CI tasks on Appveyor" depends="checkPropertiesFiles, ci-test-appveyor-coveragecheck"/>

</project>
4 changes: 4 additions & 0 deletions help/en/Acknowledgements.shtml
Expand Up @@ -356,6 +356,10 @@
<li>Michael Dunn, who provided a decoder definition for the
MRC 1645 decoder <a name="E" id="E"></a></li>

<li>Mike Dunston, who provided
<a href="https://github.com/JMRI/JMRI/pull/4533">several updates</a>
for the DCC++ code</li>

<li>Joe Ellis provided the DecoderPro configuration files
for the Lenz LE077XF decoder and has done a fantastic job
on the manual</li>
Expand Down
Expand Up @@ -5,11 +5,13 @@
import org.junit.Assert;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.events.EventFiringWebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxBinary;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import io.github.bonigarcia.wdm.WebDriverManager;
import org.openqa.selenium.support.events.EventFiringWebDriver;
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.WebDriverWait;
Expand All @@ -32,6 +34,12 @@ public class WebServerAcceptanceSteps implements En {

public WebServerAcceptanceSteps(jmri.InstanceManager instance) {

Before(chrometags,()->{
WebDriverManager.getInstance(ChromeDriver.class).setup();
});
Before(firefoxtags,()->{
WebDriverManager.getInstance(FirefoxDriver.class).setup();
});
Given("^I am using firefox$", () -> {
if(GraphicsEnvironment.isHeadless()) {
FirefoxBinary firefoxBinary = new FirefoxBinary();
Expand Down
14 changes: 14 additions & 0 deletions java/src/jmri/jmrit/beantable/BeanTableDataModel.java
Expand Up @@ -298,6 +298,7 @@ public void setValueAt(Object value, int row, int col) {
nbMan.updateBeanFromSystemToUser(nBean);
} catch (JmriException ex) {
//We should never get an exception here as we already check that the username is not valid
log.error("Impossible exception setting user name", ex);
}
}
}
Expand Down Expand Up @@ -679,6 +680,7 @@ public void renameBean(int row, int column) {
nbMan.updateBeanFromSystemToUser(nBean);
} catch (JmriException ex) {
//We should never get an exception here as we already check that the username is not valid
log.error("Impossible exception renaming Bean", ex);
}
}

Expand Down Expand Up @@ -747,6 +749,7 @@ public void moveBean(int row, int column) {
nbMan.updateBeanFromSystemToUser(newNameBean);
} catch (JmriException ex) {
//We should never get an exception here as we already check that the username is not valid
log.error("Impossible exception moving Bean", ex);
}
}
}
Expand Down Expand Up @@ -940,6 +943,17 @@ public Void doInBackground() {
return null;
}

/**
* Minimal implementation to catch and log errors
*/
@Override
protected void done() {
try {
get(); // called to get errors
} catch (InterruptedException | java.util.concurrent.ExecutionException e) {
log.error("Exception while deleting bean", e);
}
}
}

class PopupListener extends MouseAdapter {
Expand Down
5 changes: 5 additions & 0 deletions java/src/jmri/jmrit/display/PositionableIcon.java
Expand Up @@ -122,6 +122,11 @@ public void setScale(double s) {
updateSize();
}

@Override
public double getScale() {
return _scale;
}

@Override
public int getDegrees() {
if (_text) {
Expand Down

0 comments on commit f39ec8b

Please sign in to comment.