(T from, T to)
| 338 | } |
| 339 | |
| 340 | @Override |
| 341 | public <T extends Syntactic.Item> void replace(T from, T to) { |
| 342 | BitSet matches = findReachable(from, new BitSet()); |
| 343 | Decl.Module module = getModule(); |
| 344 | // Carefully remove all markers for items within that being replaced. |
| 345 | Tuple<Syntactic.Marker> markers = module.getAttributes(); |
| 346 | ArrayList<Syntactic.Item> items = new ArrayList<>(); |
| 347 | // |
| 348 | for(int i=0;i!=markers.size();++i) { |
| 349 | Syntactic.Item marker = markers.get(i); |
| 350 | for(int j=0;j!=marker.size();++j) { |
| 351 | if(matches.get(marker.get(j).getIndex())) { |
| 352 | // Found a match |
| 353 | items.add(marker); |
| 354 | break; |
| 355 | } |
| 356 | } |
| 357 | } |
| 358 | // Remove all existing markers |
| 359 | module.setAttributes(markers.removeAll(items)); |
| 360 | // Done |
| 361 | super.replace(from, to); |
| 362 | } |
| 363 | |
| 364 | /** |
| 365 | * A qualified name represents a <i>fully-qualified</i> name within a |
nothing calls this directly
no test coverage detected