blob: 090428653cdb4f330a7e915483141b0636dadba9 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2006, 2010 Soyatec (http://www.soyatec.com) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Soyatec - initial API and implementation
*******************************************************************************/
package org.eclipse.xwt.ui.jdt;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IClasspathContainer;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
public class ClasspathContainerInitializer extends org.eclipse.jdt.core.ClasspathContainerInitializer {
public ClasspathContainerInitializer() {
}
@Override
public void initialize(IPath containerPath, IJavaProject project) throws CoreException {
int size = containerPath.segmentCount();
if (size > 0) {
if (containerPath.segment(0).equals(IContainerConstants.LIB_CONTAINER)) {
ClasspathContainer container = ProjectHelper.createContainer();
JavaCore.setClasspathContainer(containerPath, new IJavaProject[] { project }, new IClasspathContainer[] { container }, null);
}
}
}
}