getContainingFile() instead of getParent() to eliminate ClassCastException in scala plugin