mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-13 07:17:13 -06:00
Theme Editor:
- save/restore selection when reloading file (if changed outside) - select all text in find field when pressing Ctrl+F - use lighter color for operators (e.g. '=')
This commit is contained in:
@@ -93,6 +93,8 @@ class FlatFindReplaceBar
|
|||||||
String selectedText = textArea.getSelectedText();
|
String selectedText = textArea.getSelectedText();
|
||||||
if( !StringUtils.isEmpty( selectedText ) && selectedText.indexOf( '\n' ) < 0 )
|
if( !StringUtils.isEmpty( selectedText ) && selectedText.indexOf( '\n' ) < 0 )
|
||||||
findField.setText( selectedText );
|
findField.setText( selectedText );
|
||||||
|
else
|
||||||
|
findField.selectAll();
|
||||||
|
|
||||||
// if showing bar, highlight matches in editor
|
// if showing bar, highlight matches in editor
|
||||||
// (not invoking this from addNotify() because this would break the slide-in animation)
|
// (not invoking this from addNotify() because this would break the slide-in animation)
|
||||||
|
|||||||
@@ -185,7 +185,12 @@ class FlatThemeEditorPane
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
int selectionStart = textArea.getSelectionStart();
|
||||||
|
int selectionEnd = textArea.getSelectionEnd();
|
||||||
|
|
||||||
textArea.reload();
|
textArea.reload();
|
||||||
|
|
||||||
|
textArea.select( selectionStart, selectionEnd );
|
||||||
} catch( IOException ex ) {
|
} catch( IOException ex ) {
|
||||||
JOptionPane.showMessageDialog( this,
|
JOptionPane.showMessageDialog( this,
|
||||||
"Failed to reload '" + textArea.getFileName() + "'\n\nReason: " + ex.getMessage(),
|
"Failed to reload '" + textArea.getFileName() + "'\n\nReason: " + ex.getMessage(),
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
<style token="MARKUP_CDATA" fg="cc6600"/>
|
<style token="MARKUP_CDATA" fg="cc6600"/>
|
||||||
<style token="MARKUP_CDATA_DELIMITER" fg="008080"/>
|
<style token="MARKUP_CDATA_DELIMITER" fg="008080"/>
|
||||||
<style token="MARKUP_ENTITY_REFERENCE" fg="008000"/>
|
<style token="MARKUP_ENTITY_REFERENCE" fg="008000"/>
|
||||||
<style token="OPERATOR" fg="000000"/>
|
<style token="OPERATOR" fg="888888"/>
|
||||||
<style token="PREPROCESSOR" fg="808080"/>
|
<style token="PREPROCESSOR" fg="808080"/>
|
||||||
<style token="REGEX" fg="008040"/>
|
<style token="REGEX" fg="008040"/>
|
||||||
<style token="SEPARATOR" fg="ff0000"/>
|
<style token="SEPARATOR" fg="ff0000"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user