fix ClassCastException for New > Module/Package/File on Module node
Merge pull request #1025 from sgalles/module-create-unit

fix ClassCastException for New > Module/Package/File on Module node