Analyzer Tutorial -> VST Format

Bit of a newbie question here, but I just finished the tutorial for a spectrum analyzer at:

And I want to convert this project from standalone application into VST format. How exactly would I go about doing this? Can I just use the same code for the AnalyzerComponent class in the PluginProcessor.h file? And how would I got about displaying it using the PluginEditor files? In the original tutorial PIP, the component is created in the main.cpp file when the window is initialized. Would I use the [project name]AudioProcessorEditor?

Just getting acclimated to the whole file structure of JUCE. Let me know if there’s anything I should know about this.

It’s not entirely simple, a lot of the code has to be split up into the AudioProcessor and AudioProcessorEditor classes, thread safety should be handled and so on…

This particular thing seems to come up so regularly here and in the Audio Programmer discord server that the Juce team should probably write a new tutorial that shows how it can be done as a plugin. Sadly, I don’t have high hopes of that happening in the near future.