Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327988

Summary: Provide "Override method" in the default proposals of a class body
Product: z_Archived Reporter: Mauro Molinari <mauromol>
Component: PDTAssignee: Dawid Pakula <zulus>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: eclipse, zulus
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
See Also: https://git.eclipse.org/r/155097
https://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=c2a7a5c6b77844b7264270e5afa8add0b02c825a
Whiteboard:
Bug Depends on: 480589    
Bug Blocks: 149814    

Description Mauro Molinari CLA 2010-10-17 05:29:51 EDT
Consider the following Java code:

public class A {
  public void test(){
  }
}

public class B extends A {
  | <= invoke code assist here
}

With JDT if you hit Ctrl+Space and the cursor is in the highlighted position within the body of class B, the default content assist proposals also show the possibility to override methods of the superclasses, i.e.:
clone(): Object - Override method in 'Object'
equals(): boolean - Override method in 'Object'
...
test(): void - Override method in 'A'

If you select, for instance, the last item, JDT writes for you:

public class B extends A {
  @Override
  public void test() {
    // TODO Auto-generated method stub
    super.test();
  }
}

It would be very useful if this worked in PDT, too, for instance:

<?php
class A {
  public function test(){
  }
}

class B extends A {
  | <= invoke code assist here
}
Comment 1 Dawid Pakula CLA 2016-05-18 09:15:13 EDT
*** Bug 493620 has been marked as a duplicate of this bug. ***
Comment 2 Dawid Pakula CLA 2019-11-02 16:05:52 EDT
I'm taking care of this. I will have to rebuild PHPCompletionProposalCollector ;)
Comment 3 Eclipse Genie CLA 2019-12-29 13:14:34 EST
New Gerrit change created: https://git.eclipse.org/r/155097