Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Mylyn/Porting Guide
This document will have Mylar 2.0 specific API changes added to it as we make them. If interested in keeping up with these changes we suggest setting a watch for this page.
Contents
Porting from Mylar 1.0 to 2.0
Tasks Framework
-
AbstractRepositoryConnectorUi
-
openRemoteTask(String repositoryUrl, String id)
: removed, this method no longer needs to be implemented by the connector. Instead classes can rely on the newopenRepositoryTask(..)
method, and override it if necessary.
-
-
ITaskListElement
: now extendsjava.lang.Comparable
, so Collections support of sorting can be used, since task list elements have a natural ordering. Default implementations are provided for tasks and containers. (bug 171590) -
TasksUiUtil
-
openUrl(String url)
: moved toopenBrowser(String url)
-
-
Task
-
getTooltipText()
: deleted, not used
-
-
MylarStatus
(place holder, will improve as we solidify this)-
MylarStatusHandler.displayStatus(dialog title, IStatus status)
- call to display error and information dialogs - When returning
CoreException
pass in aMylarStatus
with appropriate code (seeIMylarStatusConstants
). - If
IMylarStatusConstants.INTERNAL_ERROR
is sent toMylarStatusHandler.displayStatus
an error dialog will appear and the error will be logged. -
IMylarStatusConstants.REPOSITORY_COLLISION
used for mid-air collision. Pass repository url and appropriate dialog will be displayed.
-
-
ITaskDataHandler
-
getChangedSinceLastSync()
method moved toAbstractRepositoryConnector
- New comment now held in an attribute:
RepositoryTaskAttribute.COMMENT_NEW
will need to update handler and factory to produce connector specific attribute
-
- RepositorySynchronizationManager
-
updateOfflineState
is nowsaveIncoming
andsaveOutgoing
. -
discardOutgoing
discards any pending outgoing changes
-
-
TaskEditor
-
protected void pageChange(intNewPageIndex)
method removed (only called super)
-
-
AbstractRepositoryTaskEditor
attributeChanged()
Anything that needs to be saved must be in attribute form and passed to this method. Most if this is all done for you but if you override AbstractRepositoryTaskEditor.createCustomAttributeLayout() then you will want to ensure that attributeChanged is called upon editing. Utility method createTextField() handles this call.-
createLabel()
Utility method added. It will put an '*' at the front of the label if the attribute has been modified. Eventually this will be applied upon editing but currently only happens after re-freshing or re-opening the editor.
-
TaskList
-
getChangeListeners()
: returns aSet
instead ofList
-
Context Framework
-
AbstractContextStore
-
notifyContextStoreMoved()
: change tocontextStoreMoved()
-
Monitor Framework
-
org.eclipse.mylar.monitor
: split intomonitor.core
andmonitor.ui
, organize imports and update extension point IDs