Beispiel #1
0
bool Contexts::handleEditorMessages(EditorContainerCommands &command)
    {
    bool handleMessage = false;
    if(!mEditorMessages.empty())
        {
        OovIpcMsg msg = mEditorMessages.top();
        mEditorMessages.pop();
        command = static_cast<EditorContainerCommands>(msg.getCommand());
        switch(command)
            {
            case ECC_ViewClassDiagram:
                displayClass(msg.getArg(1));
                break;

            case ECC_ViewPortionDiagram:
                displayPortion(msg.getArg(1));
                break;

            case ECC_RunAnalysis:
            case ECC_Build:
            case ECC_StopAnalysis:
                handleMessage = true;
                break;

            default:
                break;
            }
        }
    return handleMessage;
    }
Beispiel #2
0
gboolean Editor::onIdle(gpointer data)
    {
    if(mDebugOut.length())
        {
        GtkTextView *view = GTK_TEXT_VIEW(ControlWindow::getTabView(
            ControlWindow::CT_Control));
        Gui::appendText(view, mDebugOut);
        Gui::scrollToCursor(view);
        mDebugOut.clear();
        }
    eDebuggerChangeStatus dbgStatus = mDebugger.getChangeStatus();
    if(dbgStatus != DCS_None)
        {
        idleDebugStatusChange(dbgStatus);
        }
    getEditFiles().onIdle();
    OovIpcMsg msg;
    if(mEditorIpc.getMessage(msg))
        {
        OovString cmd = msg.getArg(0);
        if(cmd[0] == EC_ViewFile)
            {
            OovString fn = msg.getArg(1);
            OovString lineNumStr = msg.getArg(2);
            int lineNum = 1;
            size_t pos = lineNumStr.findSpace();
            if(pos != std::string::npos)
                {
                lineNumStr = lineNumStr.substr(0, pos);
                }
            if(lineNumStr.getInt(0, INT_MAX, lineNum))
                {
                }
            gEditor->getEditFiles().viewModule(fn, lineNum);
            }
        }
    sleepMs(5);
    return true;
    }