Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-4036

Check for label/description of component and properties when metatype information is generated

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • SCR Tooling
    • None

    Description

      When using SCR annotations you can easily create services and components, which do not have proper labels and descriptions. We should warn in these cases.

      Case 1:

      @Component(metatype=true)
      @Property(...)
      

      When a metatype is being generated, a label and a description should be provided as well. The warn message could be "A metatype should always have a label and a description".

      Case 2:

      @Component(metatype=true)
      @Property(name="foo",value="bar")
      

      When a metatype is being generated, containing properties which are not marked as private, a warning "Non-private properties in a metatype should always have a label and a description" should be logged.

      Case 3:

      @Component(metatype=true)
      

      In case a metatype is being created without any property, a warning "A metatype should have properties; in case no properties are wanted, consider to use 'metatype=false'" should be logged.

      (inspired by FELIX-4033, thanks Robert)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              joerghoh Joerg Hoh
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: