Uploaded image for project: '[Read Only] - Hippo Essentials'
  1. [Read Only] - Hippo Essentials
  2. ESSENTIALS-978

Add option to tell Beanwriter to not override customized getter method

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.2.0
    • 3.1.0
    • None

    Description

      In the case a getter method in a Bean that was generated by the Beanwriter is changed manually, we should prevent that the Beanwriter overrides that method when the Bean for some reason is generated again. At the moment removing the @HippoEssentialsGenerated annotation is an effective way to prevent overwriting. But the Beanwriter will add the method again (because it thinks it is not there), so the Bean class gets duplicate methods and will not compile.

      We can support this use case better by making it possible to add some marker that tells the Beanwriter not to override the method.

      Suggestion: add an extra attribute to the @HippoEssentialsGenerated annotation, e.g

      @HippoEssentialsGenerated(internalName = "myhippoproject:source", overwrite = false)

      That attribute should not be required and by default be true. When the Beanwriter encounters such a flag, it must report with a warning in the Essentials dashboard "WARNING Will not override method X in class Y due to its annotation".

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bleunis Bert Leunis (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: