| 745 | } |
| 746 | |
| 747 | void App::runCommand( const std::string& command ) { |
| 748 | if ( mSplitter->getCurWidget() && mSplitter->getCurWidget()->isType( UI_TYPE_CODEEDITOR ) ) { |
| 749 | UICodeEditor* editor = mSplitter->getCurWidget()->asType<UICodeEditor>(); |
| 750 | editor->getDocument().execute( command, editor ); |
| 751 | } else if ( mSplitter->getCurWidget() && |
| 752 | mSplitter->getCurWidget()->isType( UI_TYPE_TERMINAL ) ) { |
| 753 | if ( !mSplitter->getCurWidget()->asType<UITerminal>()->execute( command ) ) |
| 754 | mMainLayout->execute( command ); |
| 755 | } else { |
| 756 | mMainLayout->execute( command ); |
| 757 | } |
| 758 | } |
| 759 | |
| 760 | bool App::commandExists( const std::string& command ) const { |
| 761 | if ( mSplitter->getCurWidget() && mSplitter->getCurWidget()->isType( UI_TYPE_CODEEDITOR ) ) { |
no test coverage detected