File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Sources/Overload/OvEditor/src/OvEditor/Panels Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,18 @@ class FolderContextualMenu : public BrowserItemContextualMenu
186186 OvTools::Utils::SystemCalls::ShowInExplorer (filePath);
187187 };
188188
189+ auto & openFolderInVsCode = CreateWidget<OvUI::Widgets::Menu::MenuItem>(" Open In Visual Studio Code" );
190+ openFolderInVsCode.ClickedEvent += [this ]
191+ {
192+ const auto command = std::format (" code \" {}\" " , filePath);
193+ const auto result = std::system (command.c_str ());
194+
195+ if (result != 0 )
196+ {
197+ OVLOG_ERROR (" Failed to open Visual Studio Code with error code: " + std::to_string (result));
198+ }
199+ };
200+
189201 if (!m_protected)
190202 {
191203 auto & importAssetHere = CreateWidget<OvUI::Widgets::Menu::MenuItem>(" Import Here..." );
You can’t perform that action at this time.
0 commit comments