mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
Theme Editor:
- change border color of find field to red if noting found/matches - update search match highlighting after reloading file on external change
This commit is contained in:
@@ -133,7 +133,7 @@ class FlatFindReplaceBar
|
||||
findOrMarkAll( true );
|
||||
}
|
||||
|
||||
private void markAll() {
|
||||
void markAll() {
|
||||
findOrMarkAll( false );
|
||||
}
|
||||
|
||||
@@ -227,6 +227,8 @@ class FlatFindReplaceBar
|
||||
private void updateMatchesLabel( SearchResult result, boolean replace ) {
|
||||
matchesLabel.setText( result.getMarkedCount() + " matches" );
|
||||
replaceMatchesLabel.setText( replace ? result.getCount() + " matches replaced" : null );
|
||||
|
||||
findField.setOutline( result.getMarkedCount() > 0 ? null : "error" );
|
||||
}
|
||||
|
||||
private void notifyEditorAction( String actionKey ) {
|
||||
|
||||
@@ -224,6 +224,9 @@ class FlatThemeEditorPane
|
||||
textArea.reload();
|
||||
|
||||
textArea.select( selectionStart, selectionEnd );
|
||||
|
||||
if( findReplaceBar != null && findReplaceBar.isShowing() )
|
||||
findReplaceBar.markAll();
|
||||
} catch( IOException ex ) {
|
||||
JOptionPane.showMessageDialog( this,
|
||||
"Failed to reload '" + textArea.getFileName() + "'\n\nReason: " + ex.getMessage(),
|
||||
|
||||
Reference in New Issue
Block a user