use of org.eclipse.wst.dtd.core.internal.util.DTDBatchNodeDelete in project webtools.sourceediting by eclipse.
the class DeleteAction method run.
public void run() {
IStructuredSelection selection = getStructuredSelection();
Iterator iter = selection.iterator();
DTDBatchNodeDelete batchDelete = null;
DTDFile dtdFile = null;
while (iter.hasNext()) {
Object element = iter.next();
if (element instanceof DTDNode) {
DTDNode node = (DTDNode) element;
dtdFile = node.getDTDFile();
if (batchDelete == null) {
batchDelete = new DTDBatchNodeDelete(dtdFile);
}
batchDelete.addNode((DTDNode) element);
}
}
// $NON-NLS-1$
dtdFile.getDTDModel().beginRecording(this, DTDUIMessages._UI_LABEL_DTD_FILE_DELETE);
batchDelete.deleteNodes(this);
dtdFile.getDTDModel().endRecording(this);
}
Aggregations