Bug 506043 - Pasting Java snippet as new class doesn't follow code templates
Summary: Pasting Java snippet as new class doesn't follow code templates
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.6   Edit
Hardware: PC Linux
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-16 16:53 EDT by Marc-André Laperle CLA
Modified: 2016-10-17 03:43 EDT (History)
1 user (show)

See Also:


Attachments
Test project (8.19 KB, application/zip)
2016-10-16 16:53 EDT, Marc-André Laperle CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc-André Laperle CLA 2016-10-16 16:53:28 EDT
Created attachment 264881 [details]
Test project

Using Neon.1

When copying a code snippet and pasting it in the Project explorer, it creates a class properly but doesn't apply the code template for a "New class". My use case is that I have the copyright header in the "New Class" template but in this case specially it doesn't.

1. Import attached project (it contains project-specific Code Template settings)
2. Copy the following code to the clipboard:
public class B {

}
3. In Package Explorer, click on testPackage package, then paste (Ctrl-V).

The file is created but it does not contain the copyright header.
Comment 1 Dani Megert CLA 2016-10-17 03:43:15 EDT
We don't apply any changes to the pasted text (e.g. also no formatting or organize import.