because once again the linux build is broken.
Could things please be corrected (I have done it once, but things got changed again ...) :
1) keybinder.cpp is using the following stuff :
Manager::Get()->GetMessageManager()->DebugLog(wxString::Format(wxT("KeyBinder failed UpdateById on[%d][%s]"), nMenuItemID, pMenuItem->GetText().GetData()));
that means that the following includes are needed (don't just think fucking pch) :
#include "manager.h"
#include "messagemanager.h"
And : they belong here and not in the corresponding header file !!!
2) And let the error speak for itself :
cbkeybinder.cpp: In member function 'void cbKeyBinder::OnAppStartShutdown(wxCommandEvent&)':
cbkeybinder.cpp:1086: error: 'Sleep' was not declared in this scope
make[4]: *** [cbkeybinder.lo] Error 1
Please understand my frustration.
Right then... I had the crazy idea of starting to add support for wxWidgets to this plugin. So what I did was entering the config, creating a new set and started with "wxBeginBusyCursor". Unfortunately I received the error "Please enter valid C++ identifier". I looked into configuration.cpp and found the line:
if ( wxString(_T("_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstvwxyz")).Find(Identifier.GetChar(0)) == wxNOT_FOUND )
which is causing the error message. Well... Identifier.GetChar(0) is obviously "w" (I verified that)... Now I read the line a million times - either it's too late or I'm simply too dumb: Why is it failing??? I mean: it seems obviously to be a minor bug but I cant' find the reason for this .Find() method to fail. Any help?!
With regards, Morten.
sounds nice but ...... I had a look at the envvars.h, you added cbproject.h to the include list. Why ?
I don't see any reason why, or maybe it's still to early in the morning for me ;-)
In case it would be for FileTreeData : you should use the forward declaration :
class FileTreeData;
Yup, cbproject.h is included because of FileTreeData. Plugin adds it because this structure is used somewhere in code. Now the only function where it's used is:
void BuildModuleMenu(const ModuleType type, wxMenu* menu,
const FileTreeData* data = 0)
{ return; }
Without expensive parsing there's no way to detect whether we access members of structure in source or not. And if we use members of structure, the structure has to be fully defined. cbproject.h is added "just in case".
Plugin works on very low level - it only does basic tokenization of sources and take list of used identifiers (no matter what context it is, whether it's class member or type name etc) so it can blindly add some headers, like the one mentioned before, "just in case". In some situations it's not advised (f.ex. when forward declaration is required to compile properly), so I don't advise using this plugin on C::B sdk project because it may even break the build. But it's output may be used as a hint when some plugins can not compile because of missing headers. One more sdk header in plugin's source won't break the build but may be usefull when sources need to be compiled quickly without investigating what headers are missing.
And one more thing - when C::B will have some really accurate c++ parser and refactoring tool, this tool would probably do this job much better. So I don't plan to upgrade my plugin and I would preffer not putting it into svn since it may cause more problems than benefits for unexperienced users. Just threat it as temporary solution ;)
BYO