540541542543544545546547548549550
//We also have to set the selected probe's group to be the correct one. //Find the group ProbeGroup pg = (ProbeGroup) DesignUtils.getGroupWithType(p, ProbeGroup.GROUP_TYPE); //Remove the current probe from the group if (pg != null) { pg.removeMember(p); } //Copy the selected probe p.copy(selected); //Add the copied probe to the group
123124125126127128129130131132
ProbeGroup pg = new ProbeGroup(tg, "PG"); assertEquals(0, pg.getMembers().size()); pg.addMember(p1); assertEquals(1, pg.getMembers().size()); p1.setName("Probe 1"); pg.removeMember(p1); assertEquals(0, pg.getMembers().size()); } }
539540541542543544545546547548549
541542543544545546547548549550551
537538539540541542543544545546547
} else { //We also have to set the selected probe's group to be the correct one. ProbeGroup pg = (ProbeGroup) DesignUtils.getGroupWithType(p, ProbeGroup.GROUP_TYPE); if (pg != null) { pg.removeMember(p); } //Copy the selected probe p.copy(selected);