Skip to content

I20260109-1800

@ptziegler ptziegler tagged this 09 Jan 18:25
* Improve handling of Eclipse-style NLS accessors #2711

There are two issues when using the Eclipse-style accessors for
resources bundles:

1) Modern accessors initialize the `RESOURCE_BUNDLE` field with
`Messages.class.getPackageName() + .properties`. This is not supported
by JDT, which either expect a fully qualified string or
`Messages.class.getName()`. As a result, the property file is not read
and the wizard only partially initialized.

2) If a property in the wizard is only partially initialized (i.e. if
the value is `null`), a NullPointerException may be thrown. To avoid
this, the call to `NLSSubstitution.getValue()` has been replaced with a
null-safe call to `NLSSubstitution.getValueNonEmpty()`.

Closes https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/2711
Assets 2
Loading