Source:
private void synchronizeOpenWorkspaceProject(OmniEclipseProject project, IProject workspaceProject, SubMonitor progress) throws CoreException { progress.setWorkRemaining(9); CorePlugin.workspaceOperations().refreshProject(workspaceProject, progress.newChild(1)); workspaceProject = ProjectNameUpdater.updateProjectName(workspaceProject, project, this.allProjects, progress.newChild(1)); CorePlugin.workspaceOperations().addNature(workspaceProject, GradleProjectNature.ID, progress.newChild(1)); Optional<ProjectConfiguration> projectConfig = CorePlugin.projectConfigurationManager().tryReadProjectConfiguration(workspaceProject); ProjectConfiguration configuration = projectConfig.isPresent() ? ProjectConfiguration.fromProjectConfig(projectConfig.get(), this.build.getProjectDir(), this.build.getGradleDistribution()) : ProjectConfiguration.fromWorkspaceConfig(workspaceProject, this.build.getProjectDir(), this.build.getGradleDistribution()); CorePlugin.projectConfigurationManager().saveProjectConfiguration(configuration); PersistentModelBuilder persistentModel = new PersistentModelBuilder(CorePlugin.modelPersistence().loadModel(workspaceProject)); LinkedResourcesUpdater.update(workspaceProject, project.getLinkedResources(), persistentModel, progress.newChild(1)); SubprojectMarkerUpdater.update(workspaceProject, project, persistentModel, progress.newChild(1)); DerivedResourcesUpdater.update(workspaceProject, project, persistentModel, progress.newChild(1)); ProjectNatureUpdater.update(workspaceProject, project.getProjectNatures(), progress.newChild(1)); BuildCommandUpdater.update(workspaceProject, project.getBuildCommands(), progress.newChild(1)); if (isJavaProject(project)) { synchronizeJavaProject(project, workspaceProject, persistentModel, progress); } else { persistentModel.classpath(ImmutableList.<IClasspathEntry>of()); } CorePlugin.modelPersistence().saveModel(persistentModel.build()); }

Target:
private void synchronizeOpenWorkspaceProject(OmniEclipseProject project, IProject workspaceProject, SubMonitor progress) throws CoreException { progress.setWorkRemaining(9); CorePlugin.workspaceOperations().refreshProject(workspaceProject, progress.newChild(1)); workspaceProject = ProjectNameUpdater.updateProjectName(workspaceProject, project, this.allProjects, progress.newChild(1)); ConfigurationManager configManager = CorePlugin.configurationManager(); ProjectConfiguration projectConfig = configManager.createProjectConfiguration(this.buildConfig, project.getProjectDirectory()); configManager.saveProjectConfiguration(projectConfig); CorePlugin.workspaceOperations().addNature(workspaceProject, GradleProjectNature.ID, progress.newChild(1)); PersistentModelBuilder persistentModel = new PersistentModelBuilder(CorePlugin.modelPersistence().loadModel(workspaceProject)); LinkedResourcesUpdater.update(workspaceProject, project.getLinkedResources(), persistentModel, progress.newChild(1)); GradleFolderUpdater.update(workspaceProject, project, persistentModel, progress.newChild(1)); ProjectNatureUpdater.update(workspaceProject, project.getProjectNatures(), progress.newChild(1)); BuildCommandUpdater.update(workspaceProject, project.getBuildCommands(), progress.newChild(1)); if (isJavaProject(project)) { synchronizeJavaProject(project, workspaceProject, persistentModel, progress); } else { persistentModel.classpath(ImmutableList.<IClasspathEntry>of()); } CorePlugin.modelPersistence().saveModel(persistentModel.build()); }