Big thanks Markus, this really helps me understand the relation between the Descriptor and the class it is describing! And also the config.jelly placement :)
On Wed, Nov 8, 2023 at 10:10 PM 'Winter, Markus' via Jenkins Developers < [email protected]> wrote: > Yes, this is possible. See > > > https://github.com/jenkinsci/plot-plugin/blob/7e7504adc1f710a384af9961ea3940ab2ed11657/src/main/java/hudson/plugins/plot/PlotDescriptor.java > > What can be seen frequently is that there is an abstract Descriptor > implementation for extension points in a separate class, but the actual > extensions have the descriptor as static inner class. > > I think the reason why the descriptor implementation is usually a static > inner class is because there is a tight relation between them. And quite > often the descriptor contains few methods. > > > > *From:* [email protected] <[email protected]> *On > Behalf Of *tzach solomon > *Sent:* Mittwoch, 8. November 2023 20:43 > *To:* [email protected] > *Subject:* Re: DescriptorImpl which is not public static inside the > parent class > > > > You don't often get email from [email protected]. Learn why this is > important <https://aka.ms/LearnAboutSenderIdentification> > > From my experience (and I understand it's only me), it is hard to maintain > multiple static classes over the years and I would like to make it as easy > as possible. > > For example, in "io.jenkins.plugins.designlibrary.Select.java", there are > multiple static classes and the class kind of loses the single > responsibility principle. > > > > So my question is it a must that the DescriptorImpl reside in the same > class and as static? > > > > Thanks in advance, > > Tzach > > > > > > On Tue, Nov 7, 2023 at 8:36 PM Basil Crow <[email protected]> wrote: > > On Tue, Nov 7, 2023 at 7:31 AM [email protected] > <[email protected]> wrote: > > > > can I create a class which will function as DescriptorImpl but not > reside inside the parent class as public static class? > > What problem are you trying to solve that leads you to this question? > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/CAFwNDjqzroXLwof3PHfqiZeiKu1%3D5fyMK4bG49tSYqQkLZJ1vQ%40mail.gmail.com > . > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/CAC19wgK7g%3D%3D9epAt6GPspSxpD5o9ety6H6%2Bhf1h%2BB%3Dbc%2BoJF-g%40mail.gmail.com > <https://groups.google.com/d/msgid/jenkinsci-dev/CAC19wgK7g%3D%3D9epAt6GPspSxpD5o9ety6H6%2Bhf1h%2BB%3Dbc%2BoJF-g%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/AS1PR02MB78470A0C0EEE5F569476863887A8A%40AS1PR02MB7847.eurprd02.prod.outlook.com > <https://groups.google.com/d/msgid/jenkinsci-dev/AS1PR02MB78470A0C0EEE5F569476863887A8A%40AS1PR02MB7847.eurprd02.prod.outlook.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAC19wgL%2BQi8pawSNHgKppo5f%3DZFdRjo%2B7oe381ut9y37UjLsTg%40mail.gmail.com.
