This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 184039

Summary: TypesFilter.addDefaultTypes() should not hardcode types from other modules
Product: platform Reporter: Jesse Glick <jglick>
Component: Action ItemsAssignee: Jan Peska <JPESKA>
Status: NEW ---    
Severity: normal CC: jtulach, kharezlak
Priority: P3 Keywords: API
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Jesse Glick 2010-04-13 14:44:41 UTC
#3525540146fb should not have been necessary; tasklist.ui should not be hardcoding names of task list providers from other modules. Rather, they should be registered in those other modules.

Suggest perhaps an annotation @TaskScannerRegistration in spi.tasklist to be attached to classes or static methods assignable to FileTaskScanner or PushTaskScanner (better if these extended a placeholder base class TaskScanner with a package-private constructor?), which would register the scanner in TaskList/Scanners, possibly adding also a group using Task.createGroup, and optionally also registering the task type in some way that TypesFilter could load. E.g.:

package org.netbeans.modules.bugtracking.tasklist;
// ...
public final class TaskListProvider extends PushTaskScanner {
  // ...
  @TaskScannerRegistration(
    enabledByDefault=true,
    groupName="nb-tasklist-issue",
    displayName="#LBL_issue_group",
    description="#HINT_issue_group",
    icon="org/netbeans/modules/bugtracking/ui/resources/bugtracking.png",
    position="600")
  public static synchronized TaskListProvider getInstance() {...}
  // ...
}