| Summary: | Cannot have an instance based user supplied message class for i18n. | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | David Marsh <dmarsh26> |
| Component: | WindowBuilder | Assignee: | Konstantin Scheglov <Konstantin.Scheglov> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | clayberg |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
| Attachments: | |||
|
Description
David Marsh
Created attachment 201421 [details]
Report for when messages class is non static and generates exception stacktrace.
Appears stacktrace is an application issue, please ignore ! Created attachment 201429 [details]
Example that demonstrates that even with annotation cannot display text, get <dynamic> instead.
Please ignore first bug report zip file, example does not allow reproduce. There is still the <dynamic> issue though. If you want to render this, your should tell WindowBuilder how to create value for "messages" contructor argument.
Add following JavaDoc to the TestDialog constructor.
/**
* @wbp.eval.method.parameter messages new packageB.Messages()
*/
(just 'new Messages()' also works)
I think that our support for (old) standard Eclipse NLS pattern works as expected.
You want support for another NLS pattern.
That is OK, we support contributing NLS patterns from other plugins and binding them to the toolkits.
See how other NLS patterns are implemented and add support for yours.
Here are two pieces from plugin.xml files of Core and Swing plugins.
First contributes NLS patterns and second binds it to the Swing toolkit.
<!-- ======================================================== -->
<!-- NLS sources -->
<!-- ======================================================== -->
<extension point="org.eclipse.wb.core.nlsSources">
<description id="org.eclipse.wb.core.nls.bundle.eclipse.old.EclipseSource"
source="org.eclipse.wb.internal.core.nls.bundle.eclipse.old.EclipseSource"
composite="org.eclipse.wb.internal.core.nls.bundle.eclipse.old.EclipseSourceNewComposite"/>
</extension>
<extension point="org.eclipse.wb.core.nlsSources">
<binding toolkit="org.eclipse.wb.swing"
description="org.eclipse.wb.core.nls.bundle.eclipse.old.EclipseSource"/>
</extension>
The key point here is that WB is working as expected. It supports multiple different popular i18n patterns. It is not possible to support arbitrary, custom patterns however without additional information. WB provides an extension point which can be used to teach the tool about the custom pattern you want to use. |