Opened 9 years ago
Closed 7 months ago
#11277 closed enhancement (worksforme)
Show the line number for syntax errors in preset files
Reported by: | Dakon | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | tested |
Keywords: | template_report, debug | Cc: |
Description (last modified by )
What steps will reproduce the problem?
- Create a custom
MapCSSXML preset file with syntax error - activate it in JOSM
- the error is printed, but no hint where in the file it is
What is the expected result?
A easy way to identify the exact point of the error should be printed, preferably the line number, or the XML hierarchy to the object.
What happens instead?
Only the direct anchestor node is shown, which can occur multiple times in the preset.
Please provide any additional information below. Attach a screenshot if possible.
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2015-03-30 01:30:55 Last Changed Author: stoecker Revision: 8159 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Relative URL: ^/trunk URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2015-03-29 14:37:50 +0200 (Sun, 29 Mar 2015) Last Changed Rev: 8159 Identification: JOSM/1.5 (8159 de) Linux openSUSE 13.1 (Bottle) (x86_64) Memory Usage: 407 MB / 910 MB (315 MB allocated, but free) Java version: 1.7.0_55, Oracle Corporation, OpenJDK 64-Bit Server VM Java package: java-1_7_0-openjdk:x86_64-1.7.0.55 Plugins: - OpeningHoursEditor (30962) - buildings_tools (30955) - geochat (31056) - imagery_offset_db (31056) - jna (30892) - log4j (30892) - native_password_manager (31061) - osmarender (30892) - pbf (31010) - poly (31056) - public_transport (30892) - reverter (30990) - terracer (30892) - undelete (30892) - utilsplugin2 (31040)
Attachments (0)
Change History (9)
follow-up: 8 comment:1 by , 9 years ago
comment:2 by , 9 years ago
you can check in the console or in the mappaint dialog by right clicking on the mappaint style and then choose info and errors Help/Dialog/MapPaint
follow-up: 4 comment:3 by , 9 years ago
On a terminal that is all I get (German version):
Fehler: Defekte Objektvorlage "maxspeed:tilting-Maxspeed of Used by tilting trains (km/h)" - Anzahl der Datenworte in 'display_values' und in 'values' müssen gleich sein
This is exactly where I'm looking at, since in mappaint dialog no errors of presets are shown.
comment:4 by , 9 years ago
Replying to Dakon:
in mappaint dialog no errors of presets are shown.
Yes, mappaint styles and presets are two different completely independent things. I thought you are talking about mappaint styles because you said "mapcss".
You're right the position of a preset syntax error is not printed in the console even in debug mode.
comment:5 by , 9 years ago
Description: | modified (diff) |
---|
comment:6 by , 9 years ago
Keywords: | debug added |
---|
comment:7 by , 9 years ago
Type: | defect → enhancement |
---|
comment:8 by , 9 years ago
Replying to skyper:
Please, start josm from a terminal and you get the line numbers.
Sorry, it is only the tagging-preset-tester plugin which tells you the line and character, atm.
comment:9 by , 7 months ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
I don't know when this was changed, but it is working now:
-
resources/data/defaultpresets.xml
IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 diff --git a/resources/data/defaultpresets.xml b/resources/data/defaultpresets.xml
a b 10 10 </chunk> 11 11 <chunk id="surface_smoothness"> 12 12 <reference ref="surface" /> 13 <combo key="smoothness" text="Smoothness" values_searchable="true" values_sort="false" >13 <combo key="smoothness" text="Smoothness" values_searchable="true" values_sort="false" foobar> 14 14 <list_entry value="excellent" short_description="Thin Rollers: rollerblade, skateboard" /> 15 15 <list_entry value="good" short_description="Thin Wheels: racing bike" /> 16 16 <list_entry value="intermediate" short_description="Wheels: city bike, wheelchair, scooter" />
produces
[Fatal Error] :13:102: Attribute name "foobar" associated with an element type "combo" must be followed by the ' = ' character.
Error syntax appears to be :line:column:
.
Please, start josm from a terminal and you get the line numbers.