@@ -27,37 +27,16 @@ import {
2727 DatabaseNameValidationError ,
2828 ConnectionMatcher ,
2929} from "../models/utils" ;
30- import { PlatformInformation } from "../models/platform" ;
3130import { UserSurvey } from "../nps/userSurvey" ;
3231import { getErrorMessage } from "../utils/utils" ;
3332
3433// File extension constants
3534export const DACPAC_EXTENSION = ".dacpac" ;
3635export const BACPAC_EXTENSION = ".bacpac" ;
3736
38- // VS Code command constants
39- const REVEAL_FILE_IN_OS_COMMAND = "revealFileInOS" ;
40-
4137// View ID constant for NPS survey
4238const DACPAC_DIALOG_VIEW_ID = "dacpacDialog" ;
4339
44- /**
45- * Gets the OS-specific localized text for the "Reveal/Open" file button
46- * @returns The appropriate localized string based on the operating system
47- */
48- function getRevealInOsButtonText ( ) : string {
49- const platformInfo = new PlatformInformation ( process . platform , process . arch , undefined ) ;
50-
51- if ( platformInfo . isMacOS ) {
52- return LocConstants . DacpacDialog . RevealInFinder ;
53- } else if ( platformInfo . isLinux ) {
54- return LocConstants . DacpacDialog . OpenContainingFolder ;
55- } else {
56- // Windows or any other platform
57- return LocConstants . DacpacDialog . RevealInExplorer ;
58- }
59- }
60-
6140/**
6241 * Controller for the DacpacDialog webview.
6342 * Manages DACPAC and BACPAC operations (Deploy, Extract, Import, Export) using the Data-tier Application Framework (DacFx).
@@ -352,10 +331,6 @@ export class DacpacDialogWebviewController extends ReactWebviewPanelController<
352331 if ( result . success ) {
353332 this . logger . verbose ( "Deploy DACPAC operation completed successfully" ) ;
354333 activity . end ( ActivityStatus . Succeeded ) ;
355- // Show success notification for Deploy operation
356- void this . vscodeWrapper . showInformationMessage (
357- LocConstants . DacpacDialog . DeploySuccessWithDatabase ( params . databaseName ) ,
358- ) ;
359334 // Prompt user for NPS survey feedback
360335 UserSurvey . getInstance ( ) . promptUserForNPSFeedback (
361336 `${ DACPAC_DIALOG_VIEW_ID } _deploy` ,
@@ -417,22 +392,6 @@ export class DacpacDialogWebviewController extends ReactWebviewPanelController<
417392 if ( result . success ) {
418393 this . logger . verbose ( "Extract DACPAC operation completed successfully" ) ;
419394 activity . end ( ActivityStatus . Succeeded ) ;
420- // Show success notification with OS-specific "Reveal/Open" button for Extract operation
421- const fileName = path . basename ( params . packageFilePath ) ;
422- const revealButtonText = getRevealInOsButtonText ( ) ;
423- void this . vscodeWrapper
424- . showInformationMessage (
425- LocConstants . DacpacDialog . ExtractSuccessWithFile ( fileName ) ,
426- revealButtonText ,
427- )
428- . then ( ( selection ) => {
429- if ( selection === revealButtonText ) {
430- void vscode . commands . executeCommand (
431- REVEAL_FILE_IN_OS_COMMAND ,
432- vscode . Uri . file ( params . packageFilePath ) ,
433- ) ;
434- }
435- } ) ;
436395 // Prompt user for NPS survey feedback
437396 UserSurvey . getInstance ( ) . promptUserForNPSFeedback (
438397 `${ DACPAC_DIALOG_VIEW_ID } _extract` ,
@@ -492,10 +451,6 @@ export class DacpacDialogWebviewController extends ReactWebviewPanelController<
492451 if ( result . success ) {
493452 this . logger . verbose ( "Import BACPAC operation completed successfully" ) ;
494453 activity . end ( ActivityStatus . Succeeded ) ;
495- // Show success notification for Import operation
496- void this . vscodeWrapper . showInformationMessage (
497- LocConstants . DacpacDialog . ImportSuccessWithDatabase ( params . databaseName ) ,
498- ) ;
499454 // Prompt user for NPS survey feedback
500455 UserSurvey . getInstance ( ) . promptUserForNPSFeedback (
501456 `${ DACPAC_DIALOG_VIEW_ID } _import` ,
@@ -555,22 +510,6 @@ export class DacpacDialogWebviewController extends ReactWebviewPanelController<
555510 if ( result . success ) {
556511 this . logger . verbose ( "Export BACPAC operation completed successfully" ) ;
557512 activity . end ( ActivityStatus . Succeeded ) ;
558- // Show success notification with OS-specific "Reveal/Open" button for Export operation
559- const fileName = path . basename ( params . packageFilePath ) ;
560- const revealButtonText = getRevealInOsButtonText ( ) ;
561- void this . vscodeWrapper
562- . showInformationMessage (
563- LocConstants . DacpacDialog . ExportSuccessWithFile ( fileName ) ,
564- revealButtonText ,
565- )
566- . then ( ( selection ) => {
567- if ( selection === revealButtonText ) {
568- void vscode . commands . executeCommand (
569- REVEAL_FILE_IN_OS_COMMAND ,
570- vscode . Uri . file ( params . packageFilePath ) ,
571- ) ;
572- }
573- } ) ;
574513 // Prompt user for NPS survey feedback
575514 UserSurvey . getInstance ( ) . promptUserForNPSFeedback (
576515 `${ DACPAC_DIALOG_VIEW_ID } _export` ,
0 commit comments