Eclypse placeholders are similar to printf style format specifiers except that they have to be enclosed in square brackets and can also include an optional label parameter. Eclypse placeholders are meant to be used in the app. However, when exporting data out of eclypse, exporter can determine the formatting of the placeholders and can choose from available placeholder options.
Anatomy
Placeholder Example: [%2$d:label]
[.....] -> square brackets indicate that the contents will be eclypse style placeholder.
2 -> optional order specifier. You use the order specifier if the content has multiple placeholders.
d -> indicates whether the placeholder will be replaced by text, integer or floating point number. "d" notation means this placeholder is going to be replaced by an integer.
:label -> optional label specifier. Including label in placeholders is helpful if you are planning to export data out of eclypse in the ICU format specification.
Recognized Patterns*
Name | Patterns | Discussion |
---|---|---|
string placeholder | [%s], [%@], [%1$s], [%2$@] ... | use [%n$s] or [%n$@] pattern if you need to specify the order of the placeholders. |
integer placeholder | [%i], [%d], [%u], [%li], [%ld], [%lu], [%lli], [%lld], [%llu], [%1$i], [%2$d], [%1$u], [%1$li], [%2$ld], [%1$lu], [%1$lli], [%2$lld], [%1$llu] | * i, d, u indicates integer type. * you can prefix i, d, u symbols with 'l' or 'll' to indicate larger size integers (long or long long). * use [%n$i] pattern if you need to specify the order of the placeholders. |
floating point placeholder | [%f], [%.1f], [%.2f] [%Lf], [%.1Lf], [%.2Lf] [%1$.2f], [%2$.1f], [%3$.6f] | * f indicates floating point type * you can prefix f symbol with 'L' to indicate long double type. * .2f indicates that you want to display only the 2 most significant decimal digits of this floating point number. |
datetime (ordered & unordered) | [%dt], [%1$dt] [%dts], [%2$dts] [%dtm], [%3$dtm] [%dtl], [%2$dtl] [%dtf], [%1$dtf] | Some formatting schemes such ICU Message Syntax use keywords like short, medium or long to indicate a prebuilt date presentation style. dt -> datetime - medium format dts -> datetime - short format dtm -> datetime - medium format dtl -> datetime - long format dtf -> datetime - full format |
datetime - custom (ordered & unordered) | [%dtc"any_datetime_symbols"] [%2$dtc"any_datetime_symbols"] | dtc -> datetime - custom you can use any datetime symbols as long as they are enclosed in double quotes "....." Examples: [%dtc"yyyy.MM.dd G 'at' HH:mm:ss zzz"] [%1$dtc"h:mm a"] [%dtc"hh 'o''clock' a, zzzz"] [%3$dtc"yy-MMM-dd'T'hh:mm aaa"] |
* all patterns are case insensitive.
Important
All of the patterns also support addition of a label notation within the pattern. For example:
Without Label | With Label |
---|---|
[%s] | [%s:label] |
[%1$i] | [%1$i:label] |
[%.2f] | [%.2f:label] |
[%dts] | [%dts:label] |
When an Eclypse placeholder is recognized in the text, it is highlighted. See example below.