pl.edu.agh.cast.resources
Class UserPreferences
java.lang.Object
pl.edu.agh.cast.resources.UserPreferences
public class UserPreferences
- extends java.lang.Object
Contains global user preferences
- Author:
- awos, Pawel Kupinski (pawel.kupinski@gmail.com)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserPreferences
public UserPreferences()
getInstance
public static UserPreferences getInstance()
removeMRUProject
public void removeMRUProject(java.lang.String name)
getMostRecentlyUsedProjects
public java.util.List<MostRecentlyUsedProject> getMostRecentlyUsedProjects()
changeMostRecentlyProjectName
public void changeMostRecentlyProjectName(org.eclipse.core.resources.IProject project,
java.lang.String newName)
- Changes MRU project name. If project is bound to only one location then
replaces old project with new one. If project is bound to more locations
-> removes actual project location from 'old name project' bound, and
adds new project name with actual location.
- Parameters:
project
- Project with old name.newName
- Future new name of project.
registerMostRecentlyUsedProject
public void registerMostRecentlyUsedProject(org.eclipse.core.resources.IProject p)
- MRU projects are kept in the preferences in the following form
MRU
|_ order
|_ 0 = project_name0
|_ 1 = project_name1
...
|_ n = project_namen
|_ #project_name0
|_ 0 = most_recent_location
|_ 1 = older_location
...
|_ n = oldest_location
|_ #project_name1
...
...
- Parameters:
p
- project to set as most recently used
setPreference
public void setPreference(UserPreferences.PREF pref,
java.lang.String val)
getPreference
public java.lang.String getPreference(UserPreferences.PREF pref)
initializeDefaults
public void initializeDefaults()
Copyright © 2007-2008 AGH University of Science and Technology. All Rights Reserved.