1818
1919import java .io .File ;
2020import java .io .IOException ;
21+ import java .util .Collection ;
2122import java .util .LinkedHashSet ;
2223import java .util .Optional ;
2324import java .util .Set ;
3031import org .eclipse .buildship .core .internal .workspace .FetchStrategy ;
3132import org .eclipse .buildship .core .internal .workspace .InternalGradleBuild ;
3233import org .eclipse .buildship .core .internal .workspace .InternalGradleWorkspace ;
33- import org .eclipse .buildship .core .internal .workspace .ModelProviderUtil ;
3434import org .eclipse .core .resources .IProject ;
3535import org .eclipse .core .runtime .CoreException ;
3636import org .eclipse .core .runtime .IProgressMonitor ;
@@ -74,16 +74,16 @@ private void configureProject(IProject project, IProgressMonitor monitor) throws
7474 InternalGradleWorkspace workspace = CorePlugin .internalGradleWorkspace ();
7575 Optional <GradleBuild > build = workspace .getBuild (project );
7676 if (build .isPresent ()) {
77- Set <EclipseProject > projects = ModelProviderUtil . fetchAllEclipseProjects ((InternalGradleBuild ) build .get (),
78- this . tokenSource , FetchStrategy .FORCE_RELOAD , monitor );
77+ Collection <EclipseProject > projects = ((InternalGradleBuild ) build .get ()). getModelProvider ()
78+ . fetchModels ( EclipseProject . class , FetchStrategy .FORCE_RELOAD , this . tokenSource , monitor );
7979 if (hasSpringFormatPlugin (projects )) {
8080 ProjectSettingsFilesLocator locator = new ProjectSettingsFilesLocator (getSearchFolders (projects ));
8181 locator .locateSettingsFiles ().applyToProject (project , monitor );
8282 }
8383 }
8484 }
8585
86- private boolean hasSpringFormatPlugin (Set <EclipseProject > projects ) {
86+ private boolean hasSpringFormatPlugin (Collection <EclipseProject > projects ) {
8787 for (EclipseProject project : projects ) {
8888 for (GradleTask task : project .getGradleProject ().getTasks ()) {
8989 if (isSpringFormatPlugin (task )) {
@@ -98,7 +98,7 @@ private boolean isSpringFormatPlugin(GradleTask task) {
9898 return TASK_NAME .equals (task .getName ());
9999 }
100100
101- private Set <File > getSearchFolders (Set <EclipseProject > projects ) {
101+ private Set <File > getSearchFolders (Collection <EclipseProject > projects ) {
102102 Set <File > searchFolders = new LinkedHashSet <>();
103103 for (EclipseProject project : projects ) {
104104 while (project != null ) {
0 commit comments