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

Bug 405968

Summary: [type wizards][DBCS4.3]Package name is not automatically entered for the project name containing some DBCS characters.
Product: [Eclipse Project] JDT Reporter: Harendra <harendra>
Component: UIAssignee: Noopur Gupta <noopur_gupta>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, john.arthorne, noopur_gupta, takajo, takepon
Version: 4.3   
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
Characters to be used as project name. none

Description Harendra CLA 2013-04-18 06:37:20 EDT
Buildid: I20130314-1330
Platform: RHEL 6, Japanese
JRE 1.7.0 IBM Linux build pxa6470sr4fp1-20130325_01(SR4 FP1)

1. Create a new folder using following set of characters.
啊☆€㐁ᠠﭖꀀༀU䨭抎駡郂
Comment 1 Harendra CLA 2013-04-18 06:40:01 EDT
Seems like eclipse bug system cannot handle those characters. So I am attaching as a text file.
1. Create a new project containing characters in the attached file.
2. Create a new class.
3. The project name will not be automatically entered in the package name field.
Comment 2 Harendra CLA 2013-04-18 06:42:46 EDT
Created attachment 229853 [details]
Characters to be used as project name.
Comment 3 Dani Megert CLA 2013-04-18 06:46:59 EDT
Noopur, please investigate.
Comment 4 Noopur Gupta CLA 2013-04-18 07:35:21 EDT
(In reply to comment #1)
> Seems like eclipse bug system cannot handle those characters. So I am
> attaching as a text file.
> 1. Create a new project containing characters in the attached file.
> 2. Create a new class.
> 3. The project name will not be automatically entered in the package name
> field.

The attached text is not a valid Java Identifier and hence it is not automatically entered in the package name field. 

If you try to create a package separately with that text, you can see the error message "Invalid package name. '啊☆€㐁ᠠﭖꀀༀU䨭抎駡郂
Comment 5 Noopur Gupta CLA 2013-04-18 07:40:33 EDT
(In reply to comment #4)
The comment was not shown completely due to the special characters, adding again:

The attached text is not a valid Java Identifier and hence it is not automatically entered in the package name field. 

If you try to create a package separately with that text, you can see the error message "Invalid package name. '(Attached text)' is not a valid Java identifier"

Only if the project name is a valid package name, the package name field will be pre-filled.
Comment 6 Dani Megert CLA 2013-04-18 07:55:50 EDT
.
Comment 7 Harendra CLA 2013-04-19 04:48:40 EDT
The main problem here is not the fact that the characters are illegal. The problem is that they are not entered in the package box which is the supposed feature. 
If you enter illegal characters in the package field you get error, as a user you expect similar functionality for the project name containing illegal characters as well. i.e The package name should be entered but an error should be shown not just the blank field. 
I think that in order to keep the UI behavior consistent this is a desired functionality.
Comment 8 Dani Megert CLA 2013-04-19 04:51:50 EDT
(In reply to comment #7)
> The main problem here is not the fact that the characters are illegal. The
> problem is that they are not entered in the package box which is the
> supposed feature. 
> If you enter illegal characters in the package field you get error, as a
> user you expect similar functionality for the project name containing
> illegal characters as well. i.e The package name should be entered but an
> error should be shown not just the blank field. 
> I think that in order to keep the UI behavior consistent this is a desired
> functionality.

If the project name is already not a usable Java identifier, then inserting it, is in most of the cases not what the user wants. We won't change the current behavior.
Comment 9 Harendra CLA 2013-04-30 23:45:35 EDT
In new build tt appears that if the project name contains DBCS characters the package field is empty (for valid DBCS characters eg. 日本語).
This is happening in Integration build I20130428
Something changed?
Comment 10 Harendra CLA 2013-05-01 00:55:27 EDT
Checked again the problem was not with Japanese characters it was with Uppercase characters. If you create a project with uppercase characters (ASCII) the project name is not automatically entered. Is this the spec?
Comment 11 Dani Megert CLA 2013-05-01 02:44:50 EDT
(In reply to comment #10)
> Checked again the problem was not with Japanese characters it was with
> Uppercase characters. If you create a project with uppercase characters
> (ASCII) the project name is not automatically entered. Is this the spec?

Yes. We only fill in the package name if the name is valid and not discouraged. Names starting with an uppercase letter are discouraged.
Comment 12 Harendra CLA 2013-06-03 04:32:15 EDT
Closing this.