package a;
publicabstract class Super {
publicabstract void first();
abstract void second();
}
package b;
public class Sub extends Super {
}
Pressing Ctrl+I in Sub shows only the possibility to extend first(). When I choose it and click OK, the class is still red, but no intention shows up for implementing second().
This confused me for a few minutes until I realized what was happening.
I can think of some solutions:
1. Show an error message saying "concrete class cannot extend abstract class with package-private abstract members from another package"
2. Show the package-private abstract members in the Implement Methods dialog, but crossed-out or in red, with tooltips explaining that they're package-private
3. Show dialog box upon pressing Ctrl+I (or show a warning at the bottom of the Implement window) explaining that some members are package-private
Description
package a;
publicabstract class Super {
publicabstract void first();
abstract void second();
}
package b;
public class Sub extends Super {
}
Pressing Ctrl+I in Sub shows only the possibility to extend first(). When I choose it and click OK, the class is still red, but no intention shows up for implementing second().
This confused me for a few minutes until I realized what was happening.
I can think of some solutions:
1. Show an error message saying "concrete class cannot extend abstract class with package-private abstract members from another package"
2. Show the package-private abstract members in the Implement Methods dialog, but crossed-out or in red, with tooltips explaining that they're package-private
3. Show dialog box upon pressing Ctrl+I (or show a warning at the bottom of the Implement window) explaining that some members are package-private