Skip to content

Commit 4243e55

Browse files
committed
see #18845 - see #16860 - directory cleanup
git-svn-id: https://josm.openstreetmap.de/svn/trunk@16050 0c6e7542-c601-0410-84e7-c038aed88b3b
1 parent bf2191f commit 4243e55

File tree

7 files changed

+23
-44
lines changed

7 files changed

+23
-44
lines changed

.checkstyle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,10 @@
1010
<filter name="DerivedFiles" enabled="true"/>
1111
<filter name="FilesFromPackage" enabled="true">
1212
<filter-data value="src/com"/>
13-
<filter-data value="src/javax"/>
1413
<filter-data value="src/oauth"/>
1514
<filter-data value="src/org/apache"/>
16-
<filter-data value="src/org/glassfish"/>
17-
<filter-data value="src/org/jdesktop"/>
1815
<filter-data value="src/org/openstreetmap/gui"/>
1916
<filter-data value="src/org/openstreetmap/josm/gui/mappaint/mapcss/parsergen"/>
20-
<filter-data value="src/org/tukaani"/>
2117
<filter-data value=".externalToolBuilders"/>
2218
<filter-data value=".settings"/>
2319
<filter-data value=".svn"/>

README

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ There are some third party libraries which are directly included in the source c
189189
src/org/openstreetmap/gui (svn external)
190190
-> http://svn.openstreetmap.org/applications/viewer/jmapviewer/
191191
* Apache commons compress: Support for bzip2 compression when opening files
192-
src/org/apache/commons/compress/compressors (svn external)
193192
-> https://github.com/apache/commons-compress
194193
* Apache commons validator: Improved validator routines
195194
src/org/openstreetmap/josm/data/validation/routines
@@ -198,7 +197,6 @@ There are some third party libraries which are directly included in the source c
198197
src/com/kitfox/svg
199198
-> https://github.com/blackears/svgSalamander
200199
* Metadata Extractor: Read EXIF Metadata of photos
201-
src/com/drew
202200
-> https://github.com/drewnoakes/metadata-extractor
203201
* Signpost: OAuth library
204202
src/oauth, src/com/google
@@ -207,11 +205,10 @@ There are some third party libraries which are directly included in the source c
207205
src/org/openstreetmap/josm/gui/MultiSplitLayout.java, MultiSplitPane.java
208206
-> https://github.com/floscher/multi-split
209207
-> https://community.oracle.com/docs/DOC-983539
210-
* swinghelper: Class CheckThreadViolationRepaintManager to find classpath violations
211-
src/org/jdesktop/swinghelper/debug/CheckThreadViolationRepaintManager.java
208+
* swinghelper: Class CheckThreadViolationRepaintManager to find EDT violations
209+
src/org/openstreetmap/josm/gui/util/CheckThreadViolationRepaintManager.java
212210
-> https://github.com/floscher/swinghelper
213211
* xz extractor
214-
src/org/tukaani
215212
-> https://tukaani.org/xz/java.html
216213
* OpeningHoursParser (MIT license)
217214
-> https://github.com/simonpoole/OpeningHoursParser

build.xml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ Build-Date: ${build.tstamp}
297297
destdir="${build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on" includeAntRuntime="false" createMissingPackageInfoClass="false">
298298
<!-- get rid of "internal proprietary API" warning -->
299299
<compilerarg value="-XDignore.symbol.file"/>
300-
<exclude name="org/apache/commons/compress/**"/>
301300
<exclude name="org/apache/commons/jcs/JCS.java"/>
302301
<exclude name="org/apache/commons/jcs/access/GroupCacheAccess.java"/>
303302
<exclude name="org/apache/commons/jcs/access/PartitionedCacheAccess.java"/>
@@ -318,7 +317,9 @@ Build-Date: ${build.tstamp}
318317
<exclude name="org/apache/commons/jcs/utils/net/**"/>
319318
<exclude name="org/apache/commons/jcs/utils/props/**"/>
320319
<exclude name="org/apache/commons/jcs/utils/servlet/**"/>
321-
<exclude name="org/apache/commons/logging/**"/>
320+
<classpath>
321+
<path refid="runtime.path"/>
322+
</classpath>
322323
</javac>
323324
</target>
324325
<target name="compile-jmapviewer" depends="init" description="Compiles JMapViewer">
@@ -1060,22 +1061,20 @@ Build-Date: ${build.tstamp}
10601061
<jar basedir="${build.dir}" level="${clevel}" destfile="${modules.dir}/josm-spi.jar" includes="org/openstreetmap/josm/spi/**/*.class"/>
10611062
<jar basedir="${build.dir}" level="${clevel}" destfile="${modules.dir}/josm-tools.jar" includes="org/openstreetmap/josm/tools/**/*.class"/>
10621063
<exec executable="jdeps" dir="${modules.dir}">
1063-
<arg line="-f 'java.*|org.xml.*|org.w3c.*|sun.*|com.*|oauth.*|org.apache.*|org.glassfish.*|org.jdesktop.*|org.openstreetmap.gui.*'"/>
1064+
<arg line="-f 'java.*|org.xml.*|org.w3c.*|sun.*|com.*|oauth.*|org.apache.*|org.glassfish.*|org.openstreetmap.gui.*'"/>
10641065
<arg line="-dotoutput dots *.jar"/>
10651066
</exec>
10661067
<exec executable="dot" dir="${modules.dir}/dots">
10671068
<arg line="-O -Tpng summary.dot"/>
10681069
</exec>
10691070
<move file="${modules.dir}/dots/summary.dot.png" tofile="${modules.dir}/josm-without-dependencies.png"/>
10701071
<!-- Direct dependencies -->
1071-
<jar basedir="${build.dir}" level="${clevel}" destfile="${modules.dir}/metadata-extractor.jar" includes="com/drew/**/*.class"/>
1072+
<copy todir="${modules.dir}" flatten="true">
1073+
<fileset refid="runtime.fileset" />
1074+
</copy>
10721075
<jar basedir="${build.dir}" level="${clevel}" destfile="${modules.dir}/svgSalamander.jar" includes="com/kitfox/**/*.class"/>
1073-
<jar basedir="${build.dir}" level="${clevel}" destfile="${modules.dir}/javax-json.jar" includes="javax/**/*.class"/>
10741076
<jar basedir="${build.dir}" level="${clevel}" destfile="${modules.dir}/oauth-signpost.jar" includes="oauth/**/*.class"/>
1075-
<jar basedir="${build.dir}" level="${clevel}" destfile="${modules.dir}/commons-compress.jar" includes="org/apache/commons/compress/**/*.class"/>
10761077
<jar basedir="${build.dir}" level="${clevel}" destfile="${modules.dir}/commons-jcs.jar" includes="org/apache/commons/jcs/**/*.class"/>
1077-
<jar basedir="${build.dir}" level="${clevel}" destfile="${modules.dir}/glassfish-json.jar" includes="org/glassfish/**/*.class"/>
1078-
<jar basedir="${build.dir}" level="${clevel}" destfile="${modules.dir}/jdesktop.jar" includes="org/jdesktop/**/*.class"/>
10791078
<jar basedir="${build.dir}" level="${clevel}" destfile="${modules.dir}/jmapviewer.jar" includes="org/openstreetmap/gui/**/*.class"/>
10801079
<exec executable="jdeps" dir="${modules.dir}">
10811080
<arg line="-f 'java.*|org.xml.*|org.w3c.*|sun.*|com.sun.*|com.google.*|org.tukaani.*|org.apache.commons.logging.*'"/>
@@ -1086,9 +1085,7 @@ Build-Date: ${build.tstamp}
10861085
</exec>
10871086
<move file="${modules.dir}/dots/summary.dot.png" tofile="${modules.dir}/josm-with-direct-dependencies.png"/>
10881087
<!-- All dependencies -->
1089-
<jar basedir="${build.dir}" level="${clevel}" destfile="${modules.dir}/commons-logging.jar" includes="org/apache/commons/logging/**/*.class"/>
10901088
<jar basedir="${build.dir}" level="${clevel}" destfile="${modules.dir}/google-gdata.jar" includes="com/google/**/*.class"/>
1091-
<jar basedir="${build.dir}" level="${clevel}" destfile="${modules.dir}/tukaani-xz.jar" includes="org/tukaani/**/*.class"/>
10921089
<exec executable="jdeps" dir="${modules.dir}">
10931090
<arg line="-dotoutput dots *.jar"/>
10941091
</exec>
@@ -1097,7 +1094,7 @@ Build-Date: ${build.tstamp}
10971094
</exec>
10981095
<move file="${modules.dir}/dots/summary.dot.png" tofile="${modules.dir}/josm-with-all-dependencies.png"/>
10991096
</target>
1100-
<target name="resolve" depends="init-ivy" unless="resolve.notRequired">
1097+
<target name="resolve" depends="init-ivy" unless="resolve.notRequired" description="Resolve Ivy dependencies">
11011098
<ivy:resolve keep="true"/>
11021099
<ivy:report todir="${tools.dir}/ivy-report" graph="false"/>
11031100
<ivy:cachepath pathid="compile.path" conf="compile"/>

src/org/openstreetmap/josm/gui/MainApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
import javax.swing.UIManager;
6363
import javax.swing.UnsupportedLookAndFeelException;
6464

65-
import org.jdesktop.swinghelper.debug.CheckThreadViolationRepaintManager;
6665
import org.openstreetmap.josm.actions.DeleteAction;
6766
import org.openstreetmap.josm.actions.JosmAction;
6867
import org.openstreetmap.josm.actions.OpenFileAction;
@@ -120,6 +119,7 @@
120119
import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference;
121120
import org.openstreetmap.josm.gui.preferences.server.ProxyPreference;
122121
import org.openstreetmap.josm.gui.progress.swing.ProgressMonitorExecutor;
122+
import org.openstreetmap.josm.gui.util.CheckThreadViolationRepaintManager;
123123
import org.openstreetmap.josm.gui.util.GuiHelper;
124124
import org.openstreetmap.josm.gui.util.RedirectInputMap;
125125
import org.openstreetmap.josm.gui.util.WindowGeometry;

src/org/jdesktop/swinghelper/debug/CheckThreadViolationRepaintManager.java renamed to src/org/openstreetmap/josm/gui/util/CheckThreadViolationRepaintManager.java

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1515
*/
1616

17-
package org.jdesktop.swinghelper.debug;
17+
package org.openstreetmap.josm.gui.util;
1818

1919
import java.lang.ref.WeakReference;
2020

2121
import javax.swing.JComponent;
2222
import javax.swing.RepaintManager;
2323
import javax.swing.SwingUtilities;
2424

25+
import org.openstreetmap.josm.tools.Logging;
26+
2527
/**
2628
* <p>This class is used to detect Event Dispatch Thread rule violations<br>
2729
* See <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html">How to Use Threads</a>
@@ -38,18 +40,8 @@
3840
* https://swinghelper.dev.java.net/
3941
*/
4042
public class CheckThreadViolationRepaintManager extends RepaintManager {
41-
// it is recommended to pass the complete check
42-
private boolean completeCheck = true;
4343
private WeakReference<JComponent> lastComponent;
4444

45-
public CheckThreadViolationRepaintManager(boolean completeCheck) {
46-
this.completeCheck = completeCheck;
47-
}
48-
49-
public CheckThreadViolationRepaintManager() {
50-
this(true);
51-
}
52-
5345
@Override
5446
public synchronized void addInvalidComponent(JComponent component) {
5547
checkThreadViolations(component);
@@ -63,16 +55,15 @@ public void addDirtyRegion(JComponent component, int x, int y, int w, int h) {
6355
}
6456

6557
private void checkThreadViolations(JComponent c) {
66-
if (!SwingUtilities.isEventDispatchThread() && (completeCheck || c.isShowing())) {
58+
if (!SwingUtilities.isEventDispatchThread()) {
6759
boolean repaint = false;
6860
boolean fromSwing = false;
6961
boolean imageUpdate = false;
7062
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
7163
for (StackTraceElement st : stackTrace) {
7264
if (repaint && st.getClassName().startsWith("javax.swing.") &&
73-
// for details see
74-
// https://swinghelper.dev.java.net/issues/show_bug.cgi?id=1
75-
!st.getClassName().startsWith("javax.swing.SwingWorker")) {
65+
// for details see https://swinghelper.dev.java.net/issues/show_bug.cgi?id=1
66+
!st.getClassName().startsWith("javax.swing.SwingWorker")) {
7667
fromSwing = true;
7768
}
7869
if (repaint && "imageUpdate".equals(st.getMethodName())) {
@@ -105,12 +96,12 @@ private void checkThreadViolations(JComponent c) {
10596
}
10697
}
10798

108-
protected void violationFound(JComponent c, StackTraceElement[] stackTrace) {
109-
System.out.println();
110-
System.out.println("EDT violation detected");
111-
System.out.println(c);
99+
protected static void violationFound(JComponent c, StackTraceElement[] stackTrace) {
100+
Logging.error("");
101+
Logging.error("EDT violation detected");
102+
Logging.error(c.toString());
112103
for (StackTraceElement st : stackTrace) {
113-
System.out.println("\tat " + st);
104+
Logging.error("\tat " + st);
114105
}
115106
}
116107
}

tools/checkstyle/josm_filters.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<suppress checks="." files="[\\/]tools[\\/]japicc[\\/]" />
2424
<suppress checks="." files="[\\/]tools[\\/]pmd[\\/]" />
2525
<suppress checks="HeaderCheck" files="josm[\\/]tools[\\/]commons[\\/]" />
26+
<suppress checks="HeaderCheck" files="CheckThreadViolationRepaintManager\.java" />
2627
<suppress checks="HeaderCheck" files="Ellipsoid\.java" />
2728
<suppress checks="HeaderCheck" files="NTV2GridShift\.java" />
2829
<suppress checks="HeaderCheck" files="NTV2GridShiftFile\.java" />

tools/spotbugs/josm-filter.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@
6262
<Match>
6363
<Class name="~org.glassfish.json.*" />
6464
</Match>
65-
<Match>
66-
<Class name="~org.jdesktop.swinghelper.debug.*" />
67-
</Match>
6865
<Match>
6966
<Class name="~org.openstreetmap.gui.jmapviewer.*" />
7067
</Match>

0 commit comments

Comments
 (0)