Normally this means surrounded by forward slashes, but we also still
allow any regular expression in a netclass match to keep from breaking
existing documents.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14944
Also simplifies the scoring algorithm so that it only
differentiates between exact-match, match-at-start and
any-match. The rest of the position-based matching
stuff is gone, as is the knowledge of the name vs the
keywords vs the description. All that is left to the
provider of the weighted search terms array.
Footprint filters need to be able to match the start and end of strings.
The standard wildcard filter implictly adds "*" to the start and end of
match strings, so we create a derived class that requires an explicit
"*" or "?" to match wildcards.
Fixes: lp:1751565
* https://bugs.launchpad.net/kicad/+bug/1751565
- DIALOG_CHOOSE_COMPONENT has footprint select widget
- FOOTPRINT_SELECT_WIDGET
- FOOTPRINT_CHOICE widget (customized wxComboCtrl)
- FOOTPRINT_FILTER class
- FOOTPRINT_INFO rework:
- FOOTPRINT_ASYNC_LOADER to load without freezing UI
- Rewrite loader threads as queue-driven thread pool
- Make FOOTPRINT_INFO available via kiway
- FP_LIB_TABLE::PrefetchLib
- Access to global fp-lib-table via kiway
- SYNC_QUEUE threadsafe queue template
- Remove KICAD_FOOTPRINT_SELECTOR build option
This refactors COMPONENT_TREE_SEARCH_CONTAINER into a Model-View-Adapter
architecture comprising:
- eeschema/cmp_tree_model.h
- CMP_TREE_NODE: Base class representing a searchable library
set with scoring and sorting
- CMP_TREE_NODE_UNIT
- CMP_TREE_NODE_ALIAS
- CMP_TREE_NODE_LIB
- CMP_TREE_NODE_ROOT
- eeschema/cmp_tree_model_adapter.h
- CMP_TREE_MODEL_ADAPTER: mediator between wxDataViewCtrl (via
wxDataViewModel) and CMP_TREE_NODE*
+---+ +------------------+
+---+ Generates | A | | VIEW |
| M | from libs | D | wxDataViewModel |------------------|
| O | <---------- | A | <------------------> | wxDataViewCtrl |
| D | | P | |------------------|
| E | <---------> | T | <------------------- | wxTextCtrl |
| L | UpdateScore | E | UpdateSearchString() |------------------|
+---+ | R | | |
+---+ +------------------+
Representing the data with a proper model allows the wxDataViewCtrl to
be updated in bulk, which is significantly faster than the old method of
populating it one item at a time. This also adds flexibility if more
data is to be added in the future (which may come in handy with the
upcoming .sweet format, as that adds more ways components can be related
to each other).
Replacing the wxTreeListCtrl with a wxDataViewCtrl also significantly
reduces the general GUI quirkiness, as wxDataViewCtrl is much more well
behaved.
* Create base class EDA_PATTERN_MATCH to hand multiple pattern matching methods.
* Create classes for regular expression and wildcard pattern matching.
* Add new pattern matching semantics to component select dialog.
* Thanks to Henner Zellar <h.zeller@acm.org> for improvments to the original patch.