On Fri, 17 Sep 2004 11:02:50 +0200, Matthieu Casanova
<chocolat.mou@...> wrote:
> Hi, I think it would be nice if the Incremental search could change
> the color of the textfield in red for example when the text wasn't
> found.
> I modified a copy of org.gjt.sp.jedit.search.SearchBar (from the last
> update in cvs of course) to do that, it seems to work fine for me.
> Here is my modified file (it's the first time I post on this mailing
> list, is it the good way to report some ideas ?)
>
> Matthieu
I think the attached file was removed, so here is the changes in the
class. Only in the Timer that handle the incremental search ...
timer = new Timer(0,new ActionListener()
{
public void actionPerformed(ActionEvent evt)
{
if(!incrementalSearch(searchStart,searchReverse))
{
if(!incrementalSearch(
(searchReverse
? view.getBuffer().getLength()
: 0),searchReverse))
{
// not found at all.
find.setBackground(Color.red);
view.getStatus().setMessageAndClear(
jEdit.getProperty(
"view.status.search-not-found"));
} else {
find.setBackground(Color.white);
}
} else {
find.setBackground(Color.white);
}
}
});
|