|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.sim.kiem.config.managers.AbstractManager
de.cau.cs.kieler.sim.kiem.config.managers.ScheduleManager
public final class ScheduleManager
Manages all data for the scheduling preferences.
Field Summary | |
---|---|
static int |
DEFAULT_RECENT_CAPACITY
the default capacity for the recent list. |
Method Summary | |
---|---|
ScheduleData |
addSchedule(EditorDefinition editor,
IPath location,
int priority)
Create a new schedule. |
List<ScheduleData> |
getAllSchedules()
Getter for the list of all schedules. |
List<ScheduleData> |
getImportedSchedules()
Getter for the list of schedules that were imported through the extension point. |
static ScheduleManager |
getInstance()
Returns the singleton instance of this manager. |
List<ScheduleData> |
getMatchingSchedules(EditorIdWrapper editorID,
String editorName)
Get the list of all schedules that apply to the current editorID. |
MostRecentCollection<String> |
getRecentScheduleIds()
Get the list of Ids of the most recently used schedules. |
List<ScheduleData> |
getRecentSchedules()
Get the list of most recently used schedules. |
ScheduleData |
getScheduleData(String id)
Try to find the schedule data with the specified id. |
void |
historyNotification(RefactoringHistoryEvent event)
|
void |
importAllFilesInWorkspace()
Import all files in the workspace into the manager. |
boolean |
isEnabled()
|
void |
load()
Load the saved data from the plugin's preference store. |
void |
openSchedule(ScheduleData schedule)
Load a schedule from the file system into the plugin. |
void |
removeSchedule(ScheduleData schedule)
Remove a schedule from the list. |
void |
removeSchedule(String scheduleId)
Remove a schedule with a specific key. |
void |
save()
Saves the data inside the manager into the plugin's preference store. |
void |
setEnabled(boolean enabled)
|
void |
userLoaded(IPath location)
Notify the manager that the user triggered a load. |
void |
userSaved(IPath location)
Notify the manager that the user triggered a save. |
Methods inherited from class de.cau.cs.kieler.sim.kiem.config.managers.AbstractManager |
---|
addEventListener, load, notifyListeners, remove, removeEventListener, save, saveAll |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_RECENT_CAPACITY
Method Detail |
---|
public static ScheduleManager getInstance()
public void setEnabled(boolean enabled)
public boolean isEnabled()
public List<ScheduleData> getImportedSchedules()
public List<ScheduleData> getMatchingSchedules(EditorIdWrapper editorID, String editorName)
The list is sorted by the supported priority for the matching editor. The best schedules have the lowest index to appear at the top of any list.
editorID
- the ID to look for.editorName
- the name of the editor if the editor hasn't been added yet
public MostRecentCollection<String> getRecentScheduleIds()
public List<ScheduleData> getRecentSchedules()
public List<ScheduleData> getAllSchedules()
public ScheduleData getScheduleData(String id)
id
- the scheduleID to look for.
public void historyNotification(RefactoringHistoryEvent event)
historyNotification
in interface IRefactoringHistoryListener
public void importAllFilesInWorkspace()
public ScheduleData addSchedule(EditorDefinition editor, IPath location, int priority)
First the method checks if the editor is already in the list of currently available editors. If not the new editor is created and added to that list.
After that the new Schedule is created and the default priority assigned to the editor that the schedule was first used with.
editor
- the editor that created the schedule.location
- the save location of the schedule.priority
- the priority to assign to the editor
public void removeSchedule(ScheduleData schedule)
schedule
- the schedule to be removedpublic void removeSchedule(String scheduleId)
scheduleId
- the scheduleID to look for.public void openSchedule(ScheduleData schedule) throws ScheduleFileMissingException
This method can be called from another plug-in and is part of the KIEM Configurations API.
schedule
- the schedule data to load.
ScheduleFileMissingException
- if the location in the schedule is no longer validpublic void userSaved(IPath location)
location
- the location where the file was saved.public void userLoaded(IPath location)
location
- the location where the file was loaded from.public void load()
load
in class AbstractManager
public void save()
save
in class AbstractManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |