public synchronized void invalidatePackageCache( @Observes final InvalidateDMOPackageCacheEvent event ) { PortablePreconditions.checkNotNull( "event", event ); final Path resourcePath = event.getResourcePath(); final Path packagePath = projectService.resolvePackage( resourcePath ); //If resource was not within a Package there's nothing to invalidate if ( packagePath != null ) { invalidateCache( packagePath ); } }