eclipse-jdt / eclipse-jdt/eclipse.jdt.ui

"Move class" refactoring causes code compilation errors

Open
#1,737 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
59
Forks
127
Avg merge
23h 30m
Merged PRs (30d)
35

Description

move class Inner into Target:
```java
package a;
class Upper {
class Inner {
}
Inner i;
}
package b;
class Target {
}
```
Code after refactoring:
```java
package a;
class Upper {
Inner i;
}
package b;
class Target {
}
class Inner {
}
```
Compile error due to moving classes not belonging to the same package.
![image](https://github.com/user-attachments/assets/234b4c8f-244a-4c2f-b86c-5a6b05922c56)

Contributor guide

Open the contributing guide

Research direction

Reproduce the "Move class" refactoring with the Java snippets in the issue, moving Inner from package a into Target in package b. Start by locating the Move class refactoring entry point and its tests; done means the moved code compiles when the source and target classes belong to different packages.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.