[
https://jira.jboss.org/jira/browse/JBIDE-3950?page=com.atlassian.jira.plu...
]
Xue Peng resolved JBIDE-3950.
-----------------------------
Fix Version/s: 3.1.0.CR2
(was: LATER)
Resolution: Out of Date
We moved the "Decoder Setting" to the Tabbed Property View , User can set Enum
decoder there.
Add Enum type on configuration page for "EnumDecoder"
decoder
-------------------------------------------------------------
Key: JBIDE-3950
URL:
https://jira.jboss.org/jira/browse/JBIDE-3950
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: smooks
Affects Versions: 3.0.0.CR2
Reporter: Maurice Zeijen
Assignee: Xue Peng
Fix For: 3.1.0.CR2
The Enum decoder is used to map Strings to a Java enum. The decoder parameters are used
to map the value to the Enum value. Here is a configuration example:
<resource-config selector="decoder:test">
<resource>org.milyn.javabean.decoders.EnumDecoder</resource>
<param
name="enumType">example.trgmodel.LineOrderPriority</param>
<param name="LOW">NOT_IMPORTANT</param>
<param name="MEDIUM">IMPORTANT</param>
<param name="HIGH">VERY_IMPORTANT</param>
</resource-config>
The enumType parameter defines the enumeration object. The other parameters represent the
enum mapping (it isn't pretty, I know ;) ). The name of the parameter is the input
value and the value of the parameter is the resulting enum name.
A good editor could make this mapping easier by looking at the enum type and create the
mapping for the several enum names. The user only needs to map the input values.
Maybe the graph editor could also be enhanced to make it possible to map an enum to an
enum.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira