Package org.eclipse.pde.core.target
Class TargetBundle
java.lang.Object
org.eclipse.pde.core.target.TargetBundle
Describes a single bundle in a target definition. Also used to represent
content in the target that is missing or invalid.
- Since:
- 3.8
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BundleInfoprotected booleanprotected Stringprotected BundleInfostatic final intStatus code indicating that this target bundle represents a required feature that is missing from a target definitionstatic final intDeprecated, for removal: This API element is subject to removal in a future version.not used anymorestatic final intStatus code indicating that this target bundle represents a required plug-in that is missing from a target definitionstatic final intStatus code indicating that a required bundle version does not exist (a bundle with the correct symbolic name is present, but the specified version was not found). -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs an empty target bundle with no information.TargetBundle(File bundleLocation) Constructs a target bundle for a local bundle. -
Method Summary
Modifier and TypeMethodDescriptionReturns aBundleInfoobject containing additional information about the bundle this target bundle represents.Returns bundle relative path to old-style source folders, ornullif not applicable.If this bundle is a source bundle this method returns a bundle info representing the executable bundle that this bundle provides source for.Returns a status object describing any problems with this target bundle.booleanReturns whether this bundle is a fragment.booleanReturnstrueif this bundle is a source bundle andfalseif this bundle is an executable bundle.toString()
-
Field Details
-
STATUS_PLUGIN_DOES_NOT_EXIST
public static final int STATUS_PLUGIN_DOES_NOT_EXISTStatus code indicating that this target bundle represents a required plug-in that is missing from a target definition- See Also:
-
STATUS_FEATURE_DOES_NOT_EXIST
public static final int STATUS_FEATURE_DOES_NOT_EXISTStatus code indicating that this target bundle represents a required feature that is missing from a target definition- See Also:
-
STATUS_VERSION_DOES_NOT_EXIST
public static final int STATUS_VERSION_DOES_NOT_EXISTStatus code indicating that a required bundle version does not exist (a bundle with the correct symbolic name is present, but the specified version was not found).- See Also:
-
STATUS_INVALID_MANIFEST
Deprecated, for removal: This API element is subject to removal in a future version.not used anymoreStatus code indicating that a bundle's manifest could not be read, or did not exist.- See Also:
-
fInfo
-
fIsFragment
protected boolean fIsFragment -
fSourceTarget
-
fSourcePath
-
-
Constructor Details
-
TargetBundle
Constructs a target bundle for a local bundle. The bundle may be a directory or an archive file. The manifest of the bundle will be read to collect the additional information.- Parameters:
bundleLocation- the location of the bundle (directory or archive) to open- Throws:
CoreException- if there is a problem opening the bundle or its manifest
-
TargetBundle
protected TargetBundle()Constructs an empty target bundle with no information.
-
-
Method Details
-
getBundleInfo
Returns aBundleInfoobject containing additional information about the bundle this target bundle represents. It is not guaranteed that the bundle info will have any fields set. The base implementation ofTargetBundlewill fill in the location, symbolic name and version if that information was available in the bundle's manifest.- Returns:
- a bundle info object with information on the bundle this target bundle represents
-
getStatus
Returns a status object describing any problems with this target bundle. The base implementation ofTargetBundlewill always return an OK status.- Returns:
- status of this bundle
-
isSourceBundle
public boolean isSourceBundle()Returnstrueif this bundle is a source bundle andfalseif this bundle is an executable bundle.- Returns:
- whether the resolved bundle is a source bundle
-
getSourceTarget
If this bundle is a source bundle this method returns a bundle info representing the executable bundle that this bundle provides source for. The returned bundle info may not have a symbolic name and version set if this source bundle is an old style source plug-in.- Returns:
- bundle info representing bundle this bundle provides source for or
null
-
isFragment
public boolean isFragment()Returns whether this bundle is a fragment.- Returns:
- whether this bundle is a fragment
-
getSourcePath
Returns bundle relative path to old-style source folders, ornullif not applicable.- Returns:
- bundle relative path to old-style source folders, or
null
-
toString
-