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 168267
Collapse All | Expand All

(-)a/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/Bundle.properties (+2 lines)
Lines 143-145 Link Here
143
LBL_ProposedRefactoring=Proposed Refactoring
143
LBL_ProposedRefactoring=Proposed Refactoring
144
LBL_NewFile=New File
144
LBL_NewFile=New File
145
LBL_Refactored=Refactored {0}
145
LBL_Refactored=Refactored {0}
146
SAFE_DELETE_QUESTION=Would you like to invoke safe delete?
147
SAFE_DELETE_QUESTION_TITLE=Refactoring safe delete
(-)a/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/SafeDeleteAction.java (+14 lines)
Lines 44-51 Link Here
44
import java.util.logging.LogRecord;
44
import java.util.logging.LogRecord;
45
import java.util.logging.Logger;
45
import java.util.logging.Logger;
46
import javax.swing.SwingUtilities;
46
import javax.swing.SwingUtilities;
47
import javax.swing.text.html.Option;
47
import org.netbeans.modules.refactoring.api.impl.ActionsImplementationFactory;
48
import org.netbeans.modules.refactoring.api.impl.ActionsImplementationFactory;
48
import org.netbeans.modules.refactoring.api.ui.ExplorerContext;
49
import org.netbeans.modules.refactoring.api.ui.ExplorerContext;
50
import org.openide.DialogDescriptor;
51
import org.openide.DialogDisplayer;
52
import org.openide.NotifyDescriptor;
49
import org.openide.nodes.Node;
53
import org.openide.nodes.Node;
50
import org.openide.util.HelpCtx;
54
import org.openide.util.HelpCtx;
51
import org.openide.util.Lookup;
55
import org.openide.util.Lookup;
Lines 108-113 Link Here
108
    private boolean regularDelete = false;
112
    private boolean regularDelete = false;
109
    public boolean delete(final Node[] nodes) {
113
    public boolean delete(final Node[] nodes) {
110
        if (enable(nodes)) {
114
        if (enable(nodes)) {
115
            if (nodes.length > 1) {
116
                Object o = DialogDisplayer.getDefault().notify(new NotifyDescriptor (
117
                        NbBundle.getBundle(SafeDeleteAction.class).getString("SAFE_DELETE_QUESTION"), // NOI18N
118
                        NbBundle.getBundle(SafeDeleteAction.class).getString("SAFE_DELETE_QUESTION_TITLE"), // NOI18N
119
                        DialogDescriptor.YES_NO_OPTION,
120
                        DialogDescriptor.QUESTION_MESSAGE, null, DialogDescriptor.NO_OPTION));
121
                if (!DialogDescriptor.YES_OPTION.equals(o)) {
122
                    return false;
123
                }
124
            }
111
            if (java.awt.EventQueue.isDispatchThread()) {
125
            if (java.awt.EventQueue.isDispatchThread()) {
112
                regularDelete = true;
126
                regularDelete = true;
113
                performAction(nodes);
127
                performAction(nodes);

Return to bug 168267