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

Method loadDiffFromStrings

src/tools/ecode/ecode.cpp:2751–2762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2749}
2750
2751void App::loadDiffFromStrings( const std::string& str, const std::string& otherStr ) {
2752 auto diffViewTitle = i18n( "diff_viewer", "Diff Viewer" );
2753 auto* diffView = Tools::UIDiffView::New();
2754 auto [tab, iv] = mSplitter->createWidget( diffView, i18n( "diff_viewer", "Diff Viewer" ) );
2755 tab->setText( diffViewTitle );
2756 auto icon = findIcon( "filetype-diff" );
2757 tab->setIcon( icon ? icon : findIcon( "file" ) );
2758 diffView->setHeadersVisible( true );
2759 diffView->loadFromStrings( str, otherStr );
2760 diffView->setSyntaxColorScheme( *getCurrentColorScheme() );
2761 registerUnlockedCommands( *diffView );
2762}
2763
2764void App::openFileFromPath( const std::string& path ) {
2765 std::string ext = FileSystem::fileExtension( path );

Callers

nothing calls this directly

Calls 7

loadFromStringsMethod · 0.80
setSyntaxColorSchemeMethod · 0.80
NewFunction · 0.50
createWidgetMethod · 0.45
setTextMethod · 0.45
setIconMethod · 0.45
setHeadersVisibleMethod · 0.45

Tested by

no test coverage detected