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

Bug 426001

Summary: [type wizards] Remove ".java" when pasting into 'Name:' field of New Type wizard
Product: [Eclipse Project] JDT Reporter: Patrick Julian <mail.recycling>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, noopur_gupta
Version: 4.3   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Current behaviour none

Description Patrick Julian CLA 2014-01-17 11:05:01 EST
Created attachment 239103 [details]
Current behaviour

Current behaviour:

I call dialog "New Java Class".
I paste / enter a class name: "MyTestClass.java".

Eclipse outputs:
"Type name must not be qualified."

Eclipse won't let me finish.
I am frustrated because (1) the error message is not well understandable for non-native speakers, plus (2) I didn't wanna spend ages here for something so obvious.

Tested with Juno and Kepler.


Expected behaviour:

Eclipse detects that in fact I intend to create a new Java class. (That is why I ended up in this very dialog, after all).

It 
- either simply ignores the file extension silently and case-independently.
- or, in case I entered another suffix than .java, it tells me that it would expect .java and that I might have ended up in the wrong dialog.


Best-case-behaviour: 

Eclipse offers a shortcude for the all-too-frequently-used "add new java class" where the IDE takes a name and assumes reasonable defaults depending on the given folder from which the shortcut dialog was called.
Comment 1 Noopur Gupta CLA 2016-06-16 07:21:38 EDT

*** This bug has been marked as a duplicate of bug 495680 ***