Opened 7 years ago

Last modified 2 years ago

#15182 new enhancement

Standalone JOSM validator — at Version 21

Reported by: Don-vip Owned by: Don-vip
Priority: major Milestone: Longterm
Component: Core validator Version:
Keywords: modularization Cc:

Description (last modified by Don-vip)

During Java 9 compatibility effort (#11924) I wondered if modularization could be applied to JOSM, which currently is a big spaghetti-based monolithic jar.

A clean modular architecture would be a huge task (don't know if it would really be possible at all, as we have a lot of interwoven dependencies) but I'd like to see if we can achieve a more affordable intermediate state, where we could build a standalone version of JOSM validator that could be run as follows:

java -jar josm-validator.jar data.osm -o warnings.xml

This jar having no dependency on AWT/Swing/JavaFX. This way it could be run for example by a Java 9 server VM which does not include the java.desktop module.

It would not change anything on JOSM editor except probably some API changes, but as little as possible.

#14704 is a prerequisite.

Change History (21)

comment:1 by Don-vip, 7 years ago

In 12620/josm:

see #15182 - deprecate all Main logging methods and introduce suitable replacements in Logging for most of them

comment:2 by Don-vip, 7 years ago

In 12621/josm:

see #15182 - do not print stacktrace by default for debug/trace levels, as before

comment:3 by Don-vip, 7 years ago

In 12624/josm:

see #15182 - remove unused imports

comment:4 by Don-vip, 7 years ago

In 12627/josm:

see #15182 - remove unneeded imports to Main

comment:5 by Don-vip, 7 years ago

In 12628/josm:

see #15182 - build.xml - define constants for values repeated multiple times (java version, jar filename)

comment:6 by Don-vip, 7 years ago

Description: modified (diff)

comment:7 by Don-vip, 7 years ago

In 12629/josm:

see #15182 - move GUI initialization stuff from Main (abstract) to gui.MainApplication

comment:8 by stoecker, 7 years ago

Hmm, wouldn't it be more "satisfactory" to first make JOSM callable as standalone validator at all before you make it fully encapsulated? Even with many useless internal dependencies that would be a useful application.

comment:9 by Don-vip, 7 years ago

sure!

comment:10 by Don-vip, 7 years ago

#14704 is a prerequisite :)

comment:11 by Don-vip, 7 years ago

In 12630/josm:

see #15182 - deprecate Main.map and Main.isDisplayingMapView(). Replacements: gui.MainApplication.getMap() / gui.MainApplication.isDisplayingMapView()

comment:12 by Don-vip, 7 years ago

In 12631/josm:

see #15182 - remove last calls to Main.map

comment:13 by Don-vip, 7 years ago

In 12632/josm:

see #15182 - fix unit tests

comment:14 by Don-vip, 7 years ago

In 12633/josm:

see #15182 - move GUI program arguments management from Main to gui.MainApplication

comment:15 by Don-vip, 7 years ago

In 12634/josm:

see #15182 - deprecate Main.worker, replace it by gui.MainApplication.worker + code refactoring to make sure only editor packages use it

comment:16 by Don-vip, 7 years ago

In 12635/josm:

see #15182 - checkstyle

comment:17 by Don-vip, 7 years ago

In 12636/josm:

see #15182 - deprecate Main.getLayerManager(). Replacement: gui.MainApplication.getLayerManager()

comment:18 by Don-vip, 7 years ago

In 12637/josm:

see #15182 - deprecate Main.toolbar. Replacement: gui.MainApplication.getToolbar()

comment:19 by Don-vip, 7 years ago

In 12638/josm:

see #15182 - remove Main.currentProgressMonitor. Replacement: PleaseWaitProgressMonitor.getCurrent()

comment:20 by Don-vip, 7 years ago

In 12639/josm:

see #15182 - deprecate shortcut handling and mapframe listener methods in Main. Replacement: same methods in gui.MainApplication

comment:21 by Don-vip, 7 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.