Community
Participate
Working Groups
If I have a class Foo and write code: class Bar implements Foo {...} I get this error: "The type Foo cannot be a superinterface of Bar; a superinterface must be an interface" There's no quick fix. Two possible quick fixes are: 1. Replace 'implements' with 'extends'. 2. Suggest replacing Foo with one of Foo's interfaces. There's probably a similar version of this for using extends with interfaces, I'll leave that out for now.
Move to JDT/UI
I20080702-0939 At least the first suggestion is already implemented. But only in one direction. "Class implements Class" still has no quick fix. Not sure if the second options makes much sense in that case.
I was just going to add this issue myself. I design a lot of API and keep confusing "extends" and "implements" in Java (other languages don't make the distinction) For instance: ------------------------------------------------ class X extends Serializable { } ------------------------------------------------ This can happen easily to me, because just before creating X, I might have been creating a bunch of interfaces, where funkily we do not use "implements" but "extends" for interfaces. I would love to see a quick fix here that produces this: ------------------------------------------------ class X implements Serializable { } ------------------------------------------------
Created attachment 272296 [details] Quick Fix Screenshot (In reply to Lukas Eder from comment #3) This one already exists. See attached screenshot.
(In reply to Noopur Gupta from comment #4) > This one already exists. See attached screenshot. Oh interesting. In what release was it added, then? Perhaps this has become duplicate, then?
(In reply to Lukas Eder from comment #5) > (In reply to Noopur Gupta from comment #4) > > This one already exists. See attached screenshot. > > Oh interesting. In what release was it added, then? Added via bug 71754. > Perhaps this has become duplicate, then? This bug is to change 'implements' to 'extends'.