Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 367748

Summary: Problem with the error-checking/validating input field when setting the print margins on the Printing preference page
Product: [Modeling] GMF-Runtime Reporter: Rahul jain <rahul.jain>
Component: GeneralAssignee: Project Inbox <gmf-runtime-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: ahunter.eclipse, Vikas.Chandra
Version: unspecified   
Target Milestone: 1.8.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Fix to resolve the validation issue none

Description Rahul jain CLA 2012-01-03 06:55:53 EST
Build Identifier: Version: 3.6.2.r362_v20110210 Build id: M20110210-1200

There is a problem with the error-checking when setting the print margins on the GMF Printing preference page. Page  is not allowing user to input decimal entry that starts with the point. for example ".4" or ".8" and "OK" button is disabled.
 However if we enter the input like "0.4" or "0.8" it is working fine as expected.


The input field can take the double as an input and for example ".4" or ".6" is a valid double input. But when we enter this it is showing an error in input. 

In the StringValidator class, there is a method "isDouble(input)" which verify that the input can pe parsed as Double.

Here there is an additional check is done as shown below:

char[] tokens = input.toCharArray();
		if (!(Character.isDigit(tokens[0])))
			return false;
because of the above check, the input field is not allowing double entry like ".4" [starts with point/decimal] as a valid input.



Reproducible: Always

Steps to Reproduce:
1.Go to Preference->Diagram-> Printing
2.Set the value as ".4" as an input for any print margin
Comment 1 Rahul jain CLA 2012-01-03 06:59:06 EST
Created attachment 208931 [details]
Fix to resolve the validation issue

Attaching a fix to resolve this issue
Comment 2 Rahul jain CLA 2013-04-09 05:25:18 EDT
In which GMF runtime will this fix be available ?