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

Bug 322605

Summary: Extract local variable refactoring in an aspect complains about non-existant problems
Product: [Tools] AJDT Reporter: Andrew Eisenberg <andrew.eisenberg>
Component: CoreAssignee: Andrew Eisenberg <andrew.eisenberg>
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-12 19:40:14 EDT
Simple aspect. Select '9 + 8' and perform 'Extract Local' refactoring.

public aspect ExtractLocal {
   void x() {
	   int x = 9 + 8;
   }
}


Numerous refactoring problems are found.  This is because validation is proceeding off of the actual source code, not the transformed source code.  See ExtractTempRefactoring.checkFinalConditions() line 498.
Comment 1 Andrew Eisenberg CLA 2010-08-12 19:48:03 EDT
Extract method appears to work.
Comment 2 Andrew Eisenberg CLA 2010-08-12 23:18:43 EDT
The easiest fix here would be to call ExtractTempRefactoring.setCheckResultForCompileProblems(false).  This would have to be done through weaving.
Comment 3 Andrew Eisenberg CLA 2010-08-19 15:46:07 EDT
Fixed.