This repository was archived by the owner on Dec 14, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -478,11 +478,26 @@ async delegate
478478 else if ( messageType == Utility . NetworkProtocolUtility . MESSAGE_TYPE . CREATE_CDB )
479479 {
480480 Logging . Logging . LogInfo ( "Received request to create a compilation database." ) ;
481- if ( _validSolutionLoaded )
481+ if ( _validSolutionLoaded )
482482 {
483- DTE dte = ( DTE ) GetService ( typeof ( DTE ) ) ;
483+ ThreadHelper . JoinableTaskFactory . Run (
484+ async delegate
485+ {
486+ // Switch to main thread
487+ await ThreadHelper . JoinableTaskFactory . SwitchToMainThreadAsync ( ) ;
488+ DTE dte = ( DTE ) GetService ( typeof ( DTE ) ) ;
484489
485- CreateCompilationDatabase ( dte ) ;
490+ CreateCompilationDatabase ( dte ) ;
491+ }
492+ ) ;
493+ }
494+ else
495+ {
496+ Logging . Logging . LogInfo (
497+ "No C/C++ project was detected. To use the Sourcetrail Extension, please make " +
498+ "sure that the loaded Visual Studio Solution contains at least one C/C++ project " +
499+ "and Visual Studio is configured to generate a symbol database " +
500+ "(Tools->Options->Text Editor->C/C++->Advanced->Browsing/Navigation->Disable Database = False)." ) ;
486501 }
487502 }
488503 else if ( messageType == Utility . NetworkProtocolUtility . MESSAGE_TYPE . PING )
You can’t perform that action at this time.
0 commit comments