[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.platform.swt] Re: Text Message Parameter Substitution
|
The preferred way in Eclipse source code seems to be to use
java.text.MessageFormat. Instead of %s you'd use {0}. That also works better
for natural languages with different word orders than English because the
substitutions are numbered.
--
Ed Burnette, co-author Eclipse in Action (www.manning.com)
"Mila" <mmclennan@xxxxxxx> wrote in message
news:b84c6u$uil$1@xxxxxxxxxxxxxxxx
>
> We are trying to do simple parameter substitution for messages to our end
> user.
>
> For example, when a customer number is entered and not found, we'd like to
> put up the message:
>
> "Customer %s not found" where %s is our customer number and we get the
> String into which we put the parameter from a table somewhere.
>
> I realize there are a lot of ways to do this.
>
> Is there a standard SWT or JFace approach to doing this.
>
> Thanks,
> Mila
>