Allow to locate files from the universal locator.

This commit is contained in:
Martín Lucas Golini
2024-11-25 00:02:25 -03:00
parent 4b21d02794
commit 5bf9b89587
7 changed files with 62 additions and 23 deletions
+10 -1
View File
@@ -2584,6 +2584,15 @@ void App::loadDirTree( const std::string& path ) {
path, mThreadPool, mPluginManager.get(),
[this]( auto path ) { loadFileFromPathOrFocus( path ); } );
Log::info( "Loading DirTree: %s", path );
std::vector<std::string> supportedExts(
SyntaxDefinitionManager::instance()->getExtensionsPatternsSupported() );
auto imgExts( Image::getImageExtensionsSupported() );
supportedExts.reserve( supportedExts.size() + imgExts.size() );
for ( auto& ext : imgExts ) {
ext.insert( 0, "%." );
ext += "$";
supportedExts.push_back( ext );
}
mDirTree->scan(
[this, clock]( ProjectDirectoryTree& dirTree ) {
Log::info( "DirTree read in: %s. Found %ld files.", clock.getElapsedTime().toString(),
@@ -2605,7 +2614,7 @@ void App::loadDirTree( const std::string& path ) {
}
mFileSystemListener->setDirTree( mDirTree );
},
SyntaxDefinitionManager::instance()->getExtensionsPatternsSupported() );
supportedExts );
}
UIMessageBox* App::errorMsgBox( const String& msg ) {