Community
Participate
Working Groups
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;
Your bug has been moved to triage, visit http://www.eclipse.org/swt/triage.php for more info.