Bug 300472 [Dialogs] [JFace] Provide accessor for dialog messages
It would be nice to have access to the Dialog messages (eg. IDialogConstants.OK_LABEL) trough API instead of a field access. This would allow the RAP team to provide a session-based translation for the labels and furthermore improves the usability for our current users. Developers who want to single-source their applications for RCP and RAP cannot use the existing API of JFace as the labels are hardcoded as static fields and RAP has no chance to intervene this behavior without breaking API. I suggest to provide an accessor like SWT.getMessage() to get the translated string as this would allow developers to use the same API in RCP and JFace. I'd be happy to provide a patch once we decided on a possible approach. As suggested above, I'd introduce an accessor on Dialog itself and introduce message keys in IDialogConstants.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IDialogConstants.java
/**
     * The label for open buttons.
     */
    public String OPEN_LABEL = JFaceResources.getString("open"); 
    /**
     * The label for close buttons.
     */
    public String CLOSE_LABEL = JFaceResources.getString("close"); 
    /**
     * The label for show details buttons.
     */
    public String SHOW_DETAILS_LABEL = JFaceResources.getString("showDetails"); 
    /**
     * The label for hide details buttons.
     */
    public String HIDE_DETAILS_LABEL = JFaceResources.getString("hideDetails"); 
    /**
     * The label for back buttons.
     */
    public String BACK_LABEL = JFaceResources.getString("backButton"); 
    /**
     * The label for next buttons.
     */
    public String NEXT_LABEL = JFaceResources.getString("nextButton"); 
    /**
     * The label for finish buttons.
     */
    public String FINISH_LABEL = JFaceResources.getString("finish"); 
    /**
     * The label for help buttons.