KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > ExternalJavaSearchClasspathContainer


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.core;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.core.runtime.IPath;
15 import org.eclipse.jdt.core.IClasspathContainer;
16 import org.eclipse.jdt.core.IClasspathEntry;
17
18 public class ExternalJavaSearchClasspathContainer implements 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().getSearchablePluginsManager();
29                 fEntries = manager.computeContainerClasspathEntries();
30             }
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 JavaDoc 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 }
63
Popular Tags