Community
Participate
Working Groups
You can set the grid spacing to 2 inches, but if you change the units to pixels, 192 pixels is considered 'illegal'.
Created attachment 31245 [details] patch for grid unit validation Enhanced validation to use a consistent base unit for comparisons to the minimum and maximum allowable grid spacings.
Committed the code
It appears the limit is now 100 inches (which seems excessive) but at least it's consistent. It doesn't, however, complain about malformed numbers like '99.9.9.'!
Tom, can you reopen to get the validation is improved? Thanks.
Reopen to fix malformed numbers like '99.9.9.' as reported
It appears that the ICU4J DecimalFormat parse method that we use to parse the grid spacing field will parse a String like "99.9.9." (or "99.9.", "99.9r") and return 99.9 (i.e. to the first unparsable character). I have posted a question to the newgroup to find out if there is a way to restrict or force an exception out these cases.
The parse method should update the ParsePosition object so that you can check if position.getIndex() == text.length().
Created attachment 47692 [details] patch for grid spacing validation The parse position is now tested against the text's length to ensure that the full text has been parsed. This will prevent "99.9." to be validated. Please note that the text "5." is accepted as 5 because the parser will parse the full text.
Committed the second patch (patch for grid spacing validation).
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug