This module provides SPI for third parties that want to display some sort information for the user in the Task List / Problems window. A typical example are Java errors, warnings, TODOs etc.
Part of the integration are several implementation modules that provider task list user interface, TODO task scanning, Java integration.Question (arch-overall): Describe the overall architecture. Answer:
IMPORTANT: Since NB 7.2 the Tasks window has been renamed to Action Items window. Labels in UI now refer to "action items" but the code terms used in Task List API refer to "tasks".
This is a framework for Task List window that shows tasks (errors, warnings, todos) generated by plugable modules for selected files/folders.
Task List framework defines the following folders in XML layer:
/TaskList/Scanners - register your instances of task scanners here
/TaskList/ScanningScopes - here you can add additional scanning scopes
/TaskList/Groups - here you can define additional task groups, for example:
<attr name="instanceCreate" methodvalue="org.netbeans.spi.tasklist.Task.createGroup"/>
<attr name="localizingBundle" stringvalue="org.mymodule.resources.Bundle"/>
<attr name="groupName" stringvalue="my-unique-group-name"/>
<attr name="diplayNameKey" stringvalue="LBL_my_group"/>
<attr name="descriptionKey" stringvalue="HINT_my_group"/>
<attr name="iconKey" stringvalue="ICON_my_group"/>
Tasks are organized into groups according
to their importance (error/warning/todo etc). The task group is specified when the Task is created.
Each group is identified by its unique name. The Task List framework provides the following groups:
"nb-tasklist-error" - for error-type tasks
"nb-tasklist-warning" - for warning-type tasks
Additional task groups can be specified in xml layers, see above.Question (arch-usecases): Describe the main use cases of the new API. Who will use it under what circumstances? What kind of code would typically need to be written to use the module? Answer:
The main feature of the Task List SPI is the ability to 'plug-in' additional task providing modules that generate tasks for the task list window.
The plugable task scanners can either push new Tasks to the Task List window whenever they want - PushTaskScanner - or they can inherit from FileTaskScanner and the Task List framework will actively poll them for new tasks for each file under the current scanning scope (see below).
Scanner instances are registered in XML layer in folder "/TaskList/Scanners". The framework keeps track of modified files and notifies the scanners whenever a file under the scanning scope needs to be rescanned.
Scanning scope defines which files/folders will be scanned for tasks. The default implementation includes scopes for currently edited file, scope for files and folders in the main project and projects that depend on it and scope for all opened projects.
Additional scopes may be provided by extending TaskScanningScope class and registering instances in folder "/TaskList/ScanningScopes" in XML layer.
Tasks are organized into Groups according to their importance. Each task can be in one group only. The default implementation includes "Error", "Warning" and "TODO" groups. Additional groups can be registered in XML layer in folder "/TaskList/Groups". Each task group is identified by its unique name.Question (arch-time): What are the time estimates of the work? Answer:
Prototype is already available, 2-3 more man/days required to finish the implementation.Question (arch-quality): How will the quality of your code be tested and how are future regressions going to be prevented? Answer:
Unit-tests will be provided to ensure code quality.Question (arch-where): Where one can find sources for your module? Answer:
The sources for the module are in the NetBeans Mercurial repositories.
These modules are required in project.xml:
The SPI has no non-NetBeans dependencies. Integration modules (task providers) may use some external libraries.Question (dep-platform): On which platforms does your module run? Does it run in the same way on each? Answer:
no platform dependenciesQuestion (dep-jre): Which version of JRE do you need (1.2, 1.3, 1.4, etc.)? Answer:
JRE 1.5 or better is required.Question (dep-jrejdk): Do you require the JDK or is the JRE enough? Answer:
JRE is enough
just module jar fileQuestion (deploy-nbm): Can you deploy an NBM via the Update Center? Answer:
yesQuestion (deploy-shared): Do you need to be installed in the shared location only, or in the user directory only, or can your module be installed anywhere? Answer:
Install location does not matterQuestion (deploy-packages): Are packages of your module made inaccessible by not declaring them public? Answer:
One package is exported as public, the rest are private ones.Question (deploy-dependencies): What do other modules need to do to declare a dependency on this one, in addition to or instead of the normal module dependency declaration (e.g. tokens to require)? Answer:
no special dependency declarations
yesQuestion (compat-standards): Does the module implement or define any standards? Is the implementation exact or does it deviate somehow? Answer:
no standardsQuestion (compat-version): Can your module coexist with earlier and future versions of itself? Can you correctly read all old settings? Will future versions be able to read your current settings? Can you read or politely ignore settings stored by a future version? Answer:
yesQuestion (compat-deprecation): How the introduction of your project influences functionality provided by previous version of the product? Answer:
No APIs will be deprecated.
Please note that the previous API/SPI for Suggestions framework will be still available. However part of the integration of the new Task List/Problem List SPI is a 'TODO' integration module that will provide user's TODO tasks from source file comments. This will replace the current 'To Do' window.
noQuestion (resources-layer): Does your module provide own layer? Does it create any files or folders in it? What it is trying to communicate by that and with which components? Answer:
The task list SPI adds folder "/TaskList/Providers" where the task provider instances are searched for, folder "TaskList/ScanningScopes" where the scanning scope implementations are searched for and folder "TaskList/Groups" where the module looks for task group definitions.Question (resources-read): Does your module read any resources from layers? For what purpose? Answer:
The task list frameworks reads from XML layer the list of task providers, scanning scopes and task groups.Question (resources-mask): Does your module mask/hide/override any resources provided by other modules in their layers? Answer:
'TODO' integration module will hide the current 'To Do' window action.Question (resources-preferences): Does your module uses preferences via Preferences API? Does your module use NbPreferences or or regular JDK Preferences ? Does it read, write or both ? Does it share preferences with other modules ? If so, then why ? Answer:
The task list framework (the UI implementation) uses NbPreferences to remember user settings between sessions (selected scanning scope, table column widths etc) and user defined filters.
org.openide.util.Lookupor any similar technology to find any components to communicate with? Which ones? Answer:
noQuestion (lookup-register): Do you register anything into lookup for other code to find? Answer:
noQuestion (lookup-remove): Do you remove entries of other modules from lookup? Answer:
System.getProperty) property? On a similar note, is there something interesting that you pass to
java.util.logging.Logger? Or do you observe what others log? Answer:
noQuestion (exec-component): Is execution of your code influenced by any (string) property of any of your components? Answer:
noQuestion (exec-ant-tasks): Do you define or register any ant tasks that other can use? Answer:
noQuestion (exec-classloader): Does your code create its own class loader(s)? Answer:
noQuestion (exec-reflection): Does your code use Java Reflection to execute other code? Answer:
noQuestion (exec-privateaccess): Are you aware of any other parts of the system calling some of your methods by reflection? Answer:
noQuestion (exec-process): Do you execute an external process from your module? How do you ensure that the result is the same on different platforms? Do you parse output? Do you depend on result code? Answer:
noQuestion (exec-introspection): Does your module use any kind of runtime type information (
instanceof, work with
java.lang.Class, etc.)? Answer:
no introspectionQuestion (exec-threading): What threading models, if any, does your module adhere to? How the project behaves with respect to threading? Answer:
A separate thread is started for the actual task scanning. Synchronization objects are used to ensure thread-safe access from the user interface.Question (security-policy): Does your functionality require modifications to the standard policy file? Answer:
noQuestion (security-grant): Does your code grant additional rights to some other code? Answer:
noneQuestion (format-dnd): Which protocols (if any) does your code understand during Drag & Drop? Answer:
noneQuestion (format-clipboard): Which data flavors (if any) does your code read from or insert to the clipboard (by access to clipboard on means calling methods on
noQuestion (perf-exit): Does your module run any code on exit? Answer:
noQuestion (perf-scale): Which external criteria influence the performance of your program (size of file in editor, number of files in menu, in source directory, etc.) and how well your code scales? Answer:
XXX no answer for perf-scaleQuestion (perf-limit): Are there any hard-coded or practical limits in the number or size of elements your code can handle? Answer:
noQuestion (perf-mem): How much memory does your component consume? Estimate with a relation to the number of windows, etc. Answer:
no ideaQuestion (perf-wakeup): Does any piece of your code wake up periodically and do something even when the system is otherwise idle (no user interaction)? Answer:
noQuestion (perf-progress): Does your module execute any long-running tasks? Answer:
The implementation module starts a new Thread where the source files are scanned. This is indicated to the user in the global progress bar and the scanning process is user-cancellable.Question (perf-huge_dialogs): Does your module contain any dialogs or wizards with a large number of GUI controls such as combo boxes, lists, trees, or text areas? Answer:
noQuestion (perf-menus): Does your module use dynamically updated context menus, or context-sensitive actions with complicated and slow enablement logic? Answer:
noQuestion (perf-spi): How the performance of the plugged in code will be enforced? Answer:
XXX no answer for perf-spi
Built on May 15 2022. | Copyright © 2017-2022 Apache Software Foundation. All Rights Reserved.