Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 261861 - [Markers] QuickFix dialog doesn't show Location properly
Summary: [Markers] QuickFix dialog doesn't show Location properly
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.5 M5   Edit
Assignee: Hitesh CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-21 12:08 EST by Javier Laureano CLA
Modified: 2009-06-01 14:28 EDT (History)
1 user (show)

See Also:


Attachments
patch (1.67 KB, patch)
2009-01-22 05:02 EST, Hitesh CLA
emoffatt: iplog+
Details | Diff
Test Snippet (8.86 KB, application/zip)
2009-01-27 05:56 EST, Hitesh CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Javier Laureano CLA 2009-01-21 12:08:47 EST
Build ID: M20080911-1700

In the Problems view I have an error which 'Location' is the name of a file instead of a line number.

If I open the QuickFix window it displays 'Unknown' in the 'Location' column instead of the file name, as it is showed in the problems view.

I think the error is in org.eclipse.ui.internal.views.markers.QuickFixPage class.
There, in createMarkerTable(Composite control) method, when creating a new ITableLabelProvider, you are getting the column text using IMarker.LINE_NUMBER instead of IMarker.LOCATION, which I guess would be the correct attribute.
Comment 1 Eric Moffatt CLA 2009-01-21 14:32:23 EST
Hitesh, send this back if it's not a Markers issue...
Comment 2 Hitesh CLA 2009-01-22 04:59:18 EST
(In reply to comment #0)
> Build ID: M20080911-1700
> 
> In the Problems view I have an error which 'Location' is the name of a file
> instead of a line number.
> 
This is the correct behaviour. If a marker has IMarker.LOCATION attribute set then this is used in preference to IMarker.LINE_NUMBER for display in location field of the problems view. The IMarker.LOCATION is used in situations where a line number would not make sense, for example in a visual editor.

If  you want the line number to be displayed for location, only set the LINE_NUMBER attribute while creating the marker. 

> If I open the QuickFix window it displays 'Unknown' in the 'Location' column
> instead of the file name, as it is showed in the problems view.
> 
There is a slight difference in how the location is displayed in the quickfix page and the view.
Comment 3 Hitesh CLA 2009-01-22 05:02:45 EST
Created attachment 123352 [details]
patch

> 
> There is a slight difference in how the location is displayed in the quickfix
> page and the view.
> 
Patch to fix this.
Comment 4 Eric Moffatt CLA 2009-01-22 13:56:41 EST
Thanks Hitesh, I'll have a look at this on Monday (I'm off tomorrow and we're testing 3.4.2 today).
Comment 5 Eric Moffatt CLA 2009-01-26 13:43:36 EST
Committed in >20090126. Applied the patch.

Hitesh, what are you using to test this? I wasn't able to generate one of these types of marker so I could do the before/after tests. I committed without this because the code change is simple and obvious.
Comment 6 Eric Moffatt CLA 2009-01-26 13:43:57 EST
Setting milestone
Comment 7 Hitesh CLA 2009-01-27 05:56:11 EST
Created attachment 123860 [details]
Test Snippet

Used attached snippet to create the marker.
Comment 8 Hitesh CLA 2009-01-27 05:57:06 EST
Verified in I20090126-1800.