private void delete(int[] rows) throws CancelledException {

		int n = rows.length;
		Arrays.sort(rows);

		Set<Integer> rowSet = new HashSet<>();

		for (int i = n - 1; i >= 0; i--) {
			int rowIndex = rows[i];
			int componentOrdinal = convertRowToOrdinal(rowIndex);
			if (componentOrdinal < currentEditRow) {
				currentEditRow--;
			}
			rowSet.add(componentOrdinal);
		}

		viewDTM.withTransaction("Delete Components", () -> viewComposite.delete(rowSet));

		// Not sure if this is the right behavior.  Assuming the deleted rows were selected,
		// restore the selection to be the first row that was deleted so that the UI leaves the
		// user's selection close to where it was.
		if (rows.length > 0) {
			setSelection(new int[] { rows[0] });
		}

		notifyCompositeChanged();

	}
Delete the components at the specified indices.

<br> Note: this method does not fix the selection based on lock mode
and does not perform any edit notification.

@param rows array with each row (component) index to delete
@throws CancelledException if cancelled
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/CompEditorModel.java