Modify

Opened 4 years ago

Last modified 4 years ago

#18893 assigned enhancement

[Patch] OpeningHourTest highlight erroneous part in string

Reported by: simon04 Owned by: simon04
Priority: normal Milestone:
Component: Core validator Version:
Keywords: opening_hours highlight Cc: skyper, SimonPoole

Description

ticket:18892, skyper:

The messages should display the string with highlighted errors instead of the line and column
In JS, the messages displayed the string from the start to the position the error occurred but that does not work for multiple errors. See #18807

Attachments (2)

18893.patch (7.2 KB ) - added by simon04 4 years ago.
2020-03-08-192958_783x158_scrot.png (9.1 KB ) - added by simon04 4 years ago.

Download all attachments as: .zip

Change History (10)

by simon04, 4 years ago

Attachment: 18893.patch added

by simon04, 4 years ago

comment:1 by simon04, 4 years ago

Cc: SimonPoole added
Keywords: highlight added

Here's a draft, attachment:18893.patch

opening_hours=10:00-17:00; Jan-Mai,Nov-Dec Mo off; PH,SH Mo 09:00-17:00
opening_hours=Mo-Fr 7-19
opening_hours=Su,PH 10:00-12:00


However, the highlighting is off by one token.

@SimonPoole, maybe we shouldn't be using token.next when creating a OpeningHoursParseException in OpeningHoursParser.jj, but just token?

Last edited 4 years ago by simon04 (previous) (diff)

comment:2 by skyper, 4 years ago

Nice, but only highlight to the next separator e.g. space, comma or semi-colon.

comment:3 by simon04, 4 years ago

Milestone: 20.0320.04

comment:4 by simon04, 4 years ago

Milestone: 20.0420.05

comment:5 by Klumbumbus, 4 years ago

Milestone: 20.0520.05old

Milestone renamed

comment:6 by Klumbumbus, 4 years ago

Milestone: 20.05old20.05

comment:7 by simon04, 4 years ago

Milestone: 20.0520.06

comment:8 by simon04, 4 years ago

Milestone: 20.06

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain simon04.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from simon04 to the specified user. Next status will be 'new'.
Next status will be 'needinfo'. The owner will be changed from simon04 to simon04.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.