@@ -0,0 +1,1307 @@
+/*%0A * To change this license header, choose License Headers in Project Properties.%0A * To change this template file, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0Apackage latexstudio.editor.menu;%0A%0Aimport java.io.File;%0Aimport javax.swing.JOptionPane;%0Aimport latexstudio.editor.files.FileChooserService;%0A%0A/**%0A * Confirm file saving and show the confirmation dialog%0A * @author WhiteHsu%0A * @param reply reply from the JOptionPane dialog%0A * @param file the selected file%0A * @param currentFIle current file saved in Editor Top Component%0A * @re%0A */%0Apublic class SaveConfirmDialog %7B%0A    public static File confirmFileSave(int reply, File file, File currentFile) %7B%0A        while (file != null && file.exists() && file != currentFile && reply == JOptionPane.NO_OPTION) %7B            %0A            reply = JOptionPane.showConfirmDialog(null,%0A                            file.getAbsoluteFile() + %22 already exists. Do you want to overwrite it?%22,%0A                            %22File already exists.%22,%0A                            JOptionPane.YES_NO_OPTION);%0A            %0A            if (reply == JOptionPane.NO_OPTION) %7B%0A                file = FileChooserService.getSelectedFile(%22tex%22, %22TeX files%22, FileChooserService.DialogType.SAVE, true);%0A            %7D%0A        %7D%0A        %0A        return file;%0A    %7D%0A%7D%0A

Resolve the Savd Confirmation bug for Issue #83