Find components based on their type

Is there a way to find say all "one-shot" buttons in a project?
Provided that all button names were changed to match their function, so there is no common string shared by them.
EDIT:
I am looking for a way to do this from the Designer.

Sure, views are saved as JSON in the filesystem so you can search for really anything. A one-shot button should look like "type": "ia.input.oneshotbutton", but if you use embedded views this will just complicate matters.

3 Likes

I am using embedded views indeed, so to find the buttons this way was cumbersome. I hadn't thought about this, though, so I appreciate the idea.
Is there any way to do this from the Designer?

If you named all your buttons to have a common string then you probably can use the Find/Replace window (Ctrl + F) and change it to All Views

Then you can sort by Property and find all the meta.name instances.

If out of designer is an option, you can export all your views out, unzip into a folder, then use something like Notepad++ that allows you to pick a directory and search all the files in there. Then you can actually search for "type":"ia.input.oneshotbutton".

A more advanced option is writing a script that walk through your project structure and read each view.json file and search there.