fdorg / flashdevelop

FlashDevelop is a free and open source code editor.
MIT License
825 stars 221 forks source link

Multiple Find and Replace results panels and the show next/previous result #1817

Open gene-pavlovsky opened 6 years ago

gene-pavlovsky commented 6 years ago

Not sure if it's a bug or just a improvement suggestion, but bear with me :)

Desired result: if a results panel is closed, give "focus" (in the sense of ShowNextResult etc.) to another existing results panel. The case is pretty simple if there is only one results panel remaining, if there are multiple "keep results" panels, the logic could be one of: select right-most panel (most recent F&R search), select most-recently-used panel, or do nothing in this case.

Realistic use case: I'm refactoring all use cases of some function call. I search for invocations of this function in all files, and mark the panel as "keep results". I pick a result, in the process of refactoring that file I need to check where this class is used (I now need to supply a dependency to it), I search for this class name in all files using F&R. I finish working on this case, and close the second F&R panel. I now want to go to the next case, I'd like to just hit the show next result hotkey and go to the next item in my (one) results panel.

Neverbirth commented 6 years ago

C'mon! Be glad you now have multiple panels! :P.

I would consider this more as an enhancement than a bug.

gene-pavlovsky commented 6 years ago

I'm glad and yes I think this is an RFE (request for enhancement). On further thought, it would be neat to have a "Refresh" button next to "Keep Results" - repeating the same search and updating the results in the same panel.

Neverbirth commented 6 years ago

Adding a "Refresh" button may be problematic, as this is a generic solution and this sounds quite specific to "Find" logic but we can talk more about it tomorrow.

gene-pavlovsky commented 6 years ago

What if the panel also accepts an optional "refresh" function together with results. If a sender (F&R dialog in this case) passes that refresh function, then the dialog will display the Refresh button that calls that function.