Bug 160802 - [Markers] Problems View, Errors: must copy whole line
Summary: [Markers] Problems View, Errors: must copy whole line
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 4.7 M3   Edit
Assignee: Martin Karpisek CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted, noteworthy
: 244965 (view as bug list)
Depends on: 162505 506240 506698
Blocks:
  Show dependency tree
 
Reported: 2006-10-13 01:01 EDT by John J. Barton CLA
Modified: 2016-10-28 07:04 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John J. Barton CLA 2006-10-13 01:01:12 EDT
"Problems" View panel, with an error lists.  Try to select text.  Only the entire line can be selects. Control-C gives:

Severity and Description	Path	Resource	Location	Creation Time	Id
Referenced file contains errors (http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd).  For more information, right click on the message and select "Show Details..."	bang/WEB-INF	web.xml	line 1	1160026545692	1520

So every time you want to look up an error you have to muck around with pasted text.

1) The text of the error should be selectable at the character level.  
2) The copy shoudl not have the extra garbage text preceding it.

Eclipse SDK

Version: 3.2.0
Build id: M20060629-1905
Comment 1 Tod Creasey CLA 2006-10-13 10:55:54 EDT
Please feel free to submit a patch if you have a suggested implementation
Comment 2 John J. Barton CLA 2006-10-14 02:12:17 EDT
I think the second problem can be solved by deleting the following lines from
org.eclipse.ui.views.markers.internal.ActionCopyMarker.createMarkerReport():
		// create header
		for (int i = 0; i < properties.length; i++) {
			report.append(properties[i].getDescription());
			if (i == properties.length - 1) {
				report.append(NEWLINE);
			} else {
				report.append(DELIMITER);
			}
		}
A partial workaround for the first problem is to right click on the row in the Problem view and select properties.  The values in the Properties dialog work correctly for selection and copy.  To fix the first problem the UI elements inside the TreeViewer used by ProblemView would have to be replaced by UI elements like those in the Properties dialog.
Comment 3 John J. Barton CLA 2006-10-14 14:06:57 EDT
Unfortunately the design of ProblemView makes proper clipboard integration difficult. ProblemView isA MarkerView isA TableView.  TableView might be more accurately described as ColumnizedAttributedTreeView: The view is visually like a table but behaves like a tree view.  The columns of the TableView are not individually selectable and this seems to be a consequence of its use of a TreeViewer.  Object selection within the TableView is TreeItem selection, and these items are rows not cells.  That's why the copy gives the whole row.

One possible direction that would seem most consistent with eclipse would replace TableView's TreeViewer with a TableViewer, which has CellEditor-s with individual Copy actions. I don't know if this would allow character level selection.

A different direction would create a simplier View for Problems closer to a Console: lines of text not partitioned into columns.  For 80% (or 99%?) of the uses of ProblemView, this simple view would be superior.  It would have the same line oriented selection as ProblemView but the text of the Marker would be easily selected at the character level. It would also eliminate the annoying column resize work required by the current ProblemView in favor of a horizontal slider. (Also very annoying, but my guess is that 99% of the time users only need the error text, the rest of the info is given by clicking on the problem and having the IDE position the editor).
Comment 4 Susan McCourt CLA 2009-07-15 12:17:40 EDT
"As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009"
Comment 5 Martin Karpisek CLA 2016-10-06 12:09:40 EDT
submitted patch for review: https://git.eclipse.org/r/82656
Comment 6 Lars Vogel CLA 2016-10-07 08:39:18 EDT
*** Bug 244965 has been marked as a duplicate of this bug. ***
Comment 8 Lars Vogel CLA 2016-10-11 02:40:44 EDT
Thanks Martin, can you also add an entry to the N&N M3?
Comment 9 Eclipse Genie CLA 2016-10-11 12:15:14 EDT
New Gerrit change created: https://git.eclipse.org/r/82961
Comment 10 Martin Karpisek CLA 2016-10-11 12:18:34 EDT
added note to 4.7 M3 N&N
Comment 12 Lars Vogel CLA 2016-10-12 15:45:01 EDT
Thanks Martin