blob: 7008b0359c7397254ee740abec6a68c4f8e97ae7 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009 IBM Corporation 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:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jst.common.jdt.internal.javalite;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.ClasspathContainerInitializer;
import org.eclipse.jdt.core.IAccessRule;
import org.eclipse.jdt.core.IClasspathAttribute;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
public final class JavaCoreLite {
public static String NATURE_ID = JavaCore.NATURE_ID;
public static final IJavaProjectLite create(IProject project) {
IJavaProject javaProject = JavaCore.create(project);
return create(javaProject);
}
public static final IJavaProjectLite create(IJavaProject javaProject) {
if (javaProject != null) {
return new JavaProjectLite(javaProject);
}
return null;
}
public static ClasspathContainerInitializer getClasspathContainerInitializer(String containerID) {
return JavaCore.getClasspathContainerInitializer(containerID);
}
public static IClasspathEntry newProjectEntry(IPath path) {
return JavaCore.newProjectEntry(path);
}
public static IClasspathEntry newProjectEntry(IPath path, boolean isExported) {
return JavaCore.newProjectEntry(path, isExported);
}
public static IClasspathEntry newProjectEntry(IPath path, IAccessRule[] accessRules, boolean combineAccessRules, IClasspathAttribute[] extraAttributes, boolean isExported) {
return JavaCore.newProjectEntry(path, accessRules, combineAccessRules, extraAttributes, isExported);
}
public static IClasspathEntry newLibraryEntry(IPath path, IPath sourceAttachmentPath, IPath sourceAttachmentRootPath) {
return JavaCore.newLibraryEntry(path, sourceAttachmentPath, sourceAttachmentRootPath);
}
public static IClasspathEntry newLibraryEntry(IPath path, IPath sourceAttachmentPath, IPath sourceAttachmentRootPath, boolean isExported) {
return JavaCore.newLibraryEntry(path, sourceAttachmentPath, sourceAttachmentRootPath, isExported);
}
public static IClasspathEntry newLibraryEntry(IPath path, IPath sourceAttachmentPath, IPath sourceAttachmentRootPath, IAccessRule[] accessRules, IClasspathAttribute[] extraAttributes, boolean isExported) {
return JavaCore.newLibraryEntry(path, sourceAttachmentPath, sourceAttachmentRootPath, accessRules, extraAttributes, isExported);
}
}