private void unregisterNode(@NotNull MPSTreeNode node) { Feature feature = myFeatureExtractor.getFeature(node); if (feature != null) { synchronized (myFeaturesHolder) { if (myFeaturesHolder.getNodesByFeature(feature).contains(node)) { myFeaturesHolder.removeNodeWithFeature(feature, node); } else { if (LOG.isEnabledFor(Priority.ERROR)) { LOG.error( "trying to remove tree node which was not registered: " + node.getClass().getName() + " " + feature); } } } unhighlightNode(node); } }
private void rehighlightFeature(@NotNull Feature feature) { for (MPSTreeNode node : CollectionSequence.fromCollection(myFeaturesHolder.getNodesByFeature(feature))) { rehighlightNode(node, feature); } }