Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316627 - [refactoring] Refactoring does not give warning about modifying derived resources
Summary: [refactoring] Refactoring does not give warning about modifying derived resou...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M1   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-11 11:18 EDT by Lóránt Pintér CLA
Modified: 2010-06-14 09:20 EDT (History)
2 users (show)

See Also:


Attachments
Fix (3.04 KB, patch)
2010-06-14 09:20 EDT, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lóránt Pintér CLA 2010-06-11 11:18:30 EDT
Build Identifier: M20100211-1343

The first time I try to edit a derived resource, Eclipse gives a warning about the resource being derived. However, when some refactoring would change that same resource, no warning is issued.

Reproducible: Always

Steps to Reproduce:
1. Generate some Java classes with some tool like ANTLR
2. Mark the generated sources as derived
3. Create a normal class that refers to one of the generated classes
4. Rename the generated class by changing its name in the class that refers it
5. Eclipse will complete the refactor without any warning, but once you regenerate your ANTLR code, you will have compile errors
Comment 1 Olivier Thomann CLA 2010-06-11 11:38:54 EDT
Moving to JDT/UI
Comment 2 Markus Keller CLA 2010-06-14 09:20:08 EDT
Created attachment 171824 [details]
Fix

I would have expected a warning dialog in step 4. You already get that if the .java file itself is marked as derived, but you didn't get it when only an ancestor of the file was marked as derived.

The patch fixes this and also fixes the rendering on the refactoring preview page.
Comment 3 Markus Keller CLA 2010-06-14 09:20:56 EDT
Fixed in HEAD.