Commit 93af6ab2 authored by Bas Couwenberg's avatar Bas Couwenberg

Imported Upstream version 0.0.svn12271+dfsg

parent 45f7069c
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="org/apache/commons/compress/compressors/CompressorException.java|org/apache/commons/compress/compressors/CompressorStreamFactory.java|org/apache/commons/compress/compressors/FileNameUtil.java|org/apache/commons/compress/compressors/bzip2/BZip2Utils.java|org/apache/commons/compress/compressors/deflate/|org/apache/commons/compress/compressors/gzip/|org/apache/commons/compress/compressors/lzma/|org/apache/commons/compress/compressors/lzw/|org/apache/commons/compress/compressors/pack200/|org/apache/commons/compress/compressors/snappy/|org/apache/commons/compress/compressors/xz/|org/apache/commons/compress/compressors/z/|org/apache/commons/jcs/JCS.java|org/apache/commons/jcs/access/PartitionedCacheAccess.java|org/apache/commons/jcs/admin/servlet/|org/apache/commons/jcs/auxiliary/disk/jdbc/|org/apache/commons/jcs/auxiliary/lateral/|org/apache/commons/jcs/auxiliary/remote/AbstractRemoteAuxiliaryCache.java|org/apache/commons/jcs/auxiliary/remote/AbstractRemoteCacheListener.java|org/apache/commons/jcs/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java|org/apache/commons/jcs/auxiliary/remote/RemoteCache.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheFactory.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheListener.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheManager.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheMonitor.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheNoWait.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheNoWaitFacade.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheRestore.java|org/apache/commons/jcs/auxiliary/remote/http/|org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheStartupServlet.java|org/apache/commons/jcs/auxiliary/remote/server/TimeoutConfigurableRMISocketFactory.java|org/apache/commons/jcs/engine/ZombieCacheService.java|org/apache/commons/jcs/engine/ZombieCacheServiceNonLocal.java|org/apache/commons/jcs/engine/ZombieCacheWatch.java|org/apache/commons/jcs/utils/access/|org/apache/commons/jcs/utils/discovery/|org/apache/commons/jcs/utils/net/|org/apache/commons/jcs/utils/props/|org/apache/commons/jcs/utils/servlet/|org/apache/commons/logging/impl/AvalonLogger.java|org/apache/commons/logging/impl/Jdk13LumberjackLogger.java|org/apache/commons/logging/impl/Log4JLogger.java|org/apache/commons/logging/impl/LogKitLogger.java|org/apache/commons/logging/impl/ServletContextCleaner.java|org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheMonitor.java|org/apache/commons/jcs/engine/CacheAdaptor.java|org/apache/commons/jcs/engine/logging/CacheEventLoggerDebugLogger.java|org/apache/commons/jcs/engine/CacheGroup.java|org/apache/commons/jcs/engine/CacheWatchRepairable.java|org/apache/commons/jcs/access/GroupCacheAccess.java|org/apache/commons/jcs/access/behavior/IGroupCacheAccess.java|org/apache/commons/jcs/access/exception/InvalidGroupException.java|org/openstreetmap/gui/jmapviewer/JMapViewerTree.java|org/openstreetmap/gui/jmapviewer/Demo.java|org/openstreetmap/gui/jmapviewer/checkBoxTree/|org/apache/commons/compress/compressors/CompressorStreamProvider.java|org/apache/commons/compress/compressors/lz4/|org/apache/commons/compress/compressors/lz77support/|org/apache/commons/compress/utils/ArchiveUtils.java" kind="src" path="src"/>
<classpathentry excluding="org/apache/commons/compress/compressors/CompressorException.java|org/apache/commons/compress/compressors/CompressorStreamFactory.java|org/apache/commons/compress/compressors/FileNameUtil.java|org/apache/commons/compress/compressors/bzip2/BZip2Utils.java|org/apache/commons/compress/compressors/deflate/|org/apache/commons/compress/compressors/gzip/|org/apache/commons/compress/compressors/lzma/|org/apache/commons/compress/compressors/lzw/|org/apache/commons/compress/compressors/pack200/|org/apache/commons/compress/compressors/snappy/|org/apache/commons/compress/compressors/xz/|org/apache/commons/compress/compressors/z/|org/apache/commons/jcs/JCS.java|org/apache/commons/jcs/access/PartitionedCacheAccess.java|org/apache/commons/jcs/admin/servlet/|org/apache/commons/jcs/auxiliary/disk/jdbc/|org/apache/commons/jcs/auxiliary/lateral/|org/apache/commons/jcs/auxiliary/remote/AbstractRemoteAuxiliaryCache.java|org/apache/commons/jcs/auxiliary/remote/AbstractRemoteCacheListener.java|org/apache/commons/jcs/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java|org/apache/commons/jcs/auxiliary/remote/RemoteCache.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheFactory.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheListener.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheManager.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheMonitor.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheNoWait.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheNoWaitFacade.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheRestore.java|org/apache/commons/jcs/auxiliary/remote/http/|org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheStartupServlet.java|org/apache/commons/jcs/auxiliary/remote/server/TimeoutConfigurableRMISocketFactory.java|org/apache/commons/jcs/engine/ZombieCacheService.java|org/apache/commons/jcs/engine/ZombieCacheServiceNonLocal.java|org/apache/commons/jcs/engine/ZombieCacheWatch.java|org/apache/commons/jcs/utils/access/|org/apache/commons/jcs/utils/discovery/|org/apache/commons/jcs/utils/net/|org/apache/commons/jcs/utils/props/|org/apache/commons/jcs/utils/servlet/|org/apache/commons/logging/impl/AvalonLogger.java|org/apache/commons/logging/impl/Jdk13LumberjackLogger.java|org/apache/commons/logging/impl/Log4JLogger.java|org/apache/commons/logging/impl/LogKitLogger.java|org/apache/commons/logging/impl/ServletContextCleaner.java|org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheMonitor.java|org/apache/commons/jcs/engine/CacheAdaptor.java|org/apache/commons/jcs/engine/logging/CacheEventLoggerDebugLogger.java|org/apache/commons/jcs/engine/CacheGroup.java|org/apache/commons/jcs/engine/CacheWatchRepairable.java|org/apache/commons/jcs/access/GroupCacheAccess.java|org/apache/commons/jcs/access/behavior/IGroupCacheAccess.java|org/apache/commons/jcs/access/exception/InvalidGroupException.java|org/openstreetmap/gui/jmapviewer/JMapViewerTree.java|org/openstreetmap/gui/jmapviewer/Demo.java|org/openstreetmap/gui/jmapviewer/checkBoxTree/|org/apache/commons/compress/compressors/CompressorStreamProvider.java|org/apache/commons/compress/compressors/lz4/|org/apache/commons/compress/compressors/lz77support/|org/apache/commons/compress/utils/ArchiveUtils.java|org/apache/commons/compress/compressors/brotli/" kind="src" path="src"/>
<classpathentry including="data/|images/|resources/|styles/" kind="src" path=""/>
<classpathentry kind="src" path="test/unit"/>
<classpathentry kind="src" path="test/functional"/>
......@@ -14,7 +14,7 @@
<classpathentry kind="lib" path="test/lib/fest/jcip-annotations-1.0.jar"/>
<classpathentry kind="lib" path="test/lib/fest/MRJToolkitStubs-1.0.jar"/>
<classpathentry kind="lib" path="test/lib/jfcunit.jar"/>
<classpathentry exported="true" kind="lib" path="test/lib/equalsverifier-2.2.1.jar"/>
<classpathentry exported="true" kind="lib" path="test/lib/equalsverifier-2.3.jar"/>
<classpathentry kind="lib" path="test/lib/reflections/reflections-0.9.10.jar"/>
<classpathentry kind="lib" path="test/lib/reflections/guava-21.0.jar"/>
<classpathentry kind="lib" path="test/lib/reflections/javassist-3.21.0-GA.jar"/>
......
......@@ -122,8 +122,7 @@ This is an overview of the files and directories in the JOSM code repository:
- checkstyle/ libs and config files for checkstyle (automatically detects code style
problems in source code); can be launched as an ant target in build.xml
- commons-cli-1.3.1.jar dependency of Groovy Ant task
- error_prone_ant-2.0.19.jar
used to detect code errors during compilation
- error_prone_ant.jar used to detect code errors during compilation
- findbugs/ libs and config files for findbugs (automatically detects common bugs and potential
problems in source code); can be launched as an ant target in build.xml
- groovy-all-2.4.11.jar used for some unit tests and various scripts
......
......@@ -3,7 +3,7 @@
<entry
kind="dir"
path="trunk"
revision="12039">
revision="12271">
<url>https://josm.openstreetmap.de/svn/trunk</url>
<relative-url>^/trunk</relative-url>
<repository>
......@@ -11,9 +11,9 @@
<uuid>0c6e7542-c601-0410-84e7-c038aed88b3b</uuid>
</repository>
<commit
revision="12039">
<author>bastiK</author>
<date>2017-05-02T21:28:33.757815Z</date>
revision="12271">
<author>Don-vip</author>
<date>2017-05-28T22:35:21.454382Z</date>
</commit>
</entry>
</info>
......@@ -25,7 +25,7 @@
<property name="proj-build.dir" location="${base.dir}/build2"/>
<property name="epsg.output" location="${base.dir}/data/projection/custom-epsg"/>
<property name="groovy.jar" location="${base.dir}/tools/groovy-all-2.4.11.jar"/>
<property name="error_prone_ant.jar" location="${base.dir}/tools/error_prone_ant-2.0.19.jar"/>
<property name="error_prone_ant.jar" location="${base.dir}/tools/error_prone_ant.jar"/>
<property name="javac.compiler" value="com.google.errorprone.ErrorProneAntCompilerAdapter" />
<!-- build parameter: compression level (ant -Dclevel=N)
N ranges from 0 (no compression) to 9 (maximum compression)
......@@ -142,6 +142,9 @@ Build-Date: ${build.tstamp}
<attribute name="Permissions" value="all-permissions"/>
<attribute name="Codebase" value="josm.openstreetmap.de"/>
<attribute name="Application-Name" value="JOSM - Java OpenStreetMap Editor"/>
<!-- Java 9 stuff. Entries are safely ignored by Java 8 -->
<attribute name="Add-Exports" value="java.base/sun.security.util java.desktop/com.apple.eawt java.desktop/com.sun.imageio.spi jdk.deploy/com.sun.deploy.config" />
<attribute name="Add-Opens" value="java.base/java.lang java.base/jdk.internal.loader java.base/sun.security.x509 java.desktop/javax.imageio.spi java.desktop/javax.swing.text.html java.prefs/java.util.prefs" />
</manifest>
<zipfileset dir="images" prefix="images"/>
<zipfileset dir="data" prefix="data"/>
......@@ -319,6 +322,7 @@ Build-Date: ${build.tstamp}
<compilerarg value="-Xep:FutureReturnValueIgnored:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:FloatingPointLiteralPrecision:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:ShortCircuitBoolean:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:LiteralClassName:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg line="-Xmaxwarns 1000"/>
</javac>
......@@ -431,13 +435,27 @@ Build-Date: ${build.tstamp}
<attribute name="coverage" default="true"/>
<sequential>
<echo message="Running @{testfamily}@{testITsuffix} tests with JUnit"/>
<jacoco:coverage destfile="${test.dir}/jacoco@{testITsuffix}.exec" enabled="@{coverage}" excludes="jdk.dynalink.*:jdk.nashorn.*">
<jacoco:coverage destfile="${test.dir}/jacoco@{testITsuffix}.exec" enabled="@{coverage}" includes="org.openstreetmap.josm.*">
<junit printsummary="yes" fork="true" forkmode="once">
<jvmarg value="-Dfile.encoding=UTF-8"/>
<jvmarg value="--add-modules" if:set="isJava9" />
<jvmarg value="java.se.ee" if:set="isJava9" />
<jvmarg value="--add-exports" if:set="isJava9" />
<jvmarg value="java.base/sun.security.util=ALL-UNNAMED" if:set="isJava9" />
<jvmarg value="--add-exports" if:set="isJava9" />
<jvmarg value="--add-opens" if:set="isJava9" />
<jvmarg value="java.base/sun.security.x509=ALL-UNNAMED" if:set="isJava9" />
<jvmarg value="--add-exports" if:set="isJava9" />
<jvmarg value="jdk.deploy/com.sun.deploy.config=ALL-UNNAMED" if:set="isJava9" />
<jvmarg value="--add-opens" if:set="isJava9" />
<jvmarg value="java.base/java.io=ALL-UNNAMED" if:set="isJava9" />
<jvmarg value="--add-opens" if:set="isJava9" />
<jvmarg value="java.base/java.lang=ALL-UNNAMED" if:set="isJava9" />
<jvmarg value="--add-opens" if:set="isJava9" />
<jvmarg value="java.base/java.text=ALL-UNNAMED" if:set="isJava9" />
<jvmarg value="--add-opens" if:set="isJava9" />
<jvmarg value="java.base/java.util=ALL-UNNAMED" if:set="isJava9" />
<jvmarg value="--add-opens" if:set="isJava9" />
<jvmarg value="java.desktop/java.awt=ALL-UNNAMED" if:set="isJava9" />
<sysproperty key="josm.home" value="${test.dir}/config/@{testfamily}-josm.home"/>
<sysproperty key="josm.test.data" value="${test.dir}/data"/>
<sysproperty key="java.awt.headless" value="true"/>
......
This diff is collapsed.
......@@ -237,12 +237,12 @@ way[waterway] > node.node_in_bridge {
throwWarning: tr("node connects waterway and bridge");
}
/* #11128 */
/* #11128, #14812 */
way[highway] > node[tourism=information][information=guidepost] {
set guidepost;
throwOther: tr("{0} node connected to a highway", "{1.tag}");
}
way[highway] > node[amenity][!entrance][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking|bicycle_parking|bus_station|car_wash|ferry_terminal)$/],
way[highway] > node[amenity][!entrance][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking|bicycle_parking|bus_station|car_wash|ferry_terminal|weighbridge)$/],
way[highway] > node[building][!entrance],
way[highway] > node[leisure][!entrance][leisure!=slipway],
way[highway] > node[office][!entrance],
......@@ -319,6 +319,6 @@ way >[index=-1] node {
way[highway][area!=yes][!tunnel][!covered] > node {
set node_in_highway;
}
way[building] > node.node_in_highway!.first_last_node {
way[building][building!=no] > node.node_in_highway!.first_last_node {
throwWarning: tr("node connects highway and building");
}
\ No newline at end of file
......@@ -52,12 +52,13 @@ way[highway=unclassified][!name][noname!=yes] {
assertNoMatch: "way highway=unclassified name=Foo";
}
way.major_road[!ref][!destination:ref] {
way.major_road[!ref][!destination:ref][noref!=yes] {
throwOther: tr("highway without a reference");
group: tr("missing tag");
assertMatch: "way highway=primary";
assertNoMatch: "way highway=primary ref=123";
assertNoMatch: "way highway=primary destination:ref=123";
assertNoMatch: "way highway=primary noref=yes";
}
way[highway=road] {
......
......@@ -216,4 +216,28 @@ way["lanes:forward"]["lanes:forward" !~ /^[1-9]([0-9]*)$/][highway],
assertNoMatch: "node direction=forward";
assertNoMatch: "node direction=anti-clockwise";
assertNoMatch: "node direction=anticlockwise"; /* both spellings are in use and even wiki uses both */
}
/* #14786 (should be safe to just remove the meters unit from the value) */
*[ele][ele =~ /^-?[0-9]+(\.[0-9]+)? ?m$/] {
throwWarning: tr("{0} must be a numeric value, in meters and without units", "{0.key}");
fixAdd: concat("ele=", trim(replace(tag("ele"), "m", "")));
set .ele_is_fixable;
assertMatch: "node ele=12m";
assertMatch: "node ele=12 m";
assertNoMatch: "node ele=12km";
assertMatch: "node ele=12.1m";
assertMatch: "node ele=-12.1 m";
assertNoMatch: "node ele=12";
assertNoMatch: "node ele=high";
}
*[ele][ele !~ /^-?[0-9]+(\.[0-9]+)?$/]!.ele_is_fixable{
throwWarning: tr("{0} must be a numeric value, in meters and without units", "{0.key}");
assertNoMatch: "node ele=12m";
assertNoMatch: "node ele=12 m";
assertMatch: "node ele=12km";
assertNoMatch: "node ele=12.1m";
assertNoMatch: "node ele=-12.1 m";
assertNoMatch: "node ele=12";
assertMatch: "node ele=high";
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -30,13 +30,14 @@ dist.dir=dist
dist.jar=${dist.dir}/josm.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=org/apache/commons/compress/compressors/lz4/**,org/apache/commons/compress/compressors/lz77support/**,org/apache/commons/compress/compressors/lzma/**,org/apache/commons/compress/compressors/xz/**,org/apache/commons/compress/compressors/CompressorStreamFactory.java,org/apache/commons/compress/compressors/deflate/**,org/apache/commons/compress/compressors/gzip/**,org/apache/commons/compress/compressors/lzw/**,org/apache/commons/compress/compressors/pack200/**,org/apache/commons/compress/compressors/snappy/**,org/apache/commons/compress/compressors/z/**,org/apache/commons/compress/utils/ArchiveUtils.java,org/apache/commons/jcs/admin/servlet/**,org/apache/commons/jcs/auxiliary/disk/jdbc/**,org/apache/commons/jcs/auxiliary/remote/http/**,org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheStartupServlet.java,org/apache/commons/jcs/utils/servlet/**,org/apache/commons/logging/impl/AvalonLogger.java,org/apache/commons/logging/impl/Jdk13LumberjackLogger.java,org/apache/commons/logging/impl/Log4JLogger.java,org/apache/commons/logging/impl/LogKitLogger.java,org/apache/commons/logging/impl/ServletContextCleaner.java,org/openstreetmap/gui/jmapviewer/Demo.java
excludes=org/apache/commons/compress/compressors/brotli/**,org/apache/commons/compress/compressors/lz4/**,org/apache/commons/compress/compressors/lz77support/**,org/apache/commons/compress/compressors/lzma/**,org/apache/commons/compress/compressors/xz/**,org/apache/commons/compress/compressors/CompressorStreamFactory.java,org/apache/commons/compress/compressors/deflate/**,org/apache/commons/compress/compressors/gzip/**,org/apache/commons/compress/compressors/lzw/**,org/apache/commons/compress/compressors/pack200/**,org/apache/commons/compress/compressors/snappy/**,org/apache/commons/compress/compressors/z/**,org/apache/commons/compress/utils/ArchiveUtils.java,org/apache/commons/jcs/admin/servlet/**,org/apache/commons/jcs/auxiliary/disk/jdbc/**,org/apache/commons/jcs/auxiliary/remote/http/**,org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheStartupServlet.java,org/apache/commons/jcs/utils/servlet/**,org/apache/commons/logging/impl/AvalonLogger.java,org/apache/commons/logging/impl/Jdk13LumberjackLogger.java,org/apache/commons/logging/impl/Log4JLogger.java,org/apache/commons/logging/impl/LogKitLogger.java,org/apache/commons/logging/impl/ServletContextCleaner.java,org/openstreetmap/gui/jmapviewer/Demo.java
file.reference.commons-collections-3.2.2.jar=../test/lib/unitils-core/commons-collections-3.2.2.jar
file.reference.commons-lang-2.6.jar=../test/lib/unitils-core/commons-lang-2.6.jar
file.reference.commons-logging-1.1.3.jar=../test/lib/unitils-core/commons-logging-1.1.3.jar
file.reference.commons-testing-2.1.0.jar=../test/lib/commons-testing/commons-testing-2.1.0.jar
file.reference.core-src=../src
file.reference.debug-1.0.jar=../test/lib/fest/debug-1.0.jar
file.reference.equalsverifier-2.2.1.jar=../test/lib/equalsverifier-2.2.1.jar
file.reference.equalsverifier-2.3.jar=../test/lib/equalsverifier-2.3.jar
file.reference.fest-assert-1.0.jar=../test/lib/fest/fest-assert-1.0.jar
file.reference.fest-reflect-1.1.jar=../test/lib/fest/fest-reflect-1.1.jar
file.reference.fest-swing-1.1.jar=../test/lib/fest/fest-swing-1.1.jar
......@@ -71,7 +72,7 @@ javac.test.classpath=\
${build.classes.dir}:\
${file.reference.junit-4.12.jar}:\
${file.reference.jfcunit.jar}:\
${file.reference.equalsverifier-2.2.1.jar}:\
${file.reference.equalsverifier-2.3.jar}:\
${file.reference.hamcrest-core-1.3.jar}:\
${file.reference.MRJToolkitStubs-1.0.jar}:\
${file.reference.debug-1.0.jar}:\
......@@ -89,7 +90,8 @@ javac.test.classpath=\
${file.reference.ognl-2.6.9.jar}:\
${file.reference.unitils-core-3.4.6.jar}:\
${file.reference.system-rules-1.16.1.jar}:\
${file.reference.findbugs.jar}
${file.reference.findbugs.jar}:\
${file.reference.commons-testing-2.1.0.jar}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
......
This diff is collapsed.
#!/usr/bin/python
# License: CC0
"""
Helper script to replace "@since xxx" in Javadoc by the upcoming revision number.
Will retrieve the current revision number from the server. It runs over all
modified and added .java files and replaces xxx in "@since xxx" by the revision
number that is to be expected for the next commit.
"""
import xml.etree.ElementTree as ElementTree
import subprocess
svn_info_local = subprocess.check_output("svn info --xml".split(" "))
rep_url = ElementTree.fromstring(svn_info_local).findtext("./entry/repository/root")
svn_info_server = subprocess.check_output("svn info --xml".split(" ") + [rep_url])
rev = int(ElementTree.fromstring(svn_info_server).find("./entry").get("revision")) + 1
svn_status = subprocess.check_output("svn status --xml".split(" "))
for el in ElementTree.fromstring(svn_status).findall("./target/entry"):
if el.find('wc-status').get("item") not in ["added", "modified"]:
continue
path = el.get("path")
if not path.endswith('.java'):
continue
with open(path, 'r') as f:
filedata = f.read()
filedata2 = filedata.replace("@since xxx", "@since {}".format(rev))
if filedata != filedata2:
print("replacing '@since xxx' with '@since {}' in '{}'".format(rev, path))
with open(path, 'w') as f:
f.write(filedata2)
......@@ -37,7 +37,6 @@ import javax.swing.Action;
import javax.swing.InputMap;
import javax.swing.JComponent;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.KeyStroke;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;
......@@ -64,7 +63,6 @@ import org.openstreetmap.josm.data.osm.OsmPrimitive;
import org.openstreetmap.josm.data.projection.Projection;
import org.openstreetmap.josm.data.projection.ProjectionChangeListener;
import org.openstreetmap.josm.data.validation.OsmValidator;
import org.openstreetmap.josm.gui.MainFrame;
import org.openstreetmap.josm.gui.MainMenu;
import org.openstreetmap.josm.gui.MainPanel;
import org.openstreetmap.josm.gui.MapFrame;
......@@ -196,6 +194,22 @@ public abstract class Main {
*/
public MainMenu menu;
/**
* The main panel.
* @since 12125
*/
public MainPanel panel;
/**
* The same main panel, required to be static for {@code MapFrameListener} handling.
*/
protected static MainPanel mainPanel;
/**
* The private content pane of {@code MainFrame}, required to be static for shortcut handling.
*/
protected static JComponent contentPanePrivate;
/**
* The file watcher service.
*/
......@@ -213,12 +227,6 @@ public abstract class Main {
@Deprecated
public static int logLevel = 3;
/**
* The real main panel. This field may be removed any time and made private to {@link MainFrame}
* @see #panel
*/
protected static final MainPanel mainPanel = new MainPanel(getLayerManager());
/**
* Replies the first lines of last 5 error and warning messages, used for bug reports
* @return the first lines of last 5 error and warning messages
......@@ -490,7 +498,6 @@ public abstract class Main {
*/
protected Main() {
setInstance(this);
mainPanel.addMapFrameListener((o, n) -> redoUndoListener.commandChanged(0, 0));
}
private static void setInstance(Main instance) {
......@@ -578,7 +585,7 @@ public abstract class Main {
/**
* Called once at startup to initialize the main window content.
* Should set {@link #menu}
* Should set {@link #menu} and {@link #panel}
*/
protected abstract void initializeMainWindow();
......@@ -634,8 +641,6 @@ public abstract class Main {
}
}
protected static final JPanel contentPanePrivate = new JPanel(new BorderLayout());
public static void redirectToMainContentPane(JComponent source) {
RedirectInputMap.redirect(source, contentPanePrivate);
}
......@@ -715,11 +720,9 @@ public abstract class Main {
///////////////////////////////////////////////////////////////////////////
/**
* Global panel.
* Listener that sets the enabled state of undo/redo menu entries.
*/
public static final JPanel panel = mainPanel;
private final CommandQueueListener redoUndoListener = (queueSize, redoSize) -> {
protected final CommandQueueListener redoUndoListener = (queueSize, redoSize) -> {
menu.undo.setEnabled(queueSize > 0);
menu.redo.setEnabled(redoSize > 0);
};
......@@ -768,8 +771,6 @@ public abstract class Main {
error(e);
}
toolbar = new ToolbarPreferences();
contentPanePrivate.updateUI();
panel.updateUI();
UIManager.put("OptionPane.okIcon", ImageProvider.get("ok"));
UIManager.put("OptionPane.yesIcon", UIManager.get("OptionPane.okIcon"));
......@@ -1077,10 +1078,6 @@ public abstract class Main {
private static void fireProjectionChanged(Projection oldValue, Projection newValue, Bounds oldBounds) {
if ((newValue == null ^ oldValue == null)
|| (newValue != null && oldValue != null && !Objects.equals(newValue.toCode(), oldValue.toCode()))) {
if (Main.map != null) {
// This needs to be called first
Main.map.mapView.fixProjection();
}
synchronized (Main.class) {
Iterator<WeakReference<ProjectionChangeListener>> it = listeners.iterator();
while (it.hasNext()) {
......@@ -1102,6 +1099,7 @@ public abstract class Main {
/**
* Register a projection change listener.
* The listener is registered to be weak, so keep a reference of it if you want it to be preserved.
*
* @param listener the listener. Ignored if <code>null</code>.
*/
......
......@@ -65,12 +65,8 @@ public final class AddNodeAction extends JosmAction {
// add the node
Main.main.undoRedo.add(new AddCommand(nnew));
getLayerManager().getEditDataSet().setSelected(nnew);
if (Main.map.mapView != null) {
if (Main.map.mapView.getRealBounds().contains(nnew.getCoor())) {
Main.map.mapView.repaint();
} else {
AutoScaleAction.zoomTo(Collections.<OsmPrimitive>singleton(nnew));
}
if (Main.map.mapView != null && !Main.map.mapView.getRealBounds().contains(nnew.getCoor())) {
AutoScaleAction.zoomTo(Collections.<OsmPrimitive>singleton(nnew));
}
}
......
......@@ -223,10 +223,14 @@ public class AutoScaleAction extends JosmAction {
if (Main.getLayerManager().getActiveLayer() == null) {
return null;
}
List<Layer> layers = LayerListDialog.getInstance().getModel().getSelectedLayers();
if (layers.isEmpty())
return null;
return layers.get(0);
try {
List<Layer> layers = LayerListDialog.getInstance().getModel().getSelectedLayers();
if (!layers.isEmpty())
return layers.get(0);
} catch (IllegalStateException e) {
Main.error(e);
}
return null;
}
private BoundingXYVisitor getBoundingBox() {
......
......@@ -30,9 +30,9 @@ public class CopyCoordinatesAction extends JosmAction {
public void actionPerformed(ActionEvent ae) {
StringBuilder s = new StringBuilder();
for (Node n : getSelectedNodes()) {
s.append(n.getCoor().lat());
s.append(n.lat());
s.append(", ");
s.append(n.getCoor().lon());
s.append(n.lon());
s.append('\n');
}
ClipboardUtils.copyString(s.toString().trim());
......