Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337619 - AbstractTaskDataHandler.canInitializeSubTaskData may pass in a null taskRepository
Summary: AbstractTaskDataHandler.canInitializeSubTaskData may pass in a null taskRepos...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: 3.5   Edit
Assignee: Frank Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-18 17:28 EST by Robert Munteanu CLA
Modified: 2011-02-20 15:13 EST (History)
0 users

See Also:


Attachments
mylyn/context/zip (8.07 KB, application/octet-stream)
2011-02-20 15:13 EST, Frank Becker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Munteanu CLA 2011-02-18 17:28:18 EST
In the MantisBT connector, the remote repository version dictates whether a task can be used to create a sub-task. As such, I need the TaskRepository instance which is used for the task. 

NewSubTaskAction.updateSelection always passes in a null taskRepository, so I need to resort to internals to obtain it:

        if ( taskRepository == null )
            taskRepository = TasksUiPlugin.getRepositoryManager().getRepository(task.getRepositoryUrl());
            
Please consider passing in the actual task repository.
Comment 1 Frank Becker CLA 2011-02-20 15:12:52 EST
I add:
TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(selectedTask.getRepositoryUrl());

to updateSelection(IStructuredSelection selection)

so you can verify this in the next weekly build.
Comment 2 Frank Becker CLA 2011-02-20 15:13:21 EST
Created attachment 189381 [details]
mylyn/context/zip