int (boolean keysToo, Object... keys) { IntList rows = new IntArrayList(); boolean toOverride = false; for (int i = 0, size = myModel.data.size(); i < size; i++) { Pair<Object, T> p = myModel.data.get(i); if (p.first instanceof VirtualFile) { for (Object key : keys) { if (key == p.first) { if (keysToo) rows.add(-i - 1); break; } else if (keyMatches(key, (VirtualFile)p.first, true)) { toOverride = true; rows.add(i); break; } } } } int ret = !toOverride ? Messages.NO : askUserToOverrideSubdirectories(); if (ret == Messages.CANCEL) return ret; int count = 0; for (int i : rows.toIntArray()) { if (i >= 0 && ret == Messages.NO) continue; int index = (i >= 0 ? i : -i - 1) - count; if (canRemoveTarget(myModel.data.get(index).first)) { myModel.data.remove(index); count ++; } else { myModel.data.set(index, pair(myModel.data.get(0).first, null)); } } if (!rows.isEmpty()) { myModel.fireTableDataChanged(); } return ret; }