Well, I'm suggesting a workaround. Try adding a queue to your plugin.
Like
OnEditorActivate(...)
{
if(ProjectManager::IsBusy())
m_filequeue.insert(theeditor);
else
do_stuff_on_editor(theeditor);
}
OnEditorDeActivate(...)
{
if(ProjectManager::IsBusy())
m_filequeue.erase(theeditor);
else
undo_stuff_on_editor(theeditor);
}
OnWorkspaceChanged...
{
Do_stuff_on_filequeue();
filequeue.clear();
}
Since I don't really know what you're doing, I can't suggest a specific method, but what I do goes around those lines.
But yes, I agree that in this case, the PROJECT_OPEN should be triggered before.
The problem is WHAT WE WANT the events for.
Should we have a PROJECT_BEGIN_OPENING and PROJECT_FINISHED_OPENING events?
In any case, PROJECT_OPEN should go immediately *BEFORE* PROJECT_ACTIVATE. And PROJECT_CLOSE should go immediately *AFTER* PROJECT_DEACTIVATE for the events to have some coherence.
The real question is, if by doing this, we break existing functionality on the plugins.