Bug 86723 - [StyledText] Storing per-line data in styled text
Summary: [StyledText] Storing per-line data in styled text
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2005-02-25 18:29 EST by Prashant Deva CLA
Modified: 2017-07-13 06:48 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.