0 Replies Latest reply on May 2, 2014 12:16 PM by George Gastaldi

    Re: [forge-dev] Create a ResourceBundle.

    George Gastaldi Master

      I see.

      In this case it would be better to have an interface (eg. GitConstants) and add the constants there. I don't think a ResourceBundle would be of good use in this case.

       

      Best Regards,

       

      George

       

      Em 02/05/2014, às 13:03, Daniel Cunha <danielsoro@gmail.com> escreveu:

       

      The ResourceBundle is a alternative, but I can to create a Class that share this values.

       

      With:

      I have 2 files: [2]

      I need to create a two static final String GIT_DICTORY = ".git" per file.

       

      1) I can remove all static final string in my code (Code more clean)

      2) I don't need duplicate this string in any files. I use a unique reference and I can to do a import static, with this:

       

      WDYT?

       

      https://github.com/danielsoro/core/blob/afaf5e620bbebc3b50dc7e656e3b02cf4f04f8c9/git/impl/src/main/java/org/jboss/forge/addon/git/facet/GitFacetImpl.java

      https://github.com/danielsoro/core/blob/afaf5e620bbebc3b50dc7e656e3b02cf4f04f8c9/git/impl/src/main/java/org/jboss/forge/addon/git/facet/GitIgnoreFacetImpl.java

      https://github.com/forge/core/blob/15a264c9392063b1d18ef8ec494a7884b340cb40/scaffold/spi/src/main/java/org/jboss/forge/addon/scaffold/metawidget/inspector/ForgeInspector.java

       

       

      >> On Fri, May 2, 2014 at 12:52 PM, George Gastaldi <ggastald@redhat.com> wrote:

      >> Hi Daniel,

      >> Welcome! Thanks again for your contribution.

      >>

      >> Why do you think a ResourceBundle would be a better choice?  I don't see where i18n could be used there.

      >>

      >> Best Regards,

      >> George

      >>

      >>> Em 02/05/2014, às 12:48, Daniel Cunha <danielsoro@gmail.com> escreveu:

      >>>

      >>> Hi guys,

      >>>

      >>> My name is Daniel and I'm newbie here and I hope help the project with something.

      >>> I looked code and I see that exists many string references, with git directory: ".git"

      >>>

      >>> I sent a PR yesterday , but I thought in other solution. Create a ResourceBundle.

      >>>

      >>> WDYT?

      >>>

      >>> https://github.com/forge/core/commit/3cfa43168ac5486882b52dea32e8096b55b258fe

      >>>

      >>> --

      >>> Att;

      >>> Daniel Cunha (soro)

      >>> _______________________________________________

      >>> forge-dev mailing list

      >>> forge-dev@lists.jboss.org

      >>> https://lists.jboss.org/mailman/listinfo/forge-dev

      >>

      >> _______________________________________________

      >> forge-dev mailing list

      >> forge-dev@lists.jboss.org

      >> https://lists.jboss.org/mailman/listinfo/forge-dev

       

       

      --

      Att;

      Daniel Cunha (soro)

      _______________________________________________

      forge-dev mailing list

      forge-dev@lists.jboss.org

      https://lists.jboss.org/mailman/listinfo/forge-dev