当前位置: 首页>>代码示例>>C++>>正文


C++ clCommandEvent::GetFileName方法代码示例

本文整理汇总了C++中clCommandEvent::GetFileName方法的典型用法代码示例。如果您正苦于以下问题:C++ clCommandEvent::GetFileName方法的具体用法?C++ clCommandEvent::GetFileName怎么用?C++ clCommandEvent::GetFileName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在clCommandEvent的用法示例。


在下文中一共展示了clCommandEvent::GetFileName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnEditorModified

void OpenWindowsPanel::OnEditorModified(clCommandEvent& event)
{
    event.Skip();
    if(!m_initDone) return;
    IEditor* editor = m_mgr->FindEditor(event.GetFileName());
    if(editor) { DoMarkModify(event.GetFileName(), editor->IsModified()); }
}
开发者ID:eranif,项目名称:codelite,代码行数:7,代码来源:openwindowspanel.cpp

示例2: OnOpenWithDBE

void DatabaseExplorer::OnOpenWithDBE(clCommandEvent& e)
{
    // get the file name
    e.Skip();
    if(FileExtManager::IsFileType(e.GetFileName(), FileExtManager::TypeDatabase)) {
        e.Skip(false);
        // Open the databse file
        DoOpenFile(e.GetFileName());
    }
}
开发者ID:eranif,项目名称:codelite,代码行数:10,代码来源:databaseexplorer.cpp

示例3: OnFileSaved

void PHPCodeCompletion::OnFileSaved(clCommandEvent& event)
{
    event.Skip();
    // check if the saved file is a PHP file
    // In case it is, then re-parse the file and store the results
    if(::IsPHPFile(event.GetFileName())) {
        PHPParserThreadRequest* req = new PHPParserThreadRequest(PHPParserThreadRequest::kParseSingleFile);
        req->file = event.GetFileName();
        req->workspaceFile = PHPWorkspace::Get()->GetFilename().GetFullPath();
        PHPParserThread::Instance()->Add(req);
    }
}
开发者ID:bugparty,项目名称:codelite,代码行数:12,代码来源:php_code_completion.cpp

示例4: OnOpenFile

void wxFormBuilder::OnOpenFile(clCommandEvent& e)
{
    e.Skip();
    // launch it with the default application
    wxFileName fullpath(e.GetFileName());
    if(fullpath.GetExt().MakeLower() != wxT("fbp")) { return; }

#ifdef __WXGTK__
    e.Skip(false);
    // Under Linux, use xdg-open
    wxString cmd;
    cmd << wxT("/bin/sh -c 'xdg-open \"") << fullpath.GetFullPath() << wxT("\"' 2> /dev/null");
    wxExecute(cmd);
    return;
#else
    wxMimeTypesManager* mgr = wxTheMimeTypesManager;
    wxFileType* type = mgr->GetFileTypeFromExtension(fullpath.GetExt());
    if(type) {
        wxString cmd = type->GetOpenCommand(fullpath.GetFullPath());
        wxDELETE(type);
        if(cmd.IsEmpty() == false) {
            e.Skip(false);
            wxExecute(cmd);
        }
    }
#endif
}
开发者ID:eranif,项目名称:codelite,代码行数:27,代码来源:wxformbuilder.cpp

示例5: OnFileSaved

void CodeCompletionManager::OnFileSaved(clCommandEvent& event)
{
    event.Skip();
    if(TagsManagerST::Get()->GetCtagsOptions().GetCcColourFlags() & CC_COLOUR_MACRO_BLOCKS) {
        ProcessMacros(clMainFrame::Get()->GetMainBook()->FindEditor(event.GetFileName()));
    }
}
开发者ID:05storm26,项目名称:codelite,代码行数:7,代码来源:code_completion_manager.cpp

示例6: OnEditorSaved

void OutlineTab::OnEditorSaved(clCommandEvent& event)
{
    event.Skip();
    wxFileName filename(event.GetFileName());
    if(FileExtManager::IsPHPFile(filename)) {
        m_treeCtrlPhp->BuildTree(filename);
    }
}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:8,代码来源:outline_tab.cpp

示例7: OnFileSaved

void WebTools::OnFileSaved(clCommandEvent& event)
{
    event.Skip();
    DoRefreshColours(event.GetFileName());
    IEditor* editor = m_mgr->GetActiveEditor();
    if(editor && m_jsCodeComplete && IsJavaScriptFile(editor) && !InsideJSComment(editor)) {
        m_jsCodeComplete->ResetTern(editor);
    }
}
开发者ID:capturePointer,项目名称:codelite,代码行数:9,代码来源:webtools.cpp

示例8: OnIsWorkspaceOpen

void PhpPlugin::OnIsWorkspaceOpen(clCommandEvent& e)
{
    e.Skip();
    bool isOpen = PHPWorkspace::Get()->IsOpen();
    e.SetAnswer(isOpen);
    if(isOpen) {
        e.SetFileName(PHPWorkspace::Get()->GetFilename().GetFullPath());
        e.SetString(e.GetFileName());
    }
}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:10,代码来源:php.cpp

示例9: OnOpenWithDBE

void DatabaseExplorer::OnOpenWithDBE(clCommandEvent& e)
{
    // get the file name
    e.Skip();
    const wxFileName& filename = e.GetFileName();
    if(filename.GetExt() == wxT("erd")) {
        e.Skip(false);
        DoOpenFile(filename);
    }
}
开发者ID:jcowgill,项目名称:codelite,代码行数:10,代码来源:databaseexplorer.cpp

示例10: OnBeforeFileSave

void CodeFormatter::OnBeforeFileSave(clCommandEvent& e)
{
    e.Skip();
    FormatOptions fmtroptions;
    m_mgr->GetConfigTool()->ReadObject(wxT("FormatterOptions"), &fmtroptions);
    if(fmtroptions.HasFlag(kCF_AutoFormatOnFileSave)) {
        // format the file before we save it
        IEditor* editor = m_mgr->FindEditor(e.GetFileName());
        if(editor && m_mgr->GetActiveEditor() == editor) {
            // we have our editor, format it
            DoFormatFile(editor);
        }
    }
}
开发者ID:292388900,项目名称:codelite,代码行数:14,代码来源:codeformatter.cpp

示例11: OnOpenWorkspace

void PhpPlugin::OnOpenWorkspace(clCommandEvent& e)
{
    const wxString WPS_EXT = "phpwsp";
    wxString workspace_file = e.GetFileName();
    if(!workspace_file.IsEmpty() && wxFileName(workspace_file).GetExt() != WPS_EXT) {
        // the event already contains a workspace name - don't do anything with the event
        e.Skip();
        return;
    }

    wxString filename;
    if(!workspace_file.IsEmpty()) {
        filename = workspace_file;

    } else {

        // Prompt the user to see if he wants to open a PHP workspace or standard workspace
        wxString filter;
        PluginSettings settings;

        PluginSettings::Load(settings);

        filter = "All Files (*)|*|Standard Workspace (*.workspace)|*.workspace|PHP Workspace (*.phpwsp)|*.phpwsp";
        filename =
            wxFileSelector(wxT("Open workspace"), wxT(""), wxT(""), wxT(""), filter, wxFD_FILE_MUST_EXIST | wxFD_OPEN);
    }

    if(filename.IsEmpty()) {
        return;
    }

    if(PHPWorkspace::Get()->IsOpen()) {
        PHPWorkspace::Get()->Close();
    }

    wxFileName fn(filename);
    if(fn.GetExt() == PHPStrings::PHP_WORKSPACE_EXT) {
        DoOpenWorkspace(fn.GetFullPath());

    } else {
        // set the file selection and pass it on to codelite
        e.SetFileName(fn.GetFullPath());
        e.Skip();
    }
}
开发者ID:nagyist,项目名称:eranit-codelite,代码行数:45,代码来源:php.cpp

示例12: OnFileLoaded

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); }
}
开发者ID:jiapei100,项目名称:codelite,代码行数:19,代码来源:code_completion_manager.cpp

示例13: OnOpenFile

void QMakePlugin::OnOpenFile(clCommandEvent& event)
{
    event.Skip();

    // launch it with the default application
    wxFileName fullpath(event.GetFileName());
    if(fullpath.GetExt().MakeLower() != wxT("ui")) { return; }

    wxMimeTypesManager* mgr = wxTheMimeTypesManager;
    wxFileType* type = mgr->GetFileTypeFromExtension(fullpath.GetExt());
    if(type) {
        wxString cmd = type->GetOpenCommand(fullpath.GetFullPath());
        delete type;

        if(cmd.IsEmpty() == false) {
            event.Skip(false);
            ::wxExecute(cmd);
        }
    }
}
开发者ID:eranif,项目名称:codelite,代码行数:20,代码来源:qmakeplugin.cpp

示例14: OnOpenWorkspace

void NodeJSWorkspace::OnOpenWorkspace(clCommandEvent& event)
{
    event.Skip();
    wxFileName workspaceFile(event.GetFileName());

    // Test that this is our workspace
    NodeJSWorkspaceConfiguration conf;
    conf.Load(workspaceFile);
    if(!conf.IsOk()) {
        return;
    }
    // This is a NodeJS workspace, stop event processing by calling
    // event.Skip(false)
    event.Skip(false);

    // Check if this is a PHP workspace
    if(IsOpen()) {
        Close();
    }
    Open(workspaceFile);
}
开发者ID:GaganJotSingh,项目名称:codelite,代码行数:21,代码来源:NoteJSWorkspace.cpp

示例15: OnFileSaved

void PhpPlugin::OnFileSaved(clCommandEvent& e)
{
    e.Skip();

    if(PHPWorkspace::Get()->IsOpen()) {
        DoSyncFileWithRemote(e.GetString());
    }

    // Run php lint
    IEditor* editor = m_mgr->GetActiveEditor();
    CHECK_PTR_RET(editor);

    PHPConfigurationData conf;
    conf.Load();
    if(::IsPHPFile(editor) && conf.IsRunLint()) {
        if(m_mgr->GetActiveEditor()) {
            m_mgr->GetActiveEditor()->DelAllCompilerMarkers();
        }
        m_lint->CheckCode(e.GetFileName());
    }
}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:21,代码来源:php.cpp


注:本文中的clCommandEvent::GetFileName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。