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

Bug 324113

Summary: [refactoring] [plan] Move refactoring---move types into an AJ compilation unit is broken
Product: [Tools] AJDT Reporter: Andrew Eisenberg <andrew.eisenberg>
Component: CoreAssignee: AJDT-inbox <AJDT-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1.0   
Target Milestone: 2.1.1   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Andrew Eisenberg CLA 2010-08-31 13:34:22 EDT
When doing a drag and drop of an existing type into an Aspect compilation unit, a malformed text edit tree exception is thrown.  This is because the drop location in the source code is being calculated on the transformed code, which may contain some dummy variable declarations at the end of the file.  Since these dummy declarations are after the actual end location of the the file and the insert location is calculated based on them, the insert location is invalid.

The solution is to ensure that the version of the source code used to calculate the insertion offset is the same length as the original code, but it must be transformed to remove all syntax errors.
Comment 1 Andrew Eisenberg CLA 2010-08-31 13:34:37 EDT
Currently working, but need to create some tests.
Comment 2 Andrew Eisenberg CLA 2010-08-31 17:55:27 EDT
Fixed with regression tests.