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
* Button id for a "Back" button (value 14).
     */
    public int BACK_ID = 14;
    /**
     * Button id for a "Next" button (value 15).
     */
    public int NEXT_ID = 15;
    /**
     * Button id for a "Finish" button (value 16).
     */
    public int FINISH_ID = 16;
    /**
     * Button id for a "Help" button (value 17).
     */
    public int HELP_ID = 17;
    /**
     * Button id for a "Select All" button (value 18).
     */
    public int SELECT_ALL_ID = 18;
    /**
     * Button id for a "Deselect All" button (value 19).
     */
    public int DESELECT_ALL_ID = 19;
    /**
     * Button id for a "Select types" button (value 20).
     */
    public int SELECT_TYPES_ID = 20;
    /**
     * Button id for a "No to All" button (value 21).
     */