Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337619

Summary: AbstractTaskDataHandler.canInitializeSubTaskData may pass in a null taskRepository
Product: z_Archived Reporter: Robert Munteanu <robert.munteanu>
Component: MylynAssignee: Frank Becker <eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 3.4   
Target Milestone: 3.5   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

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