| Summary: | Copy and paste of type from one file to another does not respect the package of the type | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Ulli Hafner <Knut.Friedhelm> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, jerome_lanneluc |
| Version: | 3.4 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Moving to JDT/Text *** This bug has been marked as a duplicate of bug 114340 *** |
When copying an annotation with the same name but different package from one file into another then the existing annotations are not checked. Setup: ----------------------------------------------------------- File 1 -------------------------------------- package hudson.plugins.pmd.util.model; import edu.umd.cs.findbugs.annotations.SuppressWarnings; @SuppressWarnings("SIC") public class Foo1 { } ----------------------------------------------------------- File 2 -------------------------------------- package hudson.plugins.pmd.util.model; @SuppressWarnings("all") public class Foo2 { } ========================================================== Steps to reproduce: 1. Select @SuppressWarnings("SIC") and CTRL-C in Foo1 2. Put Cursor before public in Foo2 3. CTRL-V Actual Result: -------------------------------------------------------------------------------------------------------- package hudson.plugins.pmd.util.model; import edu.umd.cs.findbugs.annotations.SuppressWarnings; @SuppressWarnings("all") @SuppressWarnings("SIC") public class Foo2 { } Expected Result: -------------------------------------------------------------------------------------------------------- package hudson.plugins.pmd.util.model; @SuppressWarnings("all") @edu.umd.cs.findbugs.annotations.SuppressWarningsSuppressWarnings("SIC") public class Foo2 { }