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

Method updateDocInfo

src/tools/ecode/ecode.cpp:1641–1656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1639}
1640
1641void App::updateDocInfo( TextDocument& doc ) {
1642 if ( !doc.isRunningTransaction() && !doc.isLoading() && mConfig.editor.showDocInfo &&
1643 mDocInfo && mSplitter->curEditorExistsAndFocused() ) {
1644 mDocInfo->setVisible( true );
1645 updateDocInfoLocation();
1646 String infoStr( String::format(
1647 "%s: %lld / %zu %s: %lld %s %s%s %s", i18n( "line_abbr", "line" ).toUtf8(),
1648 doc.getSelection().start().line() + 1, doc.linesCount(),
1649 i18n( "col_abbr", "col" ).toUtf8(), mSplitter->getCurEditor()->getCurrentColumnCount(),
1650 doc.getSyntaxDefinition().getLanguageName(),
1651 TextFormat::encodingToString( doc.getEncoding() ), doc.isBOM() ? " (with BOM)"sv : ""sv,
1652 TextFormat::lineEndingToString( doc.getLineEnding() ) ) );
1653 mDocInfo->debounce( [this, infoStr] { mDocInfo->setText( infoStr ); }, Time::Zero,
1654 String::hash( "ecode::doc_info::update" ) );
1655 }
1656}
1657
1658void App::syncProjectTreeWithEditor( UICodeEditor* editor ) {
1659 if ( mProjectTreeView && mConfig.editor.syncProjectTreeWithEditor && editor != nullptr &&

Callers 2

createDocumentMenuMethod · 0.80
createViewMenuMethod · 0.80

Calls 15

formatFunction · 0.85
hashFunction · 0.85
isRunningTransactionMethod · 0.80
toUtf8Method · 0.80
linesCountMethod · 0.80
getCurrentColumnCountMethod · 0.80
getCurEditorMethod · 0.80
getEncodingMethod · 0.80
isBOMMethod · 0.80
debounceMethod · 0.80
isLoadingMethod · 0.45

Tested by

no test coverage detected