store `@:realPath` of class fields and use it for xml generation (closes #3270)