|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
org.eclipse.cdt.internal.ui.preferences.formatter.ProfileManager
public abstract class ProfileManager
The model for the set of profiles which are available in the workbench.
Nested Class Summary | |
---|---|
static class |
ProfileManager.BuiltInProfile
Represents a built-in profile. |
static class |
ProfileManager.CustomProfile
Represents a user-defined profile. |
static class |
ProfileManager.KeySet
|
static class |
ProfileManager.Profile
Represents a profile with a unique ID, a name and a map containing the code formatter settings. |
static class |
ProfileManager.SharedProfile
|
Field Summary | |
---|---|
static int |
PROFILE_CREATED_EVENT
|
static int |
PROFILE_DELETED_EVENT
|
static int |
PROFILE_RENAMED_EVENT
|
static int |
SELECTION_CHANGED_EVENT
The possible events for observers listening to this class. |
static int |
SETTINGS_CHANGED_EVENT
|
static java.lang.String |
SHARED_PROFILE
|
Constructor Summary | |
---|---|
ProfileManager(java.util.List profiles,
org.eclipse.core.runtime.preferences.IScopeContext context,
PreferencesAccess preferencesAccess,
IProfileVersioner profileVersioner,
ProfileManager.KeySet[] keySets,
java.lang.String profileKey,
java.lang.String profileVersionKey)
Create and initialize a new profile manager. |
Method Summary | |
---|---|
void |
addProfile(ProfileManager.CustomProfile profile)
Add a new custom profile to this profile manager. |
void |
clearAllSettings(org.eclipse.core.runtime.preferences.IScopeContext context)
|
void |
commitChanges(org.eclipse.core.runtime.preferences.IScopeContext scopeContext)
Activate the selected profile, update all necessary options in preferences and save profiles to disk. |
boolean |
containsName(java.lang.String name)
Check whether a user-defined profile in this profile manager already has this name. |
boolean |
deleteProfile(ProfileManager.CustomProfile profile)
|
boolean |
deleteSelected()
Delete the currently selected profile from this profile manager. |
abstract ProfileManager.Profile |
getDefaultProfile()
|
ProfileManager.Profile |
getProfile(java.lang.String ID)
Get the profile for this profile id. |
IProfileVersioner |
getProfileVersioner()
|
ProfileManager.Profile |
getSelected()
Get the currently selected profile. |
java.lang.String[] |
getSortedDisplayNames()
Get the names of all profiles stored in this profile manager, sorted alphabetically. |
java.util.List |
getSortedProfiles()
Get an immutable list as view on all profiles, sorted alphabetically. |
boolean |
hasProjectSpecificSettings(org.eclipse.core.runtime.preferences.IScopeContext context)
|
static boolean |
hasProjectSpecificSettings(org.eclipse.core.runtime.preferences.IScopeContext context,
ProfileManager.KeySet[] keySets)
|
void |
profileChanged(ProfileManager.CustomProfile profile)
|
void |
profileRenamed(ProfileManager.CustomProfile profile,
java.lang.String oldID)
|
void |
profileReplaced(ProfileManager.CustomProfile oldProfile,
ProfileManager.CustomProfile newProfile)
|
java.util.Map |
readFromPreferenceStore(org.eclipse.core.runtime.preferences.IScopeContext context,
ProfileManager.Profile workspaceProfile)
Only to read project specific settings to find out to what profile it matches. |
void |
setSelected(ProfileManager.Profile profile)
Set the selected profile. |
Methods inherited from class java.util.Observable |
---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SELECTION_CHANGED_EVENT
public static final int PROFILE_DELETED_EVENT
public static final int PROFILE_RENAMED_EVENT
public static final int PROFILE_CREATED_EVENT
public static final int SETTINGS_CHANGED_EVENT
public static final java.lang.String SHARED_PROFILE
Constructor Detail |
---|
public ProfileManager(java.util.List profiles, org.eclipse.core.runtime.preferences.IScopeContext context, PreferencesAccess preferencesAccess, IProfileVersioner profileVersioner, ProfileManager.KeySet[] keySets, java.lang.String profileKey, java.lang.String profileVersionKey)
profiles
- Initial custom profiles (List of type CustomProfile
)profileVersioner
- Method Detail |
---|
public static boolean hasProjectSpecificSettings(org.eclipse.core.runtime.preferences.IScopeContext context, ProfileManager.KeySet[] keySets)
public boolean hasProjectSpecificSettings(org.eclipse.core.runtime.preferences.IScopeContext context)
public java.util.Map readFromPreferenceStore(org.eclipse.core.runtime.preferences.IScopeContext context, ProfileManager.Profile workspaceProfile)
context
- The project contextpublic java.util.List getSortedProfiles()
getSortedNames
.
Profile
getSortedDisplayNames()
public java.lang.String[] getSortedDisplayNames()
getSortedProfiles
.
getSortedProfiles()
public ProfileManager.Profile getProfile(java.lang.String ID)
ID
- The profile ID
null
public void commitChanges(org.eclipse.core.runtime.preferences.IScopeContext scopeContext)
public void clearAllSettings(org.eclipse.core.runtime.preferences.IScopeContext context)
public ProfileManager.Profile getSelected()
public void setSelected(ProfileManager.Profile profile)
profile
- The profile to selectpublic boolean containsName(java.lang.String name)
name
- The name to test for
true
if a profile with the given name existspublic void addProfile(ProfileManager.CustomProfile profile)
profile
- The profile to addpublic boolean deleteSelected()
public boolean deleteProfile(ProfileManager.CustomProfile profile)
public void profileRenamed(ProfileManager.CustomProfile profile, java.lang.String oldID)
public void profileReplaced(ProfileManager.CustomProfile oldProfile, ProfileManager.CustomProfile newProfile)
public void profileChanged(ProfileManager.CustomProfile profile)
public abstract ProfileManager.Profile getDefaultProfile()
public IProfileVersioner getProfileVersioner()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |