Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-6644 Offer quick fixes for CDI validations
  3. JBIDE-7630

Quick fix for "Stereotype annotation type must be annotated with one of @Target..." error marker

XMLWordPrintable

    • Documentation (Ref Guide, User Guide, etc.)
    • Not Required

      Quick fix for "Stereotype annotation type must be annotated with one of @Target('

      {'TYPE, METHOD, FIELD'}

      '), @Target('

      {'METHOD, FIELD'}

      '), @Target('

      {'TYPE'}

      '), @Target('

      {'METHOD'}

      '), @Target('

      {'FIELD'}

      ') [JSR-299 ยง2.7.1]" error marker.

      If there is no @Target annotation this quick fix should offer next:

      1. Add @Target(

      {TYPE, METHOD, FIELD}) annotation
      2. Add @Target({METHOD, FIELD}) annotation
      3. Add @Target({TYPE}) annotation
      4. Add @Target({METHOD}) annotation
      5. Add @Target({FIELD}) annotation

      If current @Target annotation is not correct this quick fix should offer next:

      1. Change current @Target annotation to @Target({TYPE, METHOD, FIELD}

      ) annotation
      2. Change current @Target annotation to @Target(

      {METHOD, FIELD}

      ) annotation
      3. Change current @Target annotation to @Target(

      {TYPE}

      ) annotation
      4. Change current @Target annotation to @Target(

      {METHOD}

      ) annotation
      5. Change current @Target annotation to @Target(

      {FIELD}

      ) annotation

        1. AddTargetQuickFixOnStereotype.png
          60 kB
          Daniel Azarov
        2. AddTargetToStereotypeRight.png
          63 kB
          Daniel Azarov
        3. ChangeTargetInStereotypeRight.png
          48 kB
          Daniel Azarov
        4. ChangeTargetQuickFixOnStereotype.png
          51 kB
          Daniel Azarov

              dazarov_jira Daniel Azarov (Inactive)
              dazarov_jira Daniel Azarov (Inactive)
              Isaac Rooskov Isaac Rooskov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: