Bug 184039 - TypesFilter.addDefaultTypes() should not hardcode types from other modules
TypesFilter.addDefaultTypes() should not hardcode types from other modules
Status: NEW
Product: platform
Classification: Unclassified
Component: Action Items
6.x
All All
: P3 (vote)
: TBD
Assigned To: Jan Peska
issues@platform
: API
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-13 14:44 UTC by Jesse Glick
Modified: 2011-09-01 16:21 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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() {...}
  // ...
}


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo