The problem comes from the way the IJavaProject is obtained for a given project :
(IJavaProject) project.getNature(JavaCore.NATURE_ID)
This worked in previous versions because JavaProject directly implemented IJavaNature.
This is no longer the case since this PR eclipse-jdt/eclipse.jdt.core#1916 was merged.
The official API for getting the IJavaProject given an IProject is :
https://help.eclipse.org/latest/topic/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/JavaCore.html#create(org.eclipse.core.resources.IProject)
The problem comes from the way the IJavaProject is obtained for a given project :
This worked in previous versions because JavaProject directly implemented IJavaNature.
This is no longer the case since this PR eclipse-jdt/eclipse.jdt.core#1916 was merged.
The official API for getting the IJavaProject given an IProject is :
https://help.eclipse.org/latest/topic/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/JavaCore.html#create(org.eclipse.core.resources.IProject)