blob: f7891a91f0bc109cd9ddf569e1f5581071c9e0ed [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2003, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - Initial API and implementation
*******************************************************************************/
package org.eclipse.jst.server.core.internal;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jst.server.core.RuntimeClasspathProviderDelegate;
import org.eclipse.wst.server.core.IRuntime;
/**
*
*/
public class GenericRuntimeClasspathProvider extends RuntimeClasspathProviderDelegate {
/** (non-Javadoc)
* @see RuntimeClasspathProviderDelegate#resolveClasspathContainer(IProject, IRuntime)
*/
public IClasspathEntry[] resolveClasspathContainer(IProject project, IRuntime runtime) {
IPath installPath = runtime.getLocation();
if (installPath == null)
return new IClasspathEntry[0];
List<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
addLibraryEntries(list, installPath.toFile(), false);
return list.toArray(new IClasspathEntry[list.size()]);
}
}