mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:42:44 +00:00 
			
		
		
		
	LanguageServers: Tweak FileDB API
- FileDB::get() now returns nullptr if the file is not in the FileDB - Added FileDB::get_or_create_from_filesystem() - Added FileDB::add() version that receives that file's content as a parameter
This commit is contained in:
		
							parent
							
								
									684cc5f027
								
							
						
					
					
						commit
						6f7ef4ec65
					
				
					 3 changed files with 55 additions and 14 deletions
				
			
		|  | @ -60,7 +60,7 @@ const ParserAutoComplete::DocumentData* ParserAutoComplete::get_document_data(co | |||
| 
 | ||||
| OwnPtr<ParserAutoComplete::DocumentData> ParserAutoComplete::create_document_data_for(const String& file) | ||||
| { | ||||
|     auto document = filedb().get(file); | ||||
|     auto document = filedb().get_or_create_from_filesystem(file); | ||||
|     if (!document) | ||||
|         return {}; | ||||
|     auto content = document->text(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Itamar
						Itamar