io.sarl.apputils.uiextensions
Class Utilities
final class Utilities
extends java.lang.Object
Utilities.
Maven Group Identifier:
io.sarl.apputils
Maven Artifact Identifier:
uiextensions
Since:
0.15
Nested Type Summary
Modifier and type Type and description
interface Utilities.BundleURLMappings
Define a mapping from bundles to URLs.
class Utilities.SARLBundleJavadocURLMappings
Define a mapping from bundles to URLs.
Field Summary
Modifier and type Field and description
public static val java.lang.String EMPTY_STRING
Empty string.
Action Summary
Modifier and type Action and description
static int compareTo(Comparable<T>,T)
Null-safe comparison.
static int compareVersionToRange(Version,Version,Version)
Null-safe compare a version number to a range of version numbers.
static java.lang.String getNameWithTypeParameters(IType)
Replies the fully qualified name with generic parameters.
static boolean isGeneratedFolder(String)
Replies if the given name corresponds to a folder in a project that contains generated code.
static boolean isGeneratedFolder(IPath)
Replies if the given name corresponds to a folder in a project that contains generated code.
static boolean isNested(IPath,Iterator<E>)
Replies if the given path is nested in one of the given paths.
static org.eclipse.jdt.core.IClasspathEntry newLibraryEntry(Bundle,IPath,BundleURLMappings)
Create the classpath library linked to the bundle with the given name.
static org.eclipse.jdt.core.IClasspathEntry newOutputClasspathEntry(Bundle,IPath,BundleURLMappings)
Create the classpath output location.
static org.osgi.framework.Version parseVersion(String)
Null-safe version parser.
Field Details
EMPTY_STRING
public static val EMPTY_STRING : java.lang.String = ""
Empty string.
Action Details
compareTo(Comparable<T>,T)
def compareTo(Comparable<T>,T) : int

with T

Null-safe comparison.
Parameters:
<T> - - type of the comparable element.
object1 - the first object.
object2 - the second object.
Returns:
Negative number if a lower than b. Positive number if a greater than b. 0 if a is equal to b.
compareVersionToRange(Version,Version,Version)
def compareVersionToRange(Version,Version,Version) : int
Null-safe compare a version number to a range of version numbers.

The minVersion must be strictly lower to the maxVersion. Otherwise the behavior is not predictible.
Parameters:
version - the version to compare to the range; must not be null.
minVersion - the minimal version in the range (inclusive); could be null.
maxVersion - the maximal version in the range (exclusive); could be null.
Returns:
a negative number if the version in lower than the minVersion. A positive number if the version is greater than or equal to the maxVersion. 0 if the version is between minVersion and maxVersion.
getNameWithTypeParameters(IType)
def getNameWithTypeParameters(IType) : java.lang.String
Replies the fully qualified name with generic parameters.
Parameters:
type - the type. Never null.
Returns:
the qualified name.
isGeneratedFolder(String)
def isGeneratedFolder(String) : boolean
Replies if the given name corresponds to a folder in a project that contains generated code.
Parameters:
folderName - the folder name, using the generic folder separator syntax.
Returns:
true if the given name is expected to be for a generated code folder.
See:
fromPortableString(String)
isGeneratedFolder(IPath)
def isGeneratedFolder(IPath) : boolean
Replies if the given name corresponds to a folder in a project that contains generated code.
Parameters:
folderName - the folder name, using the generic folder separator syntax.
Returns:
true if the given name is expected to be for a generated code folder.
See:
fromPortableString(String)
isNested(IPath,Iterator<E>)
def isNested(IPath,Iterator<E>) : boolean
Replies if the given path is nested in one of the given paths.
Parameters:
path - the path to search for.
rootPaths - the root paths.
Returns:
true if the path is nested into one of the rootPaths .
Since:
0.10
newLibraryEntry(Bundle,IPath,BundleURLMappings)
def newLibraryEntry(Bundle,IPath,BundleURLMappings) : org.eclipse.jdt.core.IClasspathEntry
Create the classpath library linked to the bundle with the given name.
Parameters:
bundle - the bundle to point to. Never null.
precomputedBundlePath - the path to the bundle that is already available. If null, the path is computed from the bundle with org.eclipse.ui.internal.util.BundleUtility.
javadocURLs - the mappings from the bundle to the javadoc URL. It is used for linking the javadoc to the bundle if the bundle platform does not know the Javadoc file. If null, no mapping is defined.
Returns:
the classpath entry.
newOutputClasspathEntry(Bundle,IPath,BundleURLMappings)
def newOutputClasspathEntry(Bundle,IPath,BundleURLMappings) : org.eclipse.jdt.core.IClasspathEntry
Create the classpath output location.
Parameters:
bundle - the bundle to point to. Never null.
precomputedBundlePath - the path to the bundle that is already available. If null, the path is computed from the bundle with org.eclipse.ui.internal.util.BundleUtility.
javadocURLs - the mappings from the bundle to the javadoc URL. It is used for linking the javadoc to the bundle if the bundle platform does not know the Javadoc file. If null, no mapping is defined.
Returns:
the classpath entry.
parseVersion(String)
def parseVersion(String) : org.osgi.framework.Version
Null-safe version parser.
Parameters:
version - the version string.
Returns:
the version.