This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 29819
Collapse All | Expand All

(-)org/netbeans/modules/diff/PatchAction.java (-1 / +21 lines)
Lines 212-217 Link Here
212
            if (NotifyDescriptor.YES_OPTION.equals(notifyResult)) {
212
            if (NotifyDescriptor.YES_OPTION.equals(notifyResult)) {
213
                showDiffs(appliedFiles, backups);
213
                showDiffs(appliedFiles, backups);
214
            }
214
            }
215
            removeBackups(appliedFiles, backups);
215
        }
216
        }
216
    }
217
    }
217
218
Lines 317-323 Link Here
317
    public HelpCtx getHelpCtx() {
318
    public HelpCtx getHelpCtx() {
318
        return new HelpCtx(PatchAction.class);
319
        return new HelpCtx(PatchAction.class);
319
    }
320
    }
320
321
    
322
    /** Removes the backup copies of files upon the successful application 
323
     * of a patch (.orig files).
324
     * @param files a list of files, to which the patch was successfully applied
325
     * @param backups a map of a form original file -> backup file
326
     */
327
    private static void removeBackups(ArrayList files, HashMap backups) {
328
        for (int i = 0; i < files.size(); i++) {
329
            try {
330
                ((FileObject) backups.get(files.get(i))).delete();
331
            }
332
            catch (IOException ioex) {
333
                ErrorManager.getDefault().notify(
334
                    ErrorManager.getDefault().annotate(ioex,
335
                        NbBundle.getMessage(PatchAction.class, "EXC_CannotRemoveBackup",
336
                            ioex.getLocalizedMessage())));
337
            }
338
        }
339
    }
340
    
321
    class ChooserListener implements ActionListener{
341
    class ChooserListener implements ActionListener{
322
        private JDialog dialog;
342
        private JDialog dialog;
323
        private JFileChooser chooser;
343
        private JFileChooser chooser;
(-)org/netbeans/modules/diff/Bundle.properties (+1 lines)
Lines 44-49 Link Here
44
MSG_NotFoundFiles=Following files are to be patched, but not found: {0}
44
MSG_NotFoundFiles=Following files are to be patched, but not found: {0}
45
MSG_PatchAppliedSuccessfully=Patch applied successfully. View applied changes?
45
MSG_PatchAppliedSuccessfully=Patch applied successfully. View applied changes?
46
MSG_PatchAppliedPartially=Patch applied partially. View applied changes?
46
MSG_PatchAppliedPartially=Patch applied partially. View applied changes?
47
EXC_CannotRemoveBackup=The backup copy of a file cannot be removed after succesfull application of a patch: {0}
47
48
48
# DiffSettingsBeanInfo
49
# DiffSettingsBeanInfo
49
PROP_diffService=Default Diff Service
50
PROP_diffService=Default Diff Service

Return to bug 29819