Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "Mylyn/Porting Guide"

(Tasks Framework)
(Porting from Mylar 1.0 to 2.0)
Line 2: Line 2:
  
 
= Porting from Mylar 1.0 to 2.0 =
 
= Porting from Mylar 1.0 to 2.0 =
 +
 +
== General ==
 +
 +
* All library dependencies have moved
 +
* <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 ==  
 
== Tasks Framework ==  
 
* <code>AbstractRepositoryConnectorUi</code>
 
* <code>AbstractRepositoryConnectorUi</code>
 
** <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.
 
** <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.
 +
 
* <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])
 
* <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])
 +
 
* <code>TasksUiUtil</code>
 
* <code>TasksUiUtil</code>
 
** <code>openUrl(String url)</code>: moved to <code>openBrowser(String url)</code>
 
** <code>openUrl(String url)</code>: moved to <code>openBrowser(String url)</code>
Line 33: Line 41:
 
**<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.   
 
**<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.   
 
** <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.
 
** <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.
 +
 +
* <code>WebClientUtil</code>
 +
** moved from <code>..mylar.tasks.core</code> to <code>..mylar.core.net</code>
  
 
* <code>TaskList</code>
 
* <code>TaskList</code>
Line 44: Line 55:
  
 
* <code>org.eclipse.mylar.monitor</code>: split into <code>monitor.core</code> and <code>monitor.ui</code>, organize imports and update extension point IDs
 
* <code>org.eclipse.mylar.monitor</code>: split into <code>monitor.core</code> and <code>monitor.ui</code>, organize imports and update extension point IDs
 +
* <code>HandleObfuscator</code>
 +
** moved to <code>InteractionEventObfuscator</code>
 +
 +
* <code>org.eclipse.mylar.monitor.usage.core</code>
 +
** moved to <code>..mylar.monitor.usage</code>

Revision as of 12:40, 7 February 2007

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.

Porting from Mylar 1.0 to 2.0

General

  • All library dependencies have moved
  • MylarStatusHandler and IStatusHandler
    • moved from org.eclipse.mylar.context.core to org.eclipse.mylar.core

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 new openRepositoryTask(..) method, and override it if necessary.
  • ITaskListElement: now extends java.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 to openBrowser(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 a MylarStatus with appropriate code (see IMylarStatusConstants).
    • If IMylarStatusConstants.INTERNAL_ERROR is sent to MylarStatusHandler.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 to AbstractRepositoryConnector
    • 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 now saveIncoming and saveOutgoing.
    • 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.
  • WebClientUtil
    • moved from ..mylar.tasks.core to ..mylar.core.net
  • TaskList
    • getChangeListeners(): returns a Set instead of List

Context Framework

  • AbstractContextStore
    • notifyContextStoreMoved(): change to contextStoreMoved()

Monitor Framework

  • org.eclipse.mylar.monitor: split into monitor.core and monitor.ui, organize imports and update extension point IDs
  • HandleObfuscator
    • moved to InteractionEventObfuscator
  • org.eclipse.mylar.monitor.usage.core
    • moved to ..mylar.monitor.usage

Back to the top