Bug 195005

Summary: [pull up] yields compilation error due to no enclosing instance
Product: [Eclipse Project] JDT Reporter: kely_garcia <kely_garcia>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, deepakazad, gsoares, reprogrammer
Version: 3.3   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description kely_garcia CLA 2007-06-30 02:16:48 EDT
Build ID: I20070608-1718

Steps To Reproduce:
Pull up method m on the following:

public class A {
  public Object theField;
class B extends C {
    public void m(){
      A.this.theField=null;
    }
    void mPrime(){
      m();
    }
  }
}
class C {
  public Object theField;
}

Yields the following refactored code:

public class A {
	public Object theField;

	class B extends C {
		void mPrime() {
			m();
		}
	}
}

class C {
	public Object theField;

	public void m() {
		A.this.theField = null;
	}
}

The compilation error is: "No enclosing instance of the type A is accesible in scope"


More information:
Comment 1 Olivier Thomann CLA 2007-07-01 18:17:33 EDT
Move to JDT/UI
Comment 2 Dani Megert CLA 2010-07-28 08:31:41 EDT
*** Bug 319926 has been marked as a duplicate of this bug. ***
Comment 3 Deepak Azad CLA 2011-10-18 21:46:17 EDT
*** Bug 351383 has been marked as a duplicate of this bug. ***
Comment 4 Eclipse Genie CLA 2019-02-23 13:54:06 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Dani Megert CLA 2019-02-24 09:02:41 EST
Still an issue in 4.11 M3.
Comment 6 Eclipse Genie CLA 2021-02-14 05:25:34 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 7 Eclipse Genie CLA 2023-03-09 17:11:54 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.