Closed eclipse-ocl-bot closed 1 month ago
By Ed Willink on Dec 27, 2009 06:31
Ping.
Surely someone must have an opinion that either this is a good or a bad idea?
By Ed Willink on Dec 27, 2009 07:00
org.eclipse.emf.ecore/plugin.properties uses a doubled single quote consistently e.g.
_UI_EGenericTypeInvalidPrimitiveType_diagnostic = The primitive type ''{0}'' cannot be used in this context
EMF clearly will not change, so I think we should use a doubled single quote as well.
We can perhaps try to ensure that the number of error reporting routines is small so that users can override at some critical point to change ''{n}'' to whatever they like, regardless of whether the message originated from EMF, LPG, OCL, ...
By Ed Willink on Dec 27, 2009 07:33
Correction: EMF's '' is in a properties file and so means a single single quote.
I therefore suggest that we
a) immediately convert all error messages to contain a single single quote around substitutions (the same policy as EMF).
b) plan to support a ProblemOption.SUBSTITUTION_QUOTE to allow a replacement spelling for the ' in '{ and }' and clarify the message formatting API to use this option in as few places as possible. (The LPG2 changes seem to be revising reportError slightly. The indirection of LPG2 will provide an opportunity to have only one or two xxxxError methods rather than perhaps 10.)
By Alexander Igdalov on Dec 28, 2009 12:15
(In reply to comment #3)
Correction: EMF's '' is in a properties file and so means a single single quote.
I therefore suggest that we
a) immediately convert all error messages to contain a single single quote around substitutions (the same policy as EMF).
b) plan to support a ProblemOption.SUBSTITUTION_QUOTE to allow a replacement spelling for the ' in '{ and }' and clarify the message formatting API to use this option in as few places as possible. (The LPG2 changes seem to be revising reportError slightly. The indirection of LPG2 will provide an opportunity to have only one or two xxxxError methods rather than perhaps 10.)
I don't think this issue is that important. But if you wish to get aligned with EMF my +1 to single quotes.
By Ed Willink on Mar 14, 2011 16:31
Single quotes used for Pivot messages.
By Ed Willink on May 27, 2011 06:41
Resolved for Indigo is 3.1.0 not 3.2.0.
By Ed Willink on May 29, 2012 13:22
Closing all bugs resolved in Indigo.
| --- | --- | | Bugzilla Link | 296991 | | Status | CLOSED FIXED | | Importance | P3 minor | | Reported | Dec 05, 2009 02:22 EDT | | Modified | May 29, 2012 13:22 EDT | | Blocks | 318368 | | Reporter | Ed Willink |
Description
OCLMessages.properties variously uses () and "" to quote error message clauses.
e.g:
NonStdIterator = Usage of non-standard "{0}" iterator
TupleFieldDoesntExistERROR = Cannot find tuple property ({0})
Since " is not an OCL character and ( is. Let us change all messages to use ".