Ok, guys.
If you are interested, in two or three weeks I'll be done with SemanticHighlight plugin provided the problem with cbEVT_EDITOR_OPEN will be solved.
To finish SH plugin, I _really_ need to get the project a file belongs to because I need to get all the project's include directories and defines to get SH plugin work properly.
Since I am new to C::B sdk, I'd like someone to take a look at this proposal of change in the file editormanager.cpp:
remove these lines from EditorManager::New():
CodeBlocksEvent evt(cbEVT_EDITOR_OPEN, -1, 0, ed);
Manager::Get()->GetPluginManager()->NotifyPlugins(evt);
and insert these lines to EditorManager::Open(LoaderBase*, const wxString &, int, ProjectFile *):
if (!eb) // was not open
{
CodeBlocksEvent evt(cbEVT_EDITOR_OPEN, -1, 0, ed);
Manager::Get()->GetPluginManager()->NotifyPlugins(evt);
}
just before "s_CanShutdown = true". This way, cbEVT_EDITOR_OPEN is posted after all editor's data is initialized.