Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-427

RCP branding issues - allow pluggable implementations of NbBundle.getMessage()

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 8.2, 9.0
    • None
    • platform - Other
    • None

    Description

      Many areas of the platform allow for an RCP application to override the default behaviour. Unfortunately, NbBundle.getMessage() is not one of them. There is an implicit assumption that the current branding support provides all the functionality an RCP application might require to translate the input arguments into the desired message. While true a majority of the time, this does not always hold, because it only allows for control of the surrounding static aspects of the message.

      RCP applications need a way to control how input arguments are transformed into strings over and above what is provided by the default formatters in MessageFormat (eg. possibly functionality like MessageFormat::setFormatByArgumentIndex). This would allow for RCP applications to have full control of how the input arguments are translated into text, possibly using services or information only available within the context of the RCP application.

      An example of such a need is https://issues.apache.org/jira/browse/NETBEANS-352 where the only current solution is to hack system properties. I've worked around others myself.

      The suggested solution (preferred in my opinion as least intrusive) would be to allow pluggable implementations of NbBundle.getMessage().

      An alternative approach would be to improve the NbBundle API with the ability to externally plug in formatters (setFormatByArgumentIndex) on a message by message basis.

      Happy to provide a PR if there's some consensus on a way to fix this (see also discussion at https://github.com/apache/incubator-netbeans/pull/425)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              neilcsmith Neil C Smith
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: