private void removeSourceLinks(IVirtualComponent component, MavenProject mavenProject, IProgressMonitor monitor) throws CoreException {
IVirtualFolder jsrc = component.getRootFolder();
IProject project = component.getProject();
for(IPath location : MavenProjectUtils.getSourceLocations(project, mavenProject.getCompileSourceRoots())) {
jsrc.removeLink(location, 0, monitor);
}
for(IPath location : MavenProjectUtils.getResourceLocations(project, mavenProject.getResources())) {
jsrc.removeLink(location, 0, monitor);
}
}