score icon indicating copy to clipboard operation
score copied to clipboard

[feature request] search in state / debug mode

Open pach opened this issue 7 years ago • 14 comments

If you want to change a parameter in different state and want to be sure in which state it is used, would be good to have a search option which will enlight all the state/constraint that include this parameters. a kind of debug mode...

pach avatar Oct 10 '17 13:10 pach

a workflow proposal for this:

  • choose one or several nodes from the DeviceExplorer
  • push Tab (or another key or key combo - would be nice to keep it simple)
  • all states and processes containing the selected parameters get highlighted
  • @pach is amazed! (and so am I)

bltzr avatar Oct 10 '17 17:10 bltzr

You'll be hearing me going threw the roof! ;)


Thomas Pachoud creapach.blogspot.fr assoikari.wordpress.com

Le 10 oct. 2017 à 19:04, Pascal Baltazar [email protected] a écrit :

a workflow proposition for this:

choose one or several nodes from the DeviceExplorer push Tab (or another key or key combo - would be nice to keep it simple) all states and processes containing the selected parameters get highlighted @pach is amazed! (and so am I) — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

pach avatar Oct 11 '17 07:10 pach

My proposal : a spell checker for @pach ;-)

more seriously, a search panel, like message panel, with which you can search for many things and at first for an address in use somewhere (with 'where to search', 'what kind of objects you want' options) it returns a list of objects that uses this address by clicking on the item, it become selected and, potentially, the score view move to show it clearly.

of course if it is possible to right click in the device explorer to choose 'find usage' option to automatically open search panel filled with selected address

unless this is a big challenge for me, I thing it is more future proof than a quick tab-shortcut hack

what do you think guys ?

avilleret avatar Nov 27 '17 09:11 avilleret

so after a quick talk with @bltzr : I will made a basic search tool included in the object inspector a new icon at the right of selection arrow to open a line edit in which we can freely enter text with some tag like : address:/foo/bar will search all objects using address /foo/bar or name:trucMuch will search all objects with trucMuch in their name then objects will be automatically selected there will be a shortcut from device inspector to that search tool (right click menu and key combo)

avilleret avatar Nov 27 '17 14:11 avilleret

as there might be several addresses, and as addresses including :/ are interpreted as device:/address what about using this syntax: address:{myDevice:/foo/bar, anotherDevice:/blih/blah/bloh} and probably the same for other fields, such as name:{tim, tom}

I don't know which between ',' and '|' is best as a separator, though

also, maybe we could avoid using the {} when there is only one value ? (such as name:trucMuch ? - but would't that be a problem for address:myDevice:/foo/bar

bltzr avatar Nov 27 '17 14:11 bltzr

also we should device an interface (probably not for this time, though) to add rules visually that could be by adding rules with a + (somehow like in the expression interfaces for triggers and conditions) a better (but I guess more complicated) way to manage this would be to mimic Apple Finder's search field...

What do you think, @jln- ?

bltzr avatar Nov 27 '17 14:11 bltzr

what about = instead of : ? thus curly braces are no more needed, i.e. :

address=dev:/foo/bar,ved:/truv/machin

avilleret avatar Nov 27 '17 14:11 avilleret

I'd say: "why not ?"

bltzr avatar Nov 27 '17 17:11 bltzr

for now there is a rough search widget that iterate through all active scenario objects, convert them to JSON and search into the JSON string if text appear, if so, object is added to selection.

I need to add a shortcut and a key-combo on device explorer. Then some more work to filter out with key (like address, name ...)

avilleret avatar Nov 27 '17 23:11 avilleret

I added a search through state address but it seems to only work with fill qualified address I need to add some pattern matching around there

avilleret avatar Nov 29 '17 10:11 avilleret

should we support regex in search tool ? if yes (which I guess will be answer, at least mine), which syntax to use ? The one uses in Max and Pd for pattern matching is a good candidate but is not straightforward to implement

avilleret avatar Dec 01 '17 19:12 avilleret

as reported by @pach processes are not selected when searching for address

avilleret avatar Dec 04 '17 12:12 avilleret

also, if we could add a simple shortcut (such as Tab) when selecting a (set of) node(s) from the DE, that would be FAB !

bltzr avatar Nov 02 '18 11:11 bltzr

@RobinMontferme for looking into this, a good first step I think to get a hold of the code would be to refactor SearchWidget (in ObjectItemModel.{hpp,cpp}) in its own file - this already has most of the search logic

jcelerier avatar Sep 21 '22 19:09 jcelerier