Bug 220378 - [create on paste] support for package-info.java
Summary: [create on paste] support for package-info.java
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-26 10:33 EST by Jerome Lanneluc CLA
Modified: 2008-03-11 11:28 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2008-02-26 10:33:59 EST
1. Start a new workspace on a 1.5 JRE
2. In the Package Explorer,paste the following:
   @Deprecated
   @Deprecated
   package example;
Observe: It creates a cu Snippet.java with the following content:
package snippet;

public class Snippet {
	public static void main(String[] args) {
		   @Deprecated
		   @Deprecated
		   
	}

	public static void main(String[] args) {
		package example;
	}
}

I expected it would create a package-info.java file with the clipboard content.
Comment 1 Dani Megert CLA 2008-02-26 11:05:26 EST
package-info.java - why?
Comment 2 Jerome Lanneluc CLA 2008-02-26 11:14:35 EST
Since there is no type, the only valid .java file with this content is package-info.java.
Comment 3 Dani Megert CLA 2008-02-26 11:37:34 EST
Well, the idea is to help you with snippets from bug reports. No one would probably ever want a package-info being created here.
Comment 4 Martin Aeschlimann CLA 2008-02-29 12:19:30 EST
I also think that package-info is a special case. Nice to have...