Bug 86723

Summary: [StyledText] Storing per-line data in styled text
Product: [Eclipse Project] Platform Reporter: Prashant Deva <prashant.deva>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: niraj.modi
Version: 3.1Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Prashant Deva CLA 2005-02-25 18:29:18 EST
The styled text widget or the jface text framework do not have any mechanism to
store per-line data. 

Things like ILineTracker allow one to keep updated with information about lines
itself, but if we want to store data per lines, for that we have to implement
our own mechanism currently.

Swing allows per line data by providing classes such as BlockElement.

Per line data is useful for many things, like storing the state of the lexer,
flags indicating breakpoints, bookmarks,etc.

To do all this currently, we have to get a offset,length pair and then keep
updating the info with it manually with every text change. 
But it would be real nice if we could do something like this -

if(line.get("hasBreakpoint")==true)
   line.background=Color.BROWN;
Comment 1 Felipe Heidrich CLA 2009-08-19 08:41:45 EDT
Your bug has been moved to triage, visit http://www.eclipse.org/swt/triage.php for more info.