return false;
}
@Override
public void update(PseucoObservable obj, Object ... args) {
Highlighter hLiter= input.getHighlighter();
Highlighter.HighlightPainter painter= new DefaultHighlighter.DefaultHighlightPainter(Color.GREEN);
input.getHighlighter().removeAllHighlights();
String file= (String) args[0];
int line= (int) args[1];
int startPos= 0, endPos= 0;
String text= input.getText();
if (line == -1 || file == null)
return;
for (int i= 0; i < line; i++) {
startPos= text.indexOf('\n', startPos) + 1;
}
endPos= text.indexOf('\n', startPos) + 1;
try {
hLiter.addHighlight(startPos, endPos, painter);
} catch (BadLocationException e) {
// ignore it, but clear everything. This has to do with
// not knowing the actual pseuco file
input.getHighlighter().removeAllHighlights();
}