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

Bug 201402

Summary: [Testing Tool] Invalid characters inserted in source folder textbox when using Browse button of "Generate..." menu item
Product: z_Archived Reporter: Mohsen Saboorian <mohsens>
Component: TPTPAssignee: Paul Slauenwhite <paulslau>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: jkubasta, paulslau
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Mohsen Saboorian CLA 2007-08-28 06:05:53 EDT
TPTP Testing Tool Project (4.2.100.v200706132116) has the same problem like bug 147056.
Record a test suite, right click on it (test perspective) and press Generate..., Browse for source folder and select a source folder. Some Unicode characters are inserted which prevents source generation (because creates a new project). Here is an example text with fa_IR locale:
/Test/src

Characters 8234 and 8236 (decimal) are inserted at the start and end of the string respectively.
Comment 1 Paul Slauenwhite CLA 2007-09-07 13:05:49 EDT
Hi Mohsen, what locale are you running?
Comment 2 Mohsen Saboorian CLA 2007-09-07 14:39:22 EDT
(In reply to comment #1)
> Hi Mohsen, what locale are you running?
> 

Hi Paul. I told my locale in the bug report.
I use fa_IR (Farsi/Persian, Iran), but you should probably be able to reproduce this with all Arabic locales (or even Hebrew).
Comment 3 Paul Slauenwhite CLA 2007-09-07 14:42:14 EDT
Sorry Mohsen, I missed the locale.
Comment 4 Paul Slauenwhite CLA 2007-10-03 06:39:22 EDT
Reassigning to Project Lead until a Lead Committer is assigned to this component.
Comment 5 Paul Slauenwhite CLA 2007-11-05 13:46:58 EST
Included in 4.5 plan for the Test Tools project.
Comment 6 Paul Slauenwhite CLA 2007-11-05 14:44:29 EST
Please provide a sizing for this defect before Monday, November 12, 2007.
Comment 7 Mohsen Saboorian CLA 2007-11-05 14:57:04 EST
(In reply to comment #6)
> Please provide a sizing for this defect before Monday, November 12, 2007.
> 

Are you talking to me? Can you be a bit clearer by "sizing".
Comment 8 Paul Slauenwhite CLA 2007-11-05 18:20:42 EST
(In reply to comment #7)
> (In reply to comment #6)
> > Please provide a sizing for this defect before Monday, November 12, 2007.
> > 
> 
> Are you talking to me? Can you be a bit clearer by "sizing".
> 

Actually, I was talking to me:)  It is the defect owner that assigns a sizing and I happen to be the owner of this defect.
Comment 9 Paul Slauenwhite CLA 2008-01-22 08:25:45 EST
The org.eclipse.osgi.util.TextProcessor#process() method was being used to process  the given text and return a string with the appropriate substitution based on the locale.  However, this method is only intended for read-only text [1, 2] since it adds header/footer characters (8234 and 8236) to the processed string.  When the string was converted to a IPath, the header character was considered the (empty) project name, thereby causing the generate action to fail.  

The org.eclipse.hyades.test.tools.ui.java.internal.junit.editor.SourceInfoViewer class was updated to use the org.eclipse.hyades.test.ui.internal.util.SpecialFieldsBidiListener i instead of the org.eclipse.osgi.util.TextProcessor#process() method.

In addition, the following classes were updated to use the org.eclipse.hyades.test.ui.internal.util.SpecialFieldsBidiListener instead of the org.eclipse.osgi.util.TextProcessor#process() method for read/write fields:

org.eclipse.hyades.test.tools.core.internal.java.preferences.JUnitPreferences.java
org.eclipse.hyades.test.tools.ui.common.internal.editor.TestSuiteForm.java
org.eclipse.hyades.test.tools.ui.java.internal.junit.controls.JUnitTestSuiteImportOptionsControl.java
org.eclipse.hyades.test.ui.forms.base.ExecutionEventDetailsPart.java

[1] http://wiki.eclipse.org/index.php/New_Bidi_APIs 
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=146220#c6
Comment 10 Paul Slauenwhite CLA 2009-02-25 11:58:29 EST
Closing by default since not closed by the originator in the 7+ months since
being resolved.  

Please reopen if the issue is still present in the latest TPTP release or the
resolution is not correct.