01: /*******************************************************************************
02: * Copyright (c) 2000, 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.core;
11:
12: import org.eclipse.core.runtime.CoreException;
13: import org.eclipse.core.runtime.IPath;
14: import org.eclipse.jdt.core.IClasspathContainer;
15: import org.eclipse.jdt.core.IClasspathEntry;
16:
17: public class ExternalJavaSearchClasspathContainer implements
18: IClasspathContainer {
19: private IClasspathEntry[] fEntries;
20:
21: /*
22: * (non-Javadoc)
23: * @see org.eclipse.jdt.core.IClasspathContainer#getClasspathEntries()
24: */
25: public IClasspathEntry[] getClasspathEntries() {
26: if (fEntries == null) {
27: try {
28: SearchablePluginsManager manager = PDECore.getDefault()
29: .getSearchablePluginsManager();
30: fEntries = manager.computeContainerClasspathEntries();
31: } catch (CoreException e) {
32: PDECore.logException(e);
33: }
34: }
35: return fEntries;
36: }
37:
38: /*
39: * (non-Javadoc)
40: * @see org.eclipse.jdt.core.IClasspathContainer#getDescription()
41: */
42: public String getDescription() {
43: return PDECoreMessages.ExternalJavaSearchClasspathContainer_description;
44: }
45:
46: /*
47: * (non-Javadoc)
48: * @see org.eclipse.jdt.core.IClasspathContainer#getKind()
49: */
50: public int getKind() {
51: return K_APPLICATION;
52: }
53:
54: /*
55: * (non-Javadoc)
56: * @see org.eclipse.jdt.core.IClasspathContainer#getPath()
57: */
58: public IPath getPath() {
59: return PDECore.JAVA_SEARCH_CONTAINER_PATH;
60: }
61:
62: }
|