Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367748 - Problem with the error-checking/validating input field when setting the print margins on the Printing preference page
Summary: Problem with the error-checking/validating input field when setting the print...
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: 1.8.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-03 06:55 EST by Rahul jain CLA
Modified: 2013-12-12 12:28 EST (History)
2 users (show)

See Also:


Attachments
Fix to resolve the validation issue (997 bytes, patch)
2012-01-03 06:59 EST, Rahul jain CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 ?