Class SDKContainer
java.lang.Object
org.libreoffice.ide.eclipse.core.model.SDKContainer
Singleton object containing the SDK instances.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddListener(IConfigListener listener) Add a SDK listener to the container.static voidAdd the SDK given in parameter to the list of the others.static voidclear()Removes all the SDK contained.static booleancontainsName(String name) Checks whether the corresponding SDK name already exists.static voidremove the given SDK from the list.static voiddispose()Dispose the vector used.static SDKContainerSingleton accessor, namedgetInstancein many other singleton pattern implementations.static ISdkReturns the sdk that corresponds to the given sdk name and buildid.static intReturns the number of SDK in the list.Returns a vector containing the unique identifiers of the contained SDKs.static voidload()Loads the SDK already configured instances from the preferences.static voidremoveListener(IConfigListener listener) Removes a SDK listener from the container.static voidsaveSDKs()Saves the SDK already configured instances to the preferences.static Object[]toArray()static voidupdate the ith SDK from the list with the given SDK.
-
Method Details
-
addListener
Add a SDK listener to the container.- Parameters:
listener- SDK listener to add
-
removeListener
Removes a SDK listener from the container.- Parameters:
listener- SDK listener to remove
-
toArray
- Returns:
- the sdks elements in an array.
-
addSDK
Add the SDK given in parameter to the list of the others. Do not use directly the private field to handle SDKs- Parameters:
pSdk- SDK to add
-
delSDK
remove the given SDK from the list. Do not use directly the private field to handle SDKs- Parameters:
pSdk- SDK to remove
-
clear
public static void clear()Removes all the SDK contained. -
getSDKKeys
Returns a vector containing the unique identifiers of the contained SDKs.- Returns:
- names of the contained SDKs
-
containsName
Checks whether the corresponding SDK name already exists.- Parameters:
name- the SDK Name to check- Returns:
trueif the name is already present,falseotherwise.
-
updateSDK
update the ith SDK from the list with the given SDK.- Parameters:
pSdkkey- position of the sdk to updatepSdk- new value for the SDK
-
getSDK
Returns the sdk that corresponds to the given sdk name and buildid.- Parameters:
pSdkkey- unique identifier of the wanted sdk- Returns:
- SDK which name equals the one provided
-
getSDKCount
public static int getSDKCount()Returns the number of SDK in the list.- Returns:
- number of SDK in the list
-
dispose
public static void dispose()Dispose the vector used. -
getInstance
Singleton accessor, namedgetInstancein many other singleton pattern implementations.- Returns:
- the
SDKContainersingleton instance.
-
load
public static void load()Loads the SDK already configured instances from the preferences. -
saveSDKs
public static void saveSDKs()Saves the SDK already configured instances to the preferences.
-