Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 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 Contributors: IBM Corporation - initial API and implementation /
package org.eclipse.jdt.internal.core;
import  org.eclipse.core.resources.IResource;
import  org.eclipse.core.resources.ResourcesPlugin;
import  org.eclipse.core.runtime.IStatus;
public class ExternalJavaProject extends JavaProject {
	 * Note this name can be surfaced in the UI (see
	public static final String EXTERNAL_PROJECT_NAME = " "//$NON-NLS-1$
	public ExternalJavaProject(IClasspathEntry[] rawClasspath) {
		super(ResourcesPlugin.getWorkspace().getRoot().getProject(), JavaModelManager.getJavaModelManager().getJavaModel());
		try {
			getPerProjectInfo().setRawClasspath(rawClasspathdefaultOutputLocation(), ./*no .classpath format problem*/);
catch (JavaModelException e) {
			// getPerProjectInfo() never throws JavaModelException for an ExternalJavaProject
	public boolean equals(Object o) {
		return this == o;
	public boolean exists() {
		// external project never exists
		return false;
	public String getOption(String optionNameboolean inheritJavaCoreOptions) {
			return .;
		return super.getOption(optionNameinheritJavaCoreOptions);
	public boolean isOnClasspath(IJavaElement element) {
		// since project is external, no element is on classpath (see
		return false;
	public boolean isOnClasspath(IResource resource) {
		// since project is external, no resource is on classpath (see
		return false;
	protected IStatus validateExistence(IResource underlyingResource) {
		// allow opening of external project
New to GrepCode? Check out our FAQ X