Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor search revamp: more options and enhanced navigation #12798

Merged
Show file tree
Hide file tree
Changes from 96 commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
b0e0267
More efficient Regex search with improved user experience.
riverwanderer Oct 2, 2023
4bdbca6
PMD.
riverwanderer Oct 2, 2023
a2acbda
Fix problem with getNumMatches() ?
riverwanderer Oct 2, 2023
b6bc8e6
Debugging
riverwanderer Oct 3, 2023
40c8f9f
Debugging
riverwanderer Oct 3, 2023
a6fbe96
Regex Pattern parameter passing now consistent.
riverwanderer Oct 3, 2023
108ecf2
Debugging
riverwanderer Oct 3, 2023
2ba819f
Debugging
riverwanderer Oct 3, 2023
2707ccf
PMD
riverwanderer Oct 3, 2023
509a71c
Revert to v3.7.1 parameter lists (regexPattern is global).
riverwanderer Oct 3, 2023
86eccd9
Debugging.
riverwanderer Oct 3, 2023
05c8368
Debugging.
riverwanderer Oct 4, 2023
90e95d4
Debugging.
riverwanderer Oct 4, 2023
8d6a5b9
Remove debugging code. Amend doc and message (adds Regex specific hea…
riverwanderer Oct 4, 2023
5e8f6ec
Merge remote-tracking branch 'origin/editor-search-regex-revamp' into…
riverwanderer Oct 4, 2023
10d3872
Restore accidentally deleted word.
riverwanderer Oct 4, 2023
6bcd19a
Restore accidentally deleted word. Message debugging & highlighting. …
riverwanderer Oct 4, 2023
d9638b1
chatter.show does not do colour controls. When announcing match count…
riverwanderer Oct 4, 2023
3462a7a
debug default regex search. Remove bold tag for now as it wasn't work…
riverwanderer Oct 4, 2023
05437bc
replace regex checkbox with 3 options in a dropdown list.
riverwanderer Oct 5, 2023
da3afa5
debug default regex search. Remove bold tag for now as it wasn't work…
riverwanderer Oct 5, 2023
d7c7a78
Merge remote-tracking branch 'origin/editor-search-regex-revamp-dropd…
riverwanderer Oct 7, 2023
7a4e44e
Debugging.
riverwanderer Oct 7, 2023
8ba8a60
Debugging.
riverwanderer Oct 7, 2023
ae336d9
PMD.
riverwanderer Oct 7, 2023
dea07e3
Properties
riverwanderer Oct 7, 2023
a8a7f51
Dropdown using JComboBox.
riverwanderer Oct 7, 2023
cfcb2fd
Merge remote-tracking branch 'origin/editor-search-regex-revamp-dropd…
riverwanderer Oct 8, 2023
9ad3a72
Switch to radio buttons for search type.
riverwanderer Oct 8, 2023
30431e8
Switch to radio buttons for search type.
riverwanderer Oct 8, 2023
5eaa369
Merge remote-tracking branch 'origin/editor-search-regex-revamp-radio…
riverwanderer Oct 8, 2023
98bea7b
Merge branch 'master' of https://github.com/riverwanderer/vassal into…
riverwanderer Oct 8, 2023
257a83a
Group radio buttons on a line.
riverwanderer Oct 9, 2023
c95632c
PMD
riverwanderer Oct 9, 2023
9cf5842
PMD
riverwanderer Oct 9, 2023
043db41
Merge remote-tracking branch 'origin/editor-search-regex-revamp-radio…
riverwanderer Oct 9, 2023
3989d76
documentation.
riverwanderer Oct 9, 2023
ea2d681
documentation.
riverwanderer Oct 9, 2023
f5771e0
documentation image fixes.
riverwanderer Oct 9, 2023
ad116b5
Highlight found text and track component count.
riverwanderer Oct 9, 2023
79ad03f
Highlight found text and track component count.
riverwanderer Oct 9, 2023
1b831d4
Merge remote-tracking branch 'origin/editor-search-regex-revamp-radio…
riverwanderer Oct 9, 2023
8161329
PMD / shift from searchString to regexPattern for internals.
riverwanderer Oct 9, 2023
69b74e4
Reset parameters at module start. Message count fix.
riverwanderer Oct 10, 2023
e26707e
Reset parameters at module start. Provide a button to scroll back in …
riverwanderer Oct 11, 2023
1d80d30
PMDs
riverwanderer Oct 11, 2023
fb7eb8e
PMD
riverwanderer Oct 11, 2023
03cacdf
test.
riverwanderer Oct 11, 2023
f7f3f62
Debugged highlighting.
riverwanderer Oct 11, 2023
1628683
Merge remote-tracking branch 'origin/editor-search-regex-revamp-radio…
riverwanderer Oct 11, 2023
91b942d
test PMD issue.
riverwanderer Oct 11, 2023
c707065
PMD fix ?
riverwanderer Oct 11, 2023
26d7b0c
"Prev" button is disabled if search parameters are changed. Re-enable…
riverwanderer Oct 12, 2023
ab488f4
PMD
riverwanderer Oct 12, 2023
07cb4a5
Doc images.
riverwanderer Oct 12, 2023
cd93d4c
Don't have an actionlistener on the search text field as it interfere…
riverwanderer Oct 12, 2023
6b5f385
Sample output added to doc.
riverwanderer Oct 12, 2023
2af02ec
Page Up & Page Down keys now working.
riverwanderer Oct 12, 2023
07d4fcc
PMDs
riverwanderer Oct 12, 2023
a2593aa
Highlighting - handle contiguous repeat matches without duplication i…
riverwanderer Oct 13, 2023
3cc8ea4
Patch for Help Menu items not being reported. Conform Advanced Search…
riverwanderer Oct 13, 2023
1293478
PMDs
riverwanderer Oct 13, 2023
77f4136
Fixed & improved solution for maintaining search item numbers from an…
riverwanderer Oct 14, 2023
87f4d6b
Style checked.
riverwanderer Oct 14, 2023
e9b62fe
PMDs
riverwanderer Oct 14, 2023
edb34e3
Doc tweaks for "advanced" mode.
riverwanderer Oct 14, 2023
105c42c
Search clarification and cross-link.
riverwanderer Oct 16, 2023
6ed2a6d
Restore previous default (component search only). Add one click optio…
riverwanderer Oct 16, 2023
9a67bef
Try again to replace Advanced checkbox with radiobuttons.
riverwanderer Oct 16, 2023
7477a92
Try again to replace Advanced checkbox with radiobuttons.
riverwanderer Oct 16, 2023
fd9533b
Try again to replace Advanced checkbox with radiobuttons.
riverwanderer Oct 16, 2023
2fa9c3c
Try again to replace Advanced checkbox with radiobuttons. Ref manual …
riverwanderer Oct 16, 2023
d22371f
Restore basic search (not going deep). Fix ordering issue that was pr…
riverwanderer Oct 20, 2023
b45f08d
Restore basic search (not going deep). Fix ordering issue that was pr…
riverwanderer Oct 20, 2023
75f8e73
Merge remote-tracking branch 'origin/editor-search-regex-revamp-radio…
riverwanderer Oct 20, 2023
0f22733
Fix piece BasicName triggering a search find but not appearing in cha…
riverwanderer Oct 20, 2023
e41c572
Doc image sub-title formatting fix.
riverwanderer Oct 20, 2023
da0935f
Debbugging backtracking. Restore Basic Piece reporting. Highlight nam…
riverwanderer Oct 22, 2023
38443c1
PND & identify BasicPiece image.
riverwanderer Oct 22, 2023
8fdd9cd
Bonus info for Basic Piece trait hits.
riverwanderer Oct 22, 2023
2781142
Bonus output for Basic Piece trait hits.
riverwanderer Oct 22, 2023
e9de705
Merge branch 'master' of https://github.com/riverwanderer/vassal into…
riverwanderer Oct 27, 2023
1844f79
Don't highlight headings after all.
riverwanderer Oct 27, 2023
cae75d3
Fix [Module] handling in search, initial search position & some minor…
riverwanderer Oct 28, 2023
474db07
PMDs
riverwanderer Oct 28, 2023
6975a5a
Merge branch 'linenumbers_clean' of https://github.com/riverwanderer/…
riverwanderer Oct 29, 2023
196e5ae
Merge branch 'master' of https://github.com/riverwanderer/vassal into…
riverwanderer Oct 31, 2023
76f7114
Search position tracking resilient to user selecting another item in …
riverwanderer Nov 7, 2023
fe9e2f2
getBookmark()
riverwanderer Nov 8, 2023
436425a
checkstyled.
riverwanderer Nov 8, 2023
ea8acb8
PMD.
riverwanderer Nov 8, 2023
2966c46
Back-tracking fix to PMD fix. Clarify some naming.
riverwanderer Nov 8, 2023
4bde784
Merge branch 'master' of https://github.com/riverwanderer/vassal into…
riverwanderer Nov 8, 2023
448486d
Merge branch 'master' of https://github.com/riverwanderer/vassal into…
riverwanderer Nov 8, 2023
739c1dd
Merge branch 'editor-search-revamp-missingfilter' of https://github.c…
riverwanderer Nov 12, 2023
10c7fe7
Correct a string builder mis-use.
riverwanderer Nov 15, 2023
579c6f6
Merge branch 'master' of https://github.com/riverwanderer/vassal into…
riverwanderer Dec 7, 2023
ab19c16
Address code review feedback and merge in master updates.
riverwanderer Dec 7, 2023
5f19602
Caught another qualified exception code.
riverwanderer Dec 7, 2023
56c1e36
Merge branch 'master' of https://github.com/riverwanderer/vassal into…
riverwanderer Dec 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,111 changes: 832 additions & 279 deletions vassal-app/src/main/java/VASSAL/configure/ConfigureTree.java

Large diffs are not rendered by default.

43 changes: 30 additions & 13 deletions vassal-app/src/main/resources/VASSAL/i18n/Editor.properties
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,38 @@ Editor.save=Save
Editor.save_as=Save as...
Editor.search=Search...
Editor.search_string=String to find
Editor.search_next=Find next
Editor.search_prev=Prev
Editor.search_prevTip=PgUp
Editor.search_next=Next
Editor.search_nextTip=PgDn
Editor.search_case=Exact case
Editor.search_regex=Regular Expression
Editor.search_advanced=Advanced search
Editor.search_names=Match names
Editor.search_types=Match [Class names]
Editor.search_traits=Match trait descriptions
Editor.search_expressions=Match expressions and fields
Editor.search_properties=Match property names
Editor.search_keys=Match key commands
Editor.search_menus=Match UI text
Editor.search_messages=Match message formats
Editor.search_optLabel=Type:
Editor.search_optRegex=Regular Expression
Editor.search_optNormal=Normal
Editor.search_optWord=Start of word
Editor.search_scopeLabel=Scope:
Editor.search_simple=Basic
Editor.search_full=Full
Editor.search_advanced=Advanced Filters
Editor.search_filters=Match on:
Editor.search_names=Component names & descriptions
Editor.search_types=[Class names]
Editor.search_traits=Trait descriptions
Editor.search_expressions=Expressions and fields
Editor.search_properties=Property names
Editor.search_matches=%1$s. Matches in
Editor.search_keys=Key commands
Editor.search_menus=UI text
Editor.search_messages=Message formats
Editor.search_all_off=Warning - all field flags unchecked - turning on 'Match Names'
Editor.search_none_found=Search string not found:
Editor.search_count= Matches found for search string:
Editor.search_none_found=Search string not found: %1$s
Editor.search_noWord_match=No match found for word search starting %1$s
Editor.search_noRegex_match=No match found for Regular Expression %1$s
Editor.search_count=%1$s items match on search string %2$s
Editor.search_countRegex=%1$s items match on Regular Expression %2$s
Editor.search_countWord=%1$s items match at a word boundary starting %2$s
Editor.search_badRegex=Search string is not a valid Regular Expression: %1$s
Editor.search_badWord=Pattern Syntax Error in Editor Search word start: %1$s
Editor.edit_extension=Edit extension
Editor.new_extension=New extension
Editor.cant_cut_ancestor_to_child=Can't paste a cut ancestor to its own child.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@

VASSAL's Module Editor has a powerful Search facility to find components and pieces in a number of different ways.

The default search is to search for everything, but the Advanced Searh options can be used to limit the type of search performed.
The default scope is a simple search that targets the names and descriptions of module components. Options can be used to search through all module data or to limit the search to data types of interest. Special search types offer additional flexibility.

Initiate a search with the "Next" button [PgDn] and repeat this to advance the output item by item. The "Prev" button [PgUp] allows you to return to the previous item.

Search output indicates the number of items (traits and components) found and details each in order, positioning the editor on the found item. Traits are reported with a prefix indicating the line number of the trait within the found item (sample output below). Matched strings are high-lighted.

Note that a search will continue from the last item found and will wrap-around, until you restart the editing session.

'''''

Expand All @@ -18,32 +24,33 @@ The default search is to search for everything, but the Advanced Searh options c
[width="100%",cols="50%a,^50%a",]
|===
a|

===== Type
Search may be normal, start of word or https://en.wikipedia.org/wiki/Regular_expression[Regular Expression]. "Start of word" uses a pre-formatted regular expression to find matches on words or phrases starting with the search string.

===== Exact Case
Force an Exact case search (i.e. abc is different to ABC).

===== Regular Expression
The specified search string is a https://en.wikipedia.org/wiki/Regular_expression[Regular Expression]. In the simplest example, a search for ABC will find matches that equate wholly to "ABC", and lower or mixed case variants (unless _Exact Case_ is checked as well).

===== Advanced Search
Show the advanced search options. All search options are on in a simple search. The advanced options allow you to turn off options to narrow your search.
===== Scope
Choose from a basic search of component and piece names, a full search of all supported data or use "advanced filters" to select specific data types. Note that there are a few data fields that search does not check.

===== Match names
Match against the names of components or pieces.
===== Match component names & descriptions
Match against the names and descriptions of components and pieces.

===== Match [class names]
Match against the Java Class Name of components.
===== Match [Class names]
Match against the Java Class Name of components (in the editor these are the names in square brackets).

===== Match trait descriptions
Match against text recorded in the description fields of traits.

===== Match expressions and fields
Match against Beanshell expressions defined in piece traits.
Match against expressions defined in piece traits, both legacy and Beanshell.

===== Match property names
Match against the names of Properties provided by piece traits.

===== Match key commands
Match against Key Commands defied in piece traits. You can search against user defined Named Key Strokes, or for the standard name of defined Key Strokes (e.g., Ctrl-C).
Match against Key Commands defined in piece traits. You can search against user defined Named Key Strokes, or for the standard name of defined Key Strokes (e.g., Ctrl+C or Alt+Shift+C).

===== Match UI text

Expand All @@ -52,12 +59,22 @@ Match against the Menu Text provided for piece trait right-click menus.
===== Match message formats
Match against the Formatted Strings defined in piece traits.


.Basic
|image:images/search_basic.png[]

_Basic Search._
_Basic Search_



image:images/search_advanced.png[]

_Advanced Search._
_Advanced Filters._


image:images/search_output.png[]

_Sample Output._

|===

Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.