Closed biegehydra closed 1 year ago
I added a regex to search for usages. When looking through the file line by line it checks that anywhere on the line there is "<{ComponentName}" followed by anything other than alphabetical character. That's the simplest way I could think of to check for a component. Without accidentally getting other components.
This looks really awesome! Thank you!
Just gave it a test on a large project. Search algorithm needs optimized. And it would be best to display results as they are found instead of after they have all been found.
I believe my most recent commit may fix #2 I was having trouble debugging getting this to work in a large project and it was because the razor file search algorithm was looking over solution item folders and sub projects. Others probably have the same issue. I think the algorithm is better now but I can't say it handles every case.
The feature could definitely use some optimizing and tweaking before shipping but I created a good starting point for find component references. I have only tested it on a boilerplate project and not a large project.
What it does?
"<{componentName}"
line by line. If found, saves the line number, file path, and a preview of the usageFeature Opportunities (Not Implemented)
Note: It will also work for normal html tags due to them matching the regex I use
Also, syntax highlighting for the preview was something I considered but was too hard for me to do.