blob: a848d5b3b09a67d2783c263260a6377cfa9d8183 [file] [log] [blame]
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//
= DevFaqNodeDeletionDialog
:jbake-type: wiki
:jbake-tags: wiki, devfaq, needsreview
:jbake-status: published
:keywords: Apache NetBeans wiki DevFaqNodeDeletionDialog
:description: Apache NetBeans wiki DevFaqNodeDeletionDialog
:toc: left
:toc-title:
:syntax: true
== How can I prevent (or override) the node deletion dialog?
By default, you will be prompted to confirm your intention whenever you try to delete a node from within an explorer manager view (for example, the projects tab). You can prevent this dialog from being shown, which is handy if the node is not important enough to warrant confirmation or if you want to instead show your own confirmation.
To do this, call `setValue("customDelete", Boolean.TRUE)` on the node on which you want to suppress confirmation. This can be done at any time before the `destroy()` method is invoked.
The above will suffice if you just want to suppress the aforementioned dialog which is sufficient for most customization cases. But if you need *total* control over node deletion, you can implement the link:http://bits.netbeans.org/dev/javadoc/org-openide-explorer/org/openide/explorer/ExtendedDelete.html[ExtendedDelete] interface.
=== Apache Migration Information
The content in this page was kindly donated by Oracle Corp. to the
Apache Software Foundation.
This page was exported from link:http://wiki.netbeans.org/DevFaqNodeDeletionDialog[http://wiki.netbeans.org/DevFaqNodeDeletionDialog] ,
that was last modified by NetBeans user Admin
on 2009-11-06T15:56:00Z.
*NOTE:* This document was automatically converted to the AsciiDoc format on 2018-02-07, and needs to be reviewed.