How can I change the default behaviour of eclipse so that it does not prepend the methods it pulls up to an interface with "public abstract"
example, I have a
class A
that implements
interface IA
. Suppose I added a method void a()
to A, and I right click on that method, and select "Refactor->Pull Up", and than make sure void a ()
is selected and I choose the interface IA
, and click ok, a method called public abstract void a();
gets created in IA, I want to get rid of the public abstract
bit.
Is there a way to do that?
Thank You
Changing a Method Signature Select the method or place the cursor somewhere inside. Right-click and choose Refactor > Change Method Signature.
In particular, EMF Refactor supports metrics reporting, smell detection, and refactoring for models being based on the Eclipse Modeling Framework, a widely used open source technology in model-based software development.
To move this method to the new class, highlight the method's name and select Refactor→ Move, or right-click and select Refactor→ Move, opening the Move Static Member(s) dialog shown in Figure 4-5. In Eclipse, you can move a static method, static field, or instance method using refactoring.
Refactoring using Eclipse Right clicking on a Java element in the Package Explorer view and selecting Refactor menu item. Right clicking on a Java element in the Java editor and selecting Refactor menu item. Selecting a Java element in either the Package Explorer view or Java Editor and clicking Shift + Alt + T.
I was just looking at the same thing to see if it had changed and I found your question. In fact this is Eclipse Bug 71627. However there is a simple work around: instead of using Refactor->Pull Up, use Quick fix (Ctrl+1)->Create 'method()' in super interface X.
It also has the advantage that it leads you directly to the new method declaration, so that you can directly write the javadoc, change parameter names etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With