Bug 369442 - Allow document-relative problem indices in validation API
Summary: Allow document-relative problem indices in validation API
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Client (show other bugs)
Version: 0.4   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 4.0 M1   Edit
Assignee: Mark Macdonald CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2012-01-23 15:10 EST by Mark Macdonald CLA
Modified: 2013-09-20 15:14 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Macdonald CLA 2012-01-23 15:10:38 EST
Orion I20120122-2230

The orion.edit.validator service [1] expects problem locations to be given as a line number plus 'start' and 'end' offsets into the line.

This is rather inconvenient because it forces validators to track line numbers, which sometimes requires an extra step if you're getting output from a tool that ignores line breaks.

We should allow the 'line' parameter to be omitted, which should cause 'start', 'end' to be interpreted as document offsets.

[1] http://wiki.eclipse.org/Orion/Documentation/Developer_Guide/Plugging_into_the_editor#orion.edit.validator
Comment 1 Mark Macdonald CLA 2013-07-17 17:21:12 EDT
This is now supported:
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=6c48a71

Updated the docs:
http://wiki.eclipse.org/Orion/Documentation/Developer_Guide/Plugging_into_the_editor#orion.edit.validator

Also notable is that using document relative offsets allows you to generate a problem that spans several lines.