microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.55k stars 900 forks source link

Double clicking a *.scmp file in a database project should attempt to load the file in the Schema Compare U/I #25022

Open jasonhorner opened 10 months ago

jasonhorner commented 10 months ago

Is your feature request related to a problem? Please describe. When working with a database project that has scmp files, double clicking on these causes the file to be opened as a text file in the editor.

Describe the solution or feature you'd like it should load into the "Schema Compare" U/I and behave exactly as if I used the "open .scmp file" dialog

Describe alternatives you've considered I can open the schema compare U/I and open the file from there but it is cumbersome.

Additional context this would mirror the behavior in Visual Studio.

it would be great to also provide a right click option to open the file in the editor (matching the current functionality)

kisantia commented 10 months ago

There's currently "Open in Schema Compare" in the context menu of .scmp files, which will be a little quicker than opening the schema compare UI and clicking the "Open .scmp file" button. image

jasonhorner commented 10 months ago

@kisantia I'm not seeing this behavior. image

Here is my build info: Version: 1.47.0 (system setup) Commit: c7c2b2f21505562d21972d4c135119d00806db4f Date: 2023-11-07T17:17:45.669Z VS Code: 1.82.0 Electron: 25.8.4 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19045

Thoughts?

FWIW, this behavior is the opposite of what I would expect. by default double clicking a *.scmp file should just load it in the dialog as 99.9% this is the desired behavior. for the times that i want to spelunk into the scmp i would expect a right click option to allow me to edit the file this matches VS behavior.

kisantia commented 10 months ago

Oh looks like the "Open in Schema Compare" option only got added in the file explorer view, but not in the projects view. https://github.com/microsoft/azuredatastudio/blob/main/extensions/schema-compare/package.json#L104-L110

I agree that it would make sense in the projects view to open schema compare when clicking on an .scmp file in the project tree.

Notes for implementing this: