Menu

#5 task tags matching

open
None
5
2007-05-12
2007-02-22
T-42
No

Hi,

it would be great to be able to decorate Java files (and maybe packages) based on the Task Tags defined in Preferences->Java->Compiler->Task Tags.

Such a rule might be "contains task of priority <Priority>" or, more flexibly, "contains task <Tag>".

If it is not possible to consider Task Tags, an alternative might be to add new "Apply to" scopes "CompilationUnit (*.java) (file contents)" and "File (foo.txt) (file contents)". These would do the existing pattern matching, but consider the file contents instead of file names.

Thanks for the plugin and (if applicable ;-) for considering this feature!

Discussion

  • Markus Gebhard

    Markus Gebhard - 2007-05-12

    alpha version of the plugin containing this feature

     
  • Markus Gebhard

    Markus Gebhard - 2007-05-12

    Logged In: YES
    user_id=680457
    Originator: NO

    I like the idea and did a prototype implementation. Please check it out and let me know how you like it.

    In order to create a task decoration, open the preferences page and either hit the button "Restore Defaults" or create a new decoration with these settings:
    - Pattern: .*
    - Regular expression: selected
    - Apply to: Java Element
    - if contains task with severity: selected
    - Brightness shift: -80

    Known issues:
    - Performance might be a problem, because fetching the task markers is expensive
    - Task decoration should not happen on Java members. Tasks always relate to a complete source file.
    File Added: labeldecorator_20070512.zip

     
  • Markus Gebhard

    Markus Gebhard - 2007-05-12
    • assigned_to: nobody --> mgebha
     
  • T-42

    T-42 - 2007-06-22

    Logged In: YES
    user_id=1726325
    Originator: YES

    Thanks! It works great and i have not noticed any performance problems.

    Because of the second known issue (i don't want the outline colors to be changed) i prefer scope "CompilationUnit (*.java)" to "Java Element". To see which packages contain tasks, it would be nice to have a new scope "CompilationUnit (*.java) + their containing packages".

    Another nice to have feature: i want different colors for files with high and normal severity tasks, but for files with both, only the high severity decoration should apply. So maybe the rules should be groupable and only the first matching rule of each group be applied.

     

Log in to post a comment.

MongoDB Logo MongoDB