public void childAdded(@NotNull PsiTreeChangeEvent event) {
final PsiElement parent = event.getParent();
PsiElement child = event.getChild();
if (isStepLikeFile(child, parent)) {
final PsiFile file = (PsiFile)child;
result.myUpdateQueue.queue(new Update(parent) {
public void run() {
if (file.isValid()) {
reloadAbstractStepDefinitions(file);
createWatcher(file);
}
}
});
}
}
@Override
public void childRemoved(@NotNull PsiTreeChangeEvent event) {
final PsiElement parent = event.getParent();
final PsiElement child = event.getChild();
if (isStepLikeFile(child, parent)) {
result.myUpdateQueue.queue(new Update(parent) {
public void run() {
removeAbstractStepDefinitionsRelatedTo((PsiFile)child);
}
});
}