I basically check when adding a file if there is a jpaFile already present for this file. If this is the case I just return it otherwise, I delegate to the superclass. This fix solves the duplicate listener exception (https://issues.jboss.org/browse/JBIDE-12784).