(I started this post before the last two were posted. I'll post it as it's somewhat more detailed
![Wink ;)](https://forums.codeblocks.org/Smileys/default/wink.gif)
)
Well, that gives an outline for how to write a plugin. Usefull but not enought.
At present, I want to know How a plugin can find out the filenames and directories of all files in the project. How is that done and how did you find out?
Thanks!
Nathan
Manager::Get()->GetProjectManager() returns a
ProjectManager*.
ProjectManager::GetProjects() returns a
ProjectsArray* (IIRC basically the wx-version of
std::vector<cbProject*>, but without iterators)
cbProject::GetFilesCount() returns the number of files in a project.
cbProject::GetFile(int index) returns a
ProjectFile*.
From there
ProjectFile::file or
ProjectFile::relativeFilename should be able to help you.
Now where did I find all this?
Well, I started looking in
sdk/projectmanager.h, and went from there. Like Rick said: look at the managers
![Wink ;)](https://forums.codeblocks.org/Smileys/default/wink.gif)
. The only time I actually had to perform a search for the next file was when I got to
ProjectFile, which is conveniently located in
sdk/projectbuildtarget.h :roll:.
The SDK headers are quite helpful, but you can always get doxygen and process
sdk.doxy for a HTML version with hyperlinks
![Smiley :)](https://forums.codeblocks.org/Smileys/default/smiley.gif)
.