Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-integrators] Missing Factory to Externalize Tasklist

Well, I've been using the Bugzilla connector as a template assuming that it has been completely migrated to the new Mylyn 3.0 api, but apparentely it is still extending and overriding implementations of AbstractTrask and AbstractRepositoryQuery.

One other odd thing I'm noticing is that the username and password for my connector is not persisting between restarts of eclipse. All of the other information for a connector is there when you come back in, but the information for the user id and password aren't restored.

Dave


Steffen Pingel wrote:
The TaskListMigrator and TaskListFactory are exclusive. Here are some notes I made while porting the web connector:

In Mylyn 3.0 the data model of the task list has changed. Elements in the task list are now managed by the tasks framework and connectors do not extend AbstractTask or AbstractRepositoryQuery with their own implementation. Task list externalization that previously required connectors to provide an implementation of AbstractTaskListFactory is now encapsulated in the framework. In order to migrate the Mylyn 2.x tasklist.xml.zip to the new tasks.xml.zip file connectors need to extend AbstractTaskListMigrator. When a Mylyn 2.x task list is read the migrator is invoked for migrating query and tasks elements. The migration is only done once. The task list migrator is registered through the org.eclipse.mylyn.tasks.ui.repositories extension point. The taskListFactory element is replaced by taskListMigrator:

<extension
  id="org.eclipse.mylyn.web.repository"
  name="Generic web-based access (Advanced)"
  point="org.eclipse.mylyn.tasks.ui.repositories">
    <connectorCore ... />
    <connectorUi ... />
    <taskListMigrator
      class="org.eclipse.mylyn.internal.web.tasks.WebTaskListMigrator">
    </taskListMigrator>
</extension>

The implementating of AbstractTaskListFactory.createTask() moved to AbstractTaskListMigrator.migrateTask(). Instead of creating an instance of a custom task class connector set custom state on task classes through the setAttribute() method:

WebTaskListMigrator {
@Override
  public void migrateTask(ITask task, Element element) {
    if (element.hasAttribute(KEY_PREFIX)) {
task.setAttribute(WebRepositoryConnector.KEY_TASK_PREFIX, element.getAttribute(KEY_PREFIX));
    }
}

In addition connectors must migrate the last read time stamp (see JiraTaskListMigrator).

Connectors that used to override AbstractTask.getTaskKey() need to explicitly set the task key during mirgration. It is initialized to the task id by default (see JiraTaskListMigrator).

Connectors that used to override AbstractTask.isLocal() should now implement AbstractRepositoryConnector.hasLocalCompletionState() (see WebRepositoryConnector).

We are in the process of assembling bits and pieces of documentation. Please feel free to ask if you have any further questions.

Steffen


On Monday 09 June 2008, David Carver wrote:
David Carver wrote:
I'm in the process of migratting the mantis bugtracker connector to
the new 3.0 API, and I keep getting an error message saying it's
'Missing Factory to Externalize TaskList".   I've implemented a
TaskListMigrator for the connector, and setup the extension point, but
I keep getting the error.
In order to get this to work, I had to also include the deprecated
TaskListFactory implementation class.   It appears that the
DelegatingTaskExternalizer is still requiring this extension point even
though the migration docs say that it has been deprecated.

Dave


_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators







Back to the top