Fixed ClassCastException in ResourceEditingSupport.

Change-Id: I4eabec80ca5e4f367d57172a77f9ea1516e294da