<div dir="ltr"><div><div><div><div>Hello,<br><br></div>Antonio Goncalves pointed out in <a href="https://issues.jboss.org/browse/FORGE-2331">https://issues.jboss.org/browse/FORGE-2331</a> (also in <a href="https://issues.jboss.org/browse/FORGE-2469">https://issues.jboss.org/browse/FORGE-2469</a>) that some input configurations could be reused. <br></div><div>For example, the targetPackage although is used in several commands, is initialized differently on some commands.<br><br></div>What would you think it would be a nice strategy to reuse UIInputComponents? <br><br></div>Based on Antonio&#39;s suggestions, I have elaborated 2 proposals: <br><br>1) Introduce specializations of UIInput:<br><br>Eg: <span class="">@Inject</span>
      
      
        
           <span class="">private</span> <span class="">TargetPackage</span> targetPackage;  (Where TargetPackage extends UIInput&lt;String&gt;)<br><br></div><div>More info here:<a href="https://gist.github.com/gastaldi/46b3f38bc38c5efcc0ba">https://gist.github.com/gastaldi/46b3f38bc38c5efcc0ba</a><br></div><div><br></div><div>2)  Move the component creation to utility classes: <br><br>eg: @Inject InputFactory factory;<br></div><div>and in the initializeUI of the UICommand: <br><br>targetPackage = factory.createTargetPackage(builder) ;<br></div><div><div><div><div><div><br></div><div>Of course, we could have a mix of both, but I would like to know your thoughts about each proposal.<br></div><div><br></div><div>Best Regards,<br></div><div><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><b>George Gastaldi | Senior Software Engineer</b><br><br>JBoss Forge Team<br>T: +55 11 3524-6169<br>M: +55 47 9711-1000<br></div></div></div></div>
</div></div></div></div></div></div>