Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "Mylyn/Porting Guide"

(Tasks Framework)
(233 intermediate revisions by 11 users not shown)
Line 1: Line 1:
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.
+
[[Category:Mylyn]]
  
= Porting from Mylar 1.0 to 2.0 =
+
= General =
  
== General ==
+
Mylyn follows the Eclipse conventions for [[Version_Numbering|version numbering]] and guarantees [[Evolving_Java-based_APIs|binary backwards compatibility]] for minor releases. Internals are binary backwards compatible between service releases.
  
* All library dependencies have moved
+
API enhancements can be tracked by searching the source code for the corresponding @since JavaDoc tags or by querying for bugs that have [api] in their summary.
* <code>MylarStatusHandler</code> and <code>IStatusHandler</code>
+
** moved from <code>org.eclipse.mylar.context.core</code> to <code>org.eclipse.mylar.core</code>
+
  
== Tasks Framework ==  
+
= Pending Changes in 3.12 =
  
.....''updates in progress''.....
+
* The SOAP transport was removed ({{bug|421379}}).
  
* <code>ITaskListExternalizer</code>
+
= Changes in 3.11 =
** <code>readTask(..)</code> renamed to <code>createTask(..)</code>, no longer needs to set taskId, label, or repositoryUrl
+
* <code>DelegatingTaskExternalizer</code>
+
** <code>readTaskInfo(..)</code> and <code>readQueryHitInfo(..)</code> are now called automatically and are private.  Use your <code>createTask(..)</code> or <code>createQueryHit(..)</code> methods to customize reading additional attributes.
+
  
* <code>Task</code> .....''updates in progress''
+
= Changes in 3.10 =
** handleIdentifier: now private
+
** get/setUrl are now get/setTaskUrl (to disambiguate with get/setRepositoryUrl())
+
  
* <code>AbstractRepositoryTask</code> .....''updates in progress''
+
None.
** getIdLabel() -> getTasKey()
+
** constructor changed
+
** getLastRefreshTimeInMinutes(Date) removed
+
** no more static methods (use RepositoryTaskHandleUtil)
+
** Replace this idiom:
+
    String handleIdentifier = AbstractRepositoryTask.getHandle(repository.getUrl(), taskId);
+
    ITask task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(handle);
+
** with:
+
    ITask task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(repository.getUrl(), taskId);
+
  
* <code>AbstractQueryHit</code>
+
= Porting from 3.8 to 3.9 =
** <code>setDescription(..)</code> renamed to <code>setSummary(..)</code>
+
  
* <code>AbstractRepositoryConnectorUi</code>
+
== Mylyn Reviews ==
** <code>openRemoteTask(String repositoryUrl, String id)</code>: removed, this method no longer needs to be implemented by the connector.  Instead classes can rely on the new <code>openRepositoryTask(..)</code> method, and override it if necessary.
+
** getRepositoryUrl and all ID/URL methods: now final, change via setters
+
** + findHyperlinks(...) override to detect hyperlinks in editors
+
  
* <code>AbstractRepositoryConnector</code>
+
The Reviews framework has had a major update which resulted in changes to the core model and API. In consequence, the version was updated to 2.0.
** + getLastSyncTimestamp(TaskRepository repository, Set<AbstractRepositoryTask> changedTasks)  (may change as part of [https://bugs.eclipse.org/bugs/show_bug.cgi?id=176934 bug#176934])
+
  
* <code>ITaskListElement</code>: now extends <code>java.lang.Comparable</code>, so Collections support of sorting can be used, since task list elements have a natural ordering. Default implementations are provided for tasks and containers. ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=171590 bug 171590])
+
= Porting from 3.7 to 3.8 =
  
* <code>TasksUiUtil</code>
+
No API changes that affect integrators.
** <code>openUrl(String url)</code>: moved to <code>openBrowser(String url)</code>
+
  
* <code>Task</code>
+
= Porting from 3.6 to 3.7 =
** <code>getTooltipText()</code>: deleted, not used
+
** Due dates are now supported <code>getDueDate(), setDueDate()</code>
+
  
* <code>MylarStatus</code> (place holder, will improve as we solidify this)
+
== Mylyn Commons ==
** <code>MylarStatusHandler.displayStatus(dialog title, IStatus status)</code> - call to display error and information dialogs
+
** When returning <code>CoreException</code> pass in a <code>MylarStatus</code> with appropriate code (see <code>IMylarStatusConstants</code>).
+
** If <code>IMylarStatusConstants.INTERNAL_ERROR</code> is sent to <code>MylarStatusHandler.displayStatus</code> an error dialog will appear and the error will be logged.
+
** <code>IMylarStatusConstants.REPOSITORY_COLLISION</code> used for mid-air collision. Pass repository url and appropriate dialog will be displayed.
+
  
* <code>ITaskDataHandler</code>
+
* {{bug|305782}} Restructuring of Mylyn Commons features
** <code>getChangedSinceLastSync()</code> method moved to <code>AbstractRepositoryConnector</code>
+
** New comment now held in an attribute: <code>RepositoryTaskAttribute.COMMENT_NEW</code> will need to update handler and factory to produce connector specific attribute
+
** <code>initializeTaskData(TaskRepository repository, RepositoryTaskData data, IProgressMonitor monitor)</code> called by NewTaskWizard to initialize new taskData objects (currently only in use by Trac but will adopt).
+
** <code>getAttributeFactory(String repositoryUrl, String repositoryKind, String taskKind)</code> signature changed
+
** <code>getDateForAttributeType(...)</code> moved to <code>AbstractAttributeFactory</code>
+
  
*<code> AttributeContainer</code>
+
The Mylyn Commons components were restructured and provisional packages were promoted to API. Several bundle IDs, package names and extension IDs were changed in the process. Classes in provisional packages were kept but marked as deprecated and will be removed in a future release. None of the changes break API backwards compatibility but integrations that consumed internal packages or extensions points may need to be adapted.
**<code>getAttributeFactory()</code> new method
+
  
*<code>RepositoryTaskData</code>
+
The following bundles were renamed:
**constructor now requires a task kind (string) (i.e. <code>Task.DEFAULT_TASK_KIND</code>)
+
**<code>getTaskKind</code> return the task kind
+
  
 +
org.eclipse.mylyn.commons.identity      -> org.eclipse.mylyn.commons.identity.core
 +
org.eclipse.mylyn.commons.notifications -> org.eclipse.mylyn.commons.notifications.ui
 +
org.eclipse.mylyn.commons.repositories  -> org.eclipse.mylyn.commons.repositories.core
 +
org.eclipse.mylyn.commons.team          -> org.eclipse.mylyn.commons.repositories.ui
  
*<code>AbstractRepositorySettingsPage</code> validation changes.
+
A complete list of renamed and added bundles can be found on bug 305782 on [https://bugs.eclipse.org/bugs/show_bug.cgi?id=305782#c13 comment 13].
**<code>setNeedsValidation(boolean needsValidation)</code>  if true validate button will be visible
+
**<code>getValidator(TaskRepository repository)</code> return an instance of <code>Validator</code>.  
+
  
* <code>TaskRepository</code>
+
The following packages were renamed:
**TaskRepository.isAnonymous()
+
**TaskRepository.setAnonymous(boolean)
+
  
* RepositorySynchronizationManager
+
org.eclipse.mylyn.commons.identity    -> org.eclipse.mylyn.commons.identity.core
** <code>updateOfflineState</code> is now <code>saveIncoming</code> and <code>saveOutgoing</code>.  
+
org.eclipse.mylyn.commons.repositories -> org.eclipse.mylyn.commons.repositories.core
** <code>discardOutgoing</code> discards any pending outgoing changes
+
org.eclipse.mylyn.commons.ui.team      -> org.eclipse.mylyn.commons.repositories.ui
  
* <code>TaskEditor</code>
+
The following provisional packages were promoted to API (see {{bug|360301}}):
** <code>protected void pageChange(intNewPageIndex)</code> method removed (only called super)
+
  
* <code>AbstractRepositoryTaskEditor</code>
+
org.eclipse.mylyn.internal.provisional.commons.core        -> org.eclipse.mylyn.commons.core
**<code>attributeChanged()</code> 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.
+
org.eclipse.mylyn.internal.provisional.commons.ui          -> org.eclipse.mylyn.commons.ui
** <code>createLabel()</code> 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.
+
                                                            -> org.eclipse.mylyn.commons.workbench
** <code>SECTION_NAME</code> is an enum that holds default titles for the default sections. To override these default titles, set the appropriate (SECTION_NAME, new name) in <code>alternateSectionLabels</code> on <code>AbstractRepositoryTaskEditor</code>.
+
                                                            -> org.eclipse.mylyn.commons.workbench.browser
** <code>updateEditor()</code> refreshes editor with new input in-place.
+
                                                            -> org.eclipse.mylyn.commons.workbench.editors
 +
                                                            -> org.eclipse.mylyn.commons.workbench.forms
 +
                                                            -> org.eclipse.mylyn.commons.workbench.search
 +
org.eclipse.mylyn.internal.provisional.commons.ui.actions  -> org.eclipse.mylyn.commons.ui
 +
org.eclipse.mylyn.internal.provisional.commons.ui.commands -> org.eclipse.mylyn.commons.workbench.texteditor
 +
org.eclipse.mylyn.internal.provisional.commons.ui.dialogs  -> org.eclipse.mylyn.commons.ui.dialogs
 +
org.eclipse.mylyn.internal.provisional.commons.ui.editor   -> org.eclipse.mylyn.commons.workbench
  
* <code>WebClientUtil</code>
+
In some cases provisional packages do not map directly to API packages but classes were distributed among several packages.
** moved from <code>..mylar.tasks.core</code> to <code>..mylar.core.net</code>
+
  
* <code>TaskList</code>
+
The following extension points have moved:
** <code>getChangeListeners()</code>: returns a <code>Set</code> instead of <code>List</code>
+
  
* <code>TaskListManager</code>
+
org.eclipse.mylyn.commons.team.newWizards -> org.eclipse.mylyn.commons.repositories.ui.newWizards
** <code>setDueDate()</code> used to set due date on a task and cause notification of local info changed.
+
** <code>isDue(ITask)</code> true if task's due date isn't null and date has past
+
  
== Context Framework ==
+
The following extension IDs have changed:
* <code>AbstractContextStore</code>
+
** <code>notifyContextStoreMoved()</code>: change to <code>contextStoreMoved()</code>
+
  
== Monitor Framework ==
+
org.eclipse.mylyn.commons.team.navigator.Repositories -> org.eclipse.mylyn.commons.repositories.ui.navigator.Repositories
 +
org.eclipse.mylyn.commons.team.category              -> org.eclipse.mylyn.commons.repositories.ui.category.Team
  
* <code>org.eclipse.mylar.monitor</code>: split into <code>monitor.core</code> and <code>monitor.ui</code>, organize imports and update extension point IDs
+
= Porting from 3.0 to 3.6 =
* <code>HandleObfuscator</code>
+
** moved to <code>InteractionEventObfuscator</code>
+
  
* <code>org.eclipse.mylar.monitor.usage.core</code> and <code>org.eclipse.mylar.monitor.usage.ui</code>
+
See the <b>[[Mylyn/Porting Guide/3.x]]</b>
** moved to <code>..mylar.monitor.core</code>, <code>..mylar.monitor.usage</code> and <code>..mylar.monitor.usage.internal</code>
+
 
 +
= Porting from 2.0 to 3.0 =
 +
 
 +
See the <b>[[Mylyn/Porting Guide/3.0]]</b>
 +
 
 +
 
 +
= Porting from 1.0 to 2.0 =
 +
 
 +
See the <b>[[Mylyn Porting Guide 2.0]]</b>

Revision as of 16:26, 21 March 2014


General

Mylyn follows the Eclipse conventions for version numbering and guarantees binary backwards compatibility for minor releases. Internals are binary backwards compatible between service releases.

API enhancements can be tracked by searching the source code for the corresponding @since JavaDoc tags or by querying for bugs that have [api] in their summary.

Pending Changes in 3.12

Changes in 3.11

Changes in 3.10

None.

Porting from 3.8 to 3.9

Mylyn Reviews

The Reviews framework has had a major update which resulted in changes to the core model and API. In consequence, the version was updated to 2.0.

Porting from 3.7 to 3.8

No API changes that affect integrators.

Porting from 3.6 to 3.7

Mylyn Commons

  • bug 305782 Restructuring of Mylyn Commons features

The Mylyn Commons components were restructured and provisional packages were promoted to API. Several bundle IDs, package names and extension IDs were changed in the process. Classes in provisional packages were kept but marked as deprecated and will be removed in a future release. None of the changes break API backwards compatibility but integrations that consumed internal packages or extensions points may need to be adapted.

The following bundles were renamed:

org.eclipse.mylyn.commons.identity      -> org.eclipse.mylyn.commons.identity.core
org.eclipse.mylyn.commons.notifications -> org.eclipse.mylyn.commons.notifications.ui
org.eclipse.mylyn.commons.repositories  -> org.eclipse.mylyn.commons.repositories.core
org.eclipse.mylyn.commons.team          -> org.eclipse.mylyn.commons.repositories.ui

A complete list of renamed and added bundles can be found on bug 305782 on comment 13.

The following packages were renamed:

org.eclipse.mylyn.commons.identity     -> org.eclipse.mylyn.commons.identity.core
org.eclipse.mylyn.commons.repositories -> org.eclipse.mylyn.commons.repositories.core
org.eclipse.mylyn.commons.ui.team      -> org.eclipse.mylyn.commons.repositories.ui

The following provisional packages were promoted to API (see bug 360301):

org.eclipse.mylyn.internal.provisional.commons.core        -> org.eclipse.mylyn.commons.core
org.eclipse.mylyn.internal.provisional.commons.ui          -> org.eclipse.mylyn.commons.ui
                                                           -> org.eclipse.mylyn.commons.workbench
                                                           -> org.eclipse.mylyn.commons.workbench.browser
                                                           -> org.eclipse.mylyn.commons.workbench.editors
                                                           -> org.eclipse.mylyn.commons.workbench.forms
                                                           -> org.eclipse.mylyn.commons.workbench.search
org.eclipse.mylyn.internal.provisional.commons.ui.actions  -> org.eclipse.mylyn.commons.ui
org.eclipse.mylyn.internal.provisional.commons.ui.commands -> org.eclipse.mylyn.commons.workbench.texteditor
org.eclipse.mylyn.internal.provisional.commons.ui.dialogs  -> org.eclipse.mylyn.commons.ui.dialogs
org.eclipse.mylyn.internal.provisional.commons.ui.editor   -> org.eclipse.mylyn.commons.workbench

In some cases provisional packages do not map directly to API packages but classes were distributed among several packages.

The following extension points have moved:

org.eclipse.mylyn.commons.team.newWizards -> org.eclipse.mylyn.commons.repositories.ui.newWizards

The following extension IDs have changed:

org.eclipse.mylyn.commons.team.navigator.Repositories -> org.eclipse.mylyn.commons.repositories.ui.navigator.Repositories
org.eclipse.mylyn.commons.team.category               -> org.eclipse.mylyn.commons.repositories.ui.category.Team

Porting from 3.0 to 3.6

See the Mylyn/Porting Guide/3.x

Porting from 2.0 to 3.0

See the Mylyn/Porting Guide/3.0


Porting from 1.0 to 2.0

See the Mylyn Porting Guide 2.0

Back to the top