Changeset 8509 in josm for trunk/src/org/openstreetmap/josm/tools/template_engine
- Timestamp:
- 2015-06-20T14:36:00+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools/template_engine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java
r8285 r8509 220 220 return new OrSet((ContextProvider)lhs, (ContextProvider)rhs); 221 221 else if (lhs instanceof ContextProvider) 222 throw new ParseError(tr("Error in search expression on position {0} - right side of or(|) expression must return set of primitives", searchExpressionPosition)); 222 throw new ParseError( 223 tr("Error in search expression on position {0} - right side of or(|) expression must return set of primitives", 224 searchExpressionPosition)); 223 225 else if (rhs instanceof ContextProvider) 224 throw new ParseError(tr("Error in search expression on position {0} - left side of or(|) expression must return set of primitives", searchExpressionPosition)); 226 throw new ParseError( 227 tr("Error in search expression on position {0} - left side of or(|) expression must return set of primitives", 228 searchExpressionPosition)); 225 229 else 226 230 return m; … … 228 232 Match match = transform(((Not) m).getMatch(), searchExpressionPosition); 229 233 if (match instanceof ContextProvider) 230 throw new ParseError(tr("Error in search expression on position {0} - not(-) cannot be used in this context", searchExpressionPosition)); 234 throw new ParseError( 235 tr("Error in search expression on position {0} - not(-) cannot be used in this context", 236 searchExpressionPosition)); 231 237 else 232 238 return m; … … 238 244 Match m = transform(match, searchExpressionPosition); 239 245 if (!(m instanceof ContextProvider)) 240 throw new ParseError(tr("Error in search expression on position {0} - expression must return different then current primitive", searchExpressionPosition)); 246 throw new ParseError( 247 tr("Error in search expression on position {0} - expression must return different then current primitive", 248 searchExpressionPosition)); 241 249 else { 242 250 context = (ContextProvider) m; -
trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateParser.java
r7937 r8509 89 89 } else { 90 90 try { 91 result.getEntries().add(new SearchExpressionCondition(SearchCompiler.compile(searchExpression.getText(), false, false), condition)); 91 result.getEntries().add(new SearchExpressionCondition( 92 SearchCompiler.compile(searchExpression.getText(), false, false), condition)); 92 93 } catch (org.openstreetmap.josm.actions.search.SearchCompiler.ParseError e) { 93 94 throw new ParseError(searchExpression.getPosition(), e);
Note:
See TracChangeset
for help on using the changeset viewer.