Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Mylyn/Refactoring"
< Mylyn
(→API) |
|||
Line 7: | Line 7: | ||
= API = | = API = | ||
+ | |||
+ | |||
+ | == Task Data == | ||
+ | |||
+ | ITaskDataManager { | ||
+ | TaskDataState getTaskData(String repositoryUrl, String id); | ||
+ | void saveOldTaskData(RepositoryTaskData data); | ||
+ | void saveNewTaskData(RepositoryTaskData data); | ||
+ | void saveEdits(String repositoryUrl, String id, Set<RepositoryTaskAttributes> changedAttributes); | ||
+ | void discardEdits(String repositoryUrl, String id); | ||
+ | void refactorRepositoryUrl(String oldUrl, String newUrl); | ||
+ | void removeTaskData(String repositoryUrl, String id); | ||
+ | void saveNewUnsubmittedTaskData(RepositoryTaskData newUnsubmittedTaskData); | ||
+ | Set<TaskDataState> getNewUnsubmittedTaskData(String repositoryUrl); | ||
+ | } | ||
+ | |||
+ | TaskDataState { | ||
+ | RepositoryTaskData newTaskData; | ||
+ | RepositoryTaskData oldTaskData; | ||
+ | Set<RepositoryTaskAttribute> edits; | ||
+ | } | ||
== Task Attributes == | == Task Attributes == | ||
Line 20: | Line 41: | ||
== Mylar Task Model == | == Mylar Task Model == | ||
− | Make this model explicit and define it in terms of Java classes. This could be separate from the offline storage so connectors without a TaskDataHandler could provide attachment support. | + | Make this model explicit and define it in terms of Java classes. Accessor methods should mirror fields available on AbstractRepositoryTask. This could be separate from the offline storage so connectors without a TaskDataHandler could provide attachment support. |
RepositoryTaskData { | RepositoryTaskData { | ||
Line 47: | Line 68: | ||
... | ... | ||
} | } | ||
+ | |||
+ | |||
== Editor/UI == | == Editor/UI == |
Revision as of 11:53, 15 May 2007
Requirements
- Persistence
- Provide a generic API for storing task attributes
- Configuration extraction
- Presenation api
API
Task Data
ITaskDataManager { TaskDataState getTaskData(String repositoryUrl, String id); void saveOldTaskData(RepositoryTaskData data); void saveNewTaskData(RepositoryTaskData data); void saveEdits(String repositoryUrl, String id, Set<RepositoryTaskAttributes> changedAttributes); void discardEdits(String repositoryUrl, String id); void refactorRepositoryUrl(String oldUrl, String newUrl); void removeTaskData(String repositoryUrl, String id); void saveNewUnsubmittedTaskData(RepositoryTaskData newUnsubmittedTaskData); Set<TaskDataState> getNewUnsubmittedTaskData(String repositoryUrl); }
TaskDataState { RepositoryTaskData newTaskData; RepositoryTaskData oldTaskData; Set<RepositoryTaskAttribute> edits; }
Task Attributes
RepositoryTaskAttribute { boolean isModified() boolean hasIncomingChanges() void write(IMemento) void read(IMemento) }
Mylar Task Model
Make this model explicit and define it in terms of Java classes. Accessor methods should mirror fields available on AbstractRepositoryTask. This could be separate from the offline storage so connectors without a TaskDataHandler could provide attachment support.
RepositoryTaskData { boolean isNew String description String summary String newComment String[] cc String[] addCC String[] removeCC }
RepositoryTaskComment { String author Date created ... }
RepositoryTaskAttachment { String filename String description ... }
RepositoryTaskOperation { ... }
Editor/UI
Connectors provide a factory for UI representation of attributes:
AbstractConnectorUi { abstract ITaskUiFactory getTaskUiFactory() }
ITaskUiFactory { String getLabel(RepositoryTaskAttribute attr) Control createEditor(RepositoryTaskAttribute attr, Composite parent) String getToolTip(RepositoryTaskAttribute attr) }
Mylar provides default implementations to create an editor for an attribute:
MylarEditorFactory { Control createComboEditor(RepositoryTaskAttribute attr, Composite parent, String[] options); }