You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Neil C Smith (JIRA)" <ji...@apache.org> on 2018/02/26 10:07:00 UTC

[jira] [Created] (NETBEANS-427) RCP branding issues - allow pluggable implementations of NbBundle.getMessage()

Neil C Smith created NETBEANS-427:
-------------------------------------

             Summary: RCP branding issues - allow pluggable implementations of NbBundle.getMessage()
                 Key: NETBEANS-427
                 URL: https://issues.apache.org/jira/browse/NETBEANS-427
             Project: NetBeans
          Issue Type: Improvement
          Components: platform - Other
    Affects Versions: 8.2, 9.0
            Reporter: Neil C Smith


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|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|https://github.com/apache/incubator-netbeans/pull/425])





--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists