<div dir="ltr">I like this suggestion. I think supporting both the Factory and Injection point are necessary. </div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 4, 2015 at 1:55 PM, George Gastaldi <span dir="ltr">&lt;<a href="mailto:ggastald@redhat.com" target="_blank">ggastald@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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" target="_blank">https://issues.jboss.org/browse/FORGE-2331</a> (also in <a href="https://issues.jboss.org/browse/FORGE-2469" target="_blank">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>@Inject</span>
      
      
        
           <span>private</span> <span>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" target="_blank">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,<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br>-- <br><div><div dir="ltr"><div><div dir="ltr"><b>George Gastaldi | Senior Software Engineer</b><br><br>JBoss Forge Team<br>T: <a href="tel:%2B55%2011%203524-6169" value="+551135246169" target="_blank">+55 11 3524-6169</a><br>M: <a href="tel:%2B55%2047%209711-1000" value="+554797111000" target="_blank">+55 47 9711-1000</a><br></div></div></div></div>
</div></font></span></div></div></div></div></div>
<br>_______________________________________________<br>
forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Lincoln Baxter, III<br><a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>&quot;Simpler is better.&quot;</div>
</div>