void CodeCompletionManager::OnFileSaved(clCommandEvent& event)
{
    event.Skip();
    if(TagsManagerST::Get()->GetCtagsOptions().GetCcColourFlags() & CC_COLOUR_MACRO_BLOCKS) {
        ProcessMacros(clMainFrame::Get()->GetMainBook()->FindEditor(event.GetFileName()));
    }
}
void CodeCompletionManager::OnFileLoaded(clCommandEvent& event)
{
    event.Skip();
    clEditor* editor = clMainFrame::Get()->GetMainBook()->FindEditor(event.GetFileName());
    CHECK_PTR_RET(editor);

    // Handle Pre Processor block colouring
    const size_t colourOptions = TagsManagerST::Get()->GetCtagsOptions().GetCcColourFlags();
    const size_t ccFlags = TagsManagerST::Get()->GetCtagsOptions().GetFlags();
    if(!(colourOptions & CC_COLOUR_MACRO_BLOCKS)) {
        editor->SetPreProcessorsWords("");
        editor->SetProperty("lexer.cpp.track.preprocessor", "0");
        editor->SetProperty("lexer.cpp.update.preprocessor", "0");
    } else {
        ProcessMacros(editor);
    }

    if(editor && (ccFlags & CC_DEEP_SCAN_USING_NAMESPACE_RESOLVING)) { ProcessUsingNamespace(editor); }
}
void CodeCompletionManager::RefreshPreProcessorColouring()
{
    bool enableBlockColouring = TagsManagerST::Get()->GetCtagsOptions().GetCcColourFlags() & CC_COLOUR_MACRO_BLOCKS;
    LEditor::Vec_t editors;
    clMainFrame::Get()->GetMainBook()->GetAllEditors(editors, MainBook::kGetAll_IncludeDetached);
    if(!enableBlockColouring) {
        for(size_t i = 0; i < editors.size(); ++i) {
            LEditor* editor = editors.at(i);
            editor->SetPreProcessorsWords("");
            editor->SetProperty("lexer.cpp.track.preprocessor", "0");
            editor->SetProperty("lexer.cpp.update.preprocessor", "0");
        }
    } else {
        for(size_t i = 0; i < editors.size(); ++i) {
            LEditor* editor = editors.at(i);
            editor->SetProperty("lexer.cpp.track.preprocessor", "0");
            editor->SetProperty("lexer.cpp.update.preprocessor", "0");
            ProcessMacros(editor);
        }
    }
}