public void remove() {
ProfileForm selectedProfile = droidContext.getSelectedProfile();
DefaultTreeModel treeMdl = selectedProfile.getTreeModel();
Outline outline = selectedProfile.getResultsOutline();
ProfileInstance profile = selectedProfile.getProfile();
int[] selectedRows = outline.getSelectedRows();
for (int i = selectedRows.length; i > 0; i--) {
// remove node from profile spec
int index = selectedRows[i - 1];
DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) outline
.getValueAt(index, 0);
ProfileResourceNode prn = (ProfileResourceNode) treeNode
.getUserObject();
if (profile.removeResource(prn.getUri())) {
treeMdl.removeNodeFromParent(treeNode);