public final class ItemUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
PREFERENCE_DELIMITER
Delimiter character used to serialize a list into preferences.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Set<IItemDescriptor<T>> |
getActiveItems(IItemRegistry<T> registry,
String qualifier,
String disabledItemPreferenceKey)
Get all active item from a registry.
|
static <T> IItemDescriptor<T> |
getDefaultItemDescriptor(IItemRegistry<T> registry,
String preferenceKey)
Get an item descriptor using the preferences.
|
static <T> T |
getItem(IItemRegistry<T> registry,
String preferenceKey)
Get an item using the preferences.
|
static <T> List<IItemDescriptor<T>> |
getItemsDescriptor(IItemRegistry<T> registry,
String qualifier,
String preferenceKey)
Get a list of
IItemDescriptor from preferences. |
public static final String PREFERENCE_DELIMITER
public static <T> T getItem(IItemRegistry<T> registry, String preferenceKey)
T - Type of itemregistry - The item registrypreferenceKey - The preference to retrieve the key.public static <T> IItemDescriptor<T> getDefaultItemDescriptor(IItemRegistry<T> registry, String preferenceKey)
T - Type of itemregistry - IItemRegistry of the item typepreferenceKey - Preference key use to retrieve the itemIItemDescriptorpublic static <T> List<IItemDescriptor<T>> getItemsDescriptor(IItemRegistry<T> registry, String qualifier, String preferenceKey)
IItemDescriptor from preferences.T - Type of IItemDescriptorregistry - Registry for the IItemDescriptorqualifier - the preference qualifier (plug-in ID)preferenceKey - Key for this IItemDescriptor in preferencesIItemDescriptor or null if nothing in preferencespublic static <T> Set<IItemDescriptor<T>> getActiveItems(IItemRegistry<T> registry, String qualifier, String disabledItemPreferenceKey)
(Filter out all disable element stored in preferences)
T - Item typeregistry - Registry holding all items of this kindqualifier - The preference qualifier (plug-in ID)disabledItemPreferenceKey - Preference key where are stored disabled items.Set of active items
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.