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); |