Ticket #19648: josm_19648.patch
| File josm_19648.patch, 2.3 KB (added by , 4 years ago) |
|---|
-
src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
7 7 PARSER_BEGIN(MapCSSParser) 8 8 package org.openstreetmap.josm.gui.mappaint.mapcss.parsergen; 9 9 10 import static org.openstreetmap.josm.tools.I18n.tr; 11 10 12 import java.io.InputStream; 11 13 import java.io.Reader; 12 14 import java.util.ArrayList; … … 14 16 import java.util.Collections; 15 17 import java.util.List; 16 18 19 import javax.swing.JOptionPane; 20 17 21 import org.openstreetmap.josm.data.preferences.NamedColorProperty; 22 import org.openstreetmap.josm.gui.MainApplication; 18 23 import org.openstreetmap.josm.gui.mappaint.Keyword; 19 24 import org.openstreetmap.josm.gui.mappaint.Range; 20 25 import org.openstreetmap.josm.gui.mappaint.mapcss.Condition; … … 36 41 import org.openstreetmap.josm.gui.mappaint.mapcss.Selector.GeneralSelector; 37 42 import org.openstreetmap.josm.gui.mappaint.mapcss.Selector.LinkSelector; 38 43 import org.openstreetmap.josm.gui.mappaint.mapcss.Subpart; 44 import org.openstreetmap.josm.gui.util.GuiHelper; 39 45 import org.openstreetmap.josm.tools.ColorHelper; 40 46 import org.openstreetmap.josm.tools.JosmRuntimeException; 41 47 import org.openstreetmap.josm.tools.Logging; … … 78 84 this.idx = idx; 79 85 } 80 86 } 81 87 82 88 /** 83 89 * Constructor which initializes the parser with a certain lexical state. 84 90 * @param in input … … 1150 1156 if (token.kind == EOF) 1151 1157 throw new ParseException("Reached end of file while parsing"); 1152 1158 1153 Exception e = null;1159 Exception e; 1154 1160 ParseException pe = generateParseException(); 1155 1161 1156 1162 if (me != null) { … … 1164 1170 1165 1171 Logging.error("Skipping to the next rule, because of an error:"); 1166 1172 Logging.error(e); 1173 1174 GuiHelper.runInEDT(new Runnable() { 1175 @Override 1176 public void run() { 1177 JOptionPane.showMessageDialog( 1178 MainApplication.getMainFrame(), 1179 e.getMessage(), 1180 tr("MapCSS rule parsing error"), 1181 JOptionPane.ERROR_MESSAGE); 1182 } 1183 }); 1184 1167 1185 if (sheet != null) { 1168 1186 sheet.logError(e); 1169 1187 }
