use of org.eclipse.che.plugin.maven.server.core.MavenClasspathContainer in project che by eclipse.
the class ClasspathManager method updateClasspath.
public void updateClasspath(MavenProject mavenProject) {
IJavaProject javaProject = JavaCore.create(mavenProject.getProject());
if (javaProject != null) {
IClasspathEntry[] entries = getClasspath(mavenProject);
MavenClasspathContainer container = new MavenClasspathContainer(entries);
try {
JavaCore.setClasspathContainer(new Path(MavenClasspathContainer.CONTAINER_ID), new IJavaProject[] { javaProject }, new IClasspathContainer[] { container }, new NullProgressMonitor());
} catch (JavaModelException e) {
LOG.error(e.getMessage(), e);
}
}
}
Aggregations