void CAttributeDlg::DoCheckSyntax()
{
    m_view.SyntaxChecking();
    CString ecl;
    m_view.GetText(ecl);
    CString cluster(GetIConfig(QUERYBUILDER_CFG)->Get(GLOBAL_CLUSTER));
    CString module(m_attribute->GetModuleQualifiedLabel());
    CString attribute(m_attribute->GetLabel());

    if (CComPtr<IEclCC> eclcc = CreateIEclCC())
    {
        if (!DoSave(false))
            return;
    }
    if (m_attribute->GetType() == CreateIAttributeECLType())
    {
        clib::thread run(__FUNCTION__, boost::bind(&EclCheckSyntax, this, ecl, cluster, module, attribute, _T(""), _T(""), false, false));
    }
    else
    {
        IAttributeVector attrs;
        Dali::CEclExceptionVector errors;
        m_attribute->PreProcess(PREPROCESS_SYNTAXCHECK, ecl, attrs, errors);
        SendMessage(CWM_SUBMITDONE, Dali::WUActionCheck, (LPARAM)&errors);
    }
}
Esempio n. 2
0
void CWUSummaryView::Refresh()
{
    CSummaryView::Refresh();
    if (m_view.IsLoaded())
    {
        if (IsRemoteDaliEnabled() == TRI_BOOL_TRUE && boost::algorithm::istarts_with(m_wu->GetWuid(), _T("W")))
        {
            CString password(GetIConfig(QUERYBUILDER_CFG)->Get(GLOBAL_PASSWORD));
            CString user(GetIConfig(QUERYBUILDER_CFG)->Get(GLOBAL_USER));
            m_view.Navigate(m_Url, user, password, false);
        }
        else if (CComPtr<IEclCC> eclcc = CreateIEclCC())
        {
            std::_tstring xmlPath;
            eclcc->SaveWorkunitXML(m_wu->GetWuid(), xmlPath);
            m_view.Navigate(xmlPath.c_str());
        }
    }
}