MCPcopy Create free account
hub / github.com/SpartanJ/eepp / updateSwitchFileTypeTable

Method updateSwitchFileTypeTable

src/tools/ecode/universallocator.cpp:934–948  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

932}
933
934void UniversalLocator::updateSwitchFileTypeTable() {
935 mLocateTable->setModel(
936 openFileTypeModel( mLocateInput->getText().substr( 3 ).trim().toUtf8() ) );
937 if ( mLocateTable->getModel()->hasChildren() && mApp->getSplitter()->getCurEditor() ) {
938 ModelIndex idx = mLocateTable->findRowWithText( mApp->getSplitter()
939 ->getCurEditor()
940 ->getDocumentRef()
941 ->getSyntaxDefinition()
942 .getLanguageName() );
943 mLocateTable->setSelection( idx.isValid() ? idx : mLocateTable->getModel()->index( 0 ) );
944 } else {
945 mLocateTable->scrollToTop();
946 }
947 mLocateTable->setColumnsVisible( { 0 } );
948}
949
950void UniversalLocator::onCodeEditorFocusChange( UICodeEditor* editor ) {
951 if ( !mLocateTable || !mLocateTable->isVisible() )

Callers

nothing calls this directly

Calls 15

toUtf8Method · 0.80
trimMethod · 0.80
substrMethod · 0.80
getCurEditorMethod · 0.80
getDocumentRefMethod · 0.80
scrollToTopMethod · 0.80
setColumnsVisibleMethod · 0.80
setModelMethod · 0.45
getTextMethod · 0.45
hasChildrenMethod · 0.45
getModelMethod · 0.45
getSplitterMethod · 0.45

Tested by

no test coverage detected