org.eclipse.jdt.internal.core
Class ExternalJavaProject
java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.jdt.internal.core.JavaElement
org.eclipse.jdt.internal.core.Openable
org.eclipse.jdt.internal.core.JavaProject
org.eclipse.jdt.internal.core.ExternalJavaProject
- All Implemented Interfaces:
- IProjectNature, org.eclipse.core.runtime.IAdaptable, IBufferChangedListener, IJavaElement, IJavaProject, IOpenable, IParent, SuffixConstants
public class ExternalJavaProject
- extends JavaProject
Fields inherited from class org.eclipse.jdt.internal.core.JavaElement |
JEM_ANNOTATION, JEM_CLASSFILE, JEM_COMPILATIONUNIT, JEM_COUNT, JEM_ESCAPE, JEM_FIELD, JEM_IMPORTDECLARATION, JEM_INITIALIZER, JEM_JAVAPROJECT, JEM_LOCALVARIABLE, JEM_METHOD, JEM_PACKAGEDECLARATION, JEM_PACKAGEFRAGMENT, JEM_PACKAGEFRAGMENTROOT, JEM_TYPE, JEM_TYPE_PARAMETER |
Fields inherited from interface org.eclipse.jdt.core.IJavaElement |
ANNOTATION, CLASS_FILE, COMPILATION_UNIT, FIELD, IMPORT_CONTAINER, IMPORT_DECLARATION, INITIALIZER, JAVA_MODEL, JAVA_PROJECT, LOCAL_VARIABLE, METHOD, PACKAGE_DECLARATION, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE, TYPE_PARAMETER |
Fields inherited from interface org.eclipse.jdt.internal.compiler.util.SuffixConstants |
EXTENSION_class, EXTENSION_CLASS, EXTENSION_java, EXTENSION_JAVA, SUFFIX_class, SUFFIX_CLASS, SUFFIX_java, SUFFIX_JAVA, SUFFIX_STRING_class, SUFFIX_STRING_CLASS, SUFFIX_STRING_java, SUFFIX_STRING_JAVA |
Method Summary |
boolean |
equals(java.lang.Object o)
Returns true if this handle represents the same Java project
as the given handle. |
boolean |
exists()
Returns whether this Java element exists in the model. |
java.lang.String |
getOption(java.lang.String optionName,
boolean inheritJavaCoreOptions)
Helper method for returning one option value only. |
boolean |
isOnClasspath(IJavaElement element)
Returns whether the given element is on the classpath of this project,
that is, referenced from a classpath entry and not explicitly excluded
using an exclusion pattern. |
boolean |
isOnClasspath(IResource resource)
Returns whether the given resource is on the classpath of this project,
that is, referenced from a classpath entry and not explicitly excluded
using an exclusion pattern. |
Methods inherited from class org.eclipse.jdt.internal.core.JavaProject |
areClasspathsEqual, canonicalizedPath, computePackageFragmentRoots, computePackageFragmentRoots, computePackageFragmentRoots, computePackageFragmentRoots, computeSharedPropertyFileName, configure, contains, createClasspathProblemMarker, decodeClasspath, decodeClasspathEntry, deconfigure, encodeClasspathEntry, findElement, findElement, findElement, findPackageFragment, findPackageFragment, findPackageFragmentRoot, findPackageFragmentRoot0, findPackageFragmentRoots, findType, findType, findType, findType, findType, findType, findType, findType, getAccessRestrictions, getAllPackageFragmentRoots, getAllPackageFragmentRoots, getClasspathEntryFor, getCycleMarker, getEclipsePreferences, getElementName, getElementType, getExpandedClasspath, getFolderPackageFragmentRoot, getHandleFromMemento, getNonJavaResources, getOptions, getOutputLocation, getPackageFragmentRoot, getPackageFragmentRoot, getPackageFragmentRoot, getPackageFragmentRoot0, getPackageFragmentRoots, getPackageFragmentRoots, getPackageFragments, getPackageFragmentsInRoots, getPath, getPerProjectInfo, getPreferences, getProject, getProjectCache, getRawClasspath, getRequiredProjectNames, getResolvedClasspath, getResolvedClasspath, getSharedProperty, getSourceMapper, getUnderlyingResource, hasBuildState, hasClasspathCycle, hasCycleMarker, hashCode, hasJavaNature, hasSource, newEvaluationContext, newNameLookup, newNameLookup, newSearchableNameEnvironment, newSearchableNameEnvironment, newTypeHierarchy, newTypeHierarchy, newTypeHierarchy, newTypeHierarchy, projectPrerequisites, readFileEntriesWithException, readOutputLocation, readRawClasspath, resetCaches, resolveClasspath, resolveClasspath, resource, rootID, setOption, setOptions, setOutputLocation, setProject, setRawClasspath, setRawClasspath, setRawClasspath, setRawClasspath, setSharedProperty, updateCycleParticipants, validateCycles, writeFileEntries |
Methods inherited from class org.eclipse.jdt.internal.core.Openable |
bufferChanged, canBeRemovedFromCache, canBufferBeRemovedFromCache, findRecommendedLineSeparator, getBuffer, getBufferFactory, getCorrespondingResource, getOpenable, getPackageFragmentRoot, getResource, hasUnsavedChanges, isConsistent, isOpen, isStructureKnown, makeConsistent, open, resource, save |
Methods inherited from class org.eclipse.jdt.internal.core.JavaElement |
close, findNode, getAncestor, getAttachedJavadoc, getChildren, getChildrenOfType, getClassFile, getCompilationUnit, getElementInfo, getElementInfo, getHandleFromMemento, getHandleIdentifier, getHandleMemento, getJavaModel, getJavaProject, getOpenableParent, getParent, getPrimaryElement, getPrimaryElement, getSchedulingRule, hasChildren, isAncestorOf, isReadOnly, newJavaModelException, newNotPresentException, readableName, resolved, toDebugString, toString, toStringInfo, toStringWithAncestors, toStringWithAncestors, unresolved |
Methods inherited from class org.eclipse.core.runtime.PlatformObject |
getAdapter |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.jdt.core.IJavaElement |
getAncestor, getAttachedJavadoc, getCorrespondingResource, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPrimaryElement, getResource, getSchedulingRule, isReadOnly, isStructureKnown |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
EXTERNAL_PROJECT_NAME
public static final java.lang.String EXTERNAL_PROJECT_NAME
- See Also:
- Constant Field Values
ExternalJavaProject
public ExternalJavaProject(IClasspathEntry[] rawClasspath)
equals
public boolean equals(java.lang.Object o)
- Description copied from class:
JavaProject
- Returns true if this handle represents the same Java project
as the given handle. Two handles represent the same
project if they are identical or if they represent a project with
the same underlying resource and occurrence counts.
- Overrides:
equals
in class JavaProject
- See Also:
JavaElement.equals(Object)
exists
public boolean exists()
- Description copied from interface:
IJavaElement
- Returns whether this Java element exists in the model.
Java elements are handle objects that may or may not be backed by an
actual element. Java elements that are backed by an actual element are
said to "exist", and this method returns true
. For Java
elements that are not working copies, it is always the case that if the
element exists, then its parent also exists (provided it has one) and
includes the element as one of its children. It is therefore possible
to navigated to any existing Java element from the root of the Java model
along a chain of existing Java elements. On the other hand, working
copies are said to exist until they are destroyed (with
IWorkingCopy.destroy
). Unlike regular Java elements, a
working copy never shows up among the children of its parent element
(which may or may not exist).
- Specified by:
exists
in interface IJavaElement
- Overrides:
exists
in class Openable
- Returns:
true
if this element exists in the Java model, and
false
if this element does not exist- See Also:
IJavaElement
getOption
public java.lang.String getOption(java.lang.String optionName,
boolean inheritJavaCoreOptions)
- Description copied from interface:
IJavaProject
- Helper method for returning one option value only. Equivalent to
(String)this.getOptions(inheritJavaCoreOptions).get(optionName)
Note that it may answer null
if this option does not exist, or if there is no custom value for it.
For a complete description of the configurable options, see JavaCore#getDefaultOptions
.
- Specified by:
getOption
in interface IJavaProject
- Overrides:
getOption
in class JavaProject
- Parameters:
optionName
- the name of an optioninheritJavaCoreOptions
- - boolean indicating whether JavaCore options should be inherited as well
- Returns:
- the String value of a given option
- See Also:
IJavaProject.getOption(String, boolean)
isOnClasspath
public boolean isOnClasspath(IJavaElement element)
- Description copied from interface:
IJavaProject
- Returns whether the given element is on the classpath of this project,
that is, referenced from a classpath entry and not explicitly excluded
using an exclusion pattern.
- Specified by:
isOnClasspath
in interface IJavaProject
- Overrides:
isOnClasspath
in class JavaProject
- Parameters:
element
- the given element
- Returns:
true
if the given element is on the classpath of
this project, false
otherwise- See Also:
IClasspathEntry.getInclusionPatterns()
,
IClasspathEntry.getExclusionPatterns()
isOnClasspath
public boolean isOnClasspath(IResource resource)
- Description copied from interface:
IJavaProject
- Returns whether the given resource is on the classpath of this project,
that is, referenced from a classpath entry and not explicitly excluded
using an exclusion pattern.
- Specified by:
isOnClasspath
in interface IJavaProject
- Overrides:
isOnClasspath
in class JavaProject
- Parameters:
resource
- the given resource
- Returns:
true
if the given resource is on the classpath of
this project, false
otherwise- See Also:
IClasspathEntry.getInclusionPatterns()
,
IClasspathEntry.getExclusionPatterns()