io.sarl.apputils.uiextensions
Class Bundles
final class Bundles
extends java.lang.Object
Utilities around bundles. It should be replaced by the OSGi, Eclipse and Xtext API.
Maven Group Identifier:
io.sarl.apputils
Maven Artifact Identifier:
uiextensions
Since:
0.15
Nested Type Summary
Modifier and type Type and description
class Bundles.BundleDependency
Container of bundle dependencies.
interface Bundles.IBundleDependencies
Container of bundle dependencies.
Field Summary
Modifier and type Field and description
public static val java.lang.String BIN_FOLDERS
OS-independent paths of the bin folders.
public static val java.lang.String SRC_FOLDERS
OS-independent paths of the source folders.
Action Summary
Modifier and type Action and description
protected static java.util.Set<E> createBundleDependencySet
Create an instance of a set of bundle dependencies.
static org.eclipse.core.runtime.IPath getBundlePath(Bundle)
Replies the path of the binary files of the given bundle.
static org.eclipse.core.runtime.IPath getJavadocBundlePath(Bundle,IPath)
Replies the javadoc location for the given bundle.
static org.eclipse.core.runtime.IPath getSourceBundlePath(Bundle,IPath)
Replies the source location for the given bundle.
static IBundleDependencies resolveBundleDependencies(Bundle)
Replies the dependencies for the given bundle.
static IBundleDependencies resolveBundleDependencies(Bundle,BundleURLMappings)
Replies the dependencies for the given bundle.
static IBundleDependencies resolveBundleDependenciesWithExtras(Bundle,String*)
Replies the dependencies for the given bundle.
static IBundleDependencies resolveBundleDependenciesWithExtras(Bundle,BundleURLMappings,String*)
Replies the dependencies for the given bundle.
static IBundleDependencies resolveBundleDependenciesWithFilter(Bundle,String*)
Replies the dependencies for the given bundle.
static IBundleDependencies resolveBundleDependenciesWithFilter(Bundle,BundleURLMappings,String*)
Replies the dependencies for the given bundle.
Field Details
BIN_FOLDERS
public static val BIN_FOLDERS : java.lang.String
OS-independent paths of the bin folders.
SRC_FOLDERS
public static val SRC_FOLDERS : java.lang.String
OS-independent paths of the source folders.
Action Details
createBundleDependencySet
protected def createBundleDependencySet : java.util.Set<E>
Create an instance of a set of bundle dependencies.
Returns:
the set.
Since:
0.13
getBundlePath(Bundle)
def getBundlePath(Bundle) : org.eclipse.core.runtime.IPath
Replies the path of the binary files of the given bundle.
Parameters:
bundle - the bundle for which the path must be retreived.
Returns:
the path to the binaries of the bundle.
See:
getSourceBundlePath(Bundle,IPath)
getJavadocBundlePath(Bundle,IPath)
def getJavadocBundlePath(Bundle,IPath) : org.eclipse.core.runtime.IPath
Replies the javadoc location for the given bundle.

We can't use P2Utils and we can't use SimpleConfiguratorManipulator because of API breakage between 3.5 and 4.2. So we do a bit EDV (Computer data processing) ;-)
Parameters:
bundle - the bundle for which the javadoc location must be computed.
bundleLocation - the location of the bundle, as replied by getBundlePath(Bundle).
Returns:
the path to the javadoc folder of the bundle, or null if undefined.
See:
getBundlePath(Bundle)
getSourceBundlePath(Bundle,IPath)
def getSourceBundlePath(Bundle,IPath) : org.eclipse.core.runtime.IPath
Replies the source location for the given bundle.

The source location is usually the root folder where the source code of the bundle is located.

We can't use P2Utils and we can't use SimpleConfiguratorManipulator because of API breakage between 3.5 and 4.2. So we do a bit EDV (Computer data processing) ;-)
Parameters:
bundle - the bundle for which the source location must be computed.
bundleLocation - the location of the bundle, as replied by getBundlePath(Bundle).
Returns:
the path to the source folder of the bundle, or null if undefined.
See:
getBundlePath(Bundle)
resolveBundleDependencies(Bundle)
def resolveBundleDependencies(Bundle) : IBundleDependencies
Replies the dependencies for the given bundle.
Parameters:
bundle - the bundle.
Returns:
the bundle dependencies.
resolveBundleDependencies(Bundle,BundleURLMappings)
def resolveBundleDependencies(Bundle,BundleURLMappings) : IBundleDependencies
Replies the dependencies for the given bundle.
Parameters:
bundle - the bundle.
javadocURLs - the mapping from bundles to the corresponding Javadoc URLs.
Returns:
the bundle dependencies.
resolveBundleDependenciesWithExtras(Bundle,String*)
def resolveBundleDependenciesWithExtras(Bundle,String*) : IBundleDependencies
Replies the dependencies for the given bundle.
Parameters:
bundle - the bundle.
extraDependencies - the list of the bundle symbolic names that are in the dependencies of the bundle to be considered. There bundles, and their transitive dependencies, are automatically added in the dependencies of the bundle.
Returns:
the bundle dependencies.
Since:
0.13
resolveBundleDependenciesWithExtras(Bundle,BundleURLMappings,String*)
def resolveBundleDependenciesWithExtras(Bundle,BundleURLMappings,String*) : IBundleDependencies
Replies the dependencies for the given bundle.
Parameters:
bundle - the bundle.
javadocURLs - the mapping from bundles to the corresponding Javadoc URLs.
extraDependencies - the list of the bundle symbolic names that are in the dependencies of the bundle to be considered. There bundles, and their transitive dependencies, are automatically added in the dependencies of the bundle.
Returns:
the bundle dependencies.
Since:
0.13
resolveBundleDependenciesWithFilter(Bundle,String*)
def resolveBundleDependenciesWithFilter(Bundle,String*) : IBundleDependencies
Replies the dependencies for the given bundle.
Parameters:
bundle - the bundle.
directDependencies - the list of the bundle symbolic names that are the direct dependencies of the bundle to be considered. If the given bundle has other dependencies in its Manifest, they will be ignored if they are not in this parameter.
Returns:
the bundle dependencies.
Since:
0.13
resolveBundleDependenciesWithFilter(Bundle,BundleURLMappings,String*)
def resolveBundleDependenciesWithFilter(Bundle,BundleURLMappings,String*) : IBundleDependencies
Replies the dependencies for the given bundle.
Parameters:
bundle - the bundle.
javadocURLs - the mapping from bundles to the corresponding Javadoc URLs.
directDependencies - the list of the bundle symbolic names that are the direct dependencies of the bundle to be considered. If the given bundle has other dependencies in its Manifest, they will be ignored if they are not in this parameter.
Returns:
the bundle dependencies.
Since:
0.13