Bug 327988 - Provide "Override method" in the default proposals of a class body
Summary: Provide "Override method" in the default proposals of a class body
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Dawid Pakula CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 493620 (view as bug list)
Depends on: 480589
Blocks: 149814
  Show dependency tree
 
Reported: 2010-10-17 05:29 EDT by Mauro Molinari CLA
Modified: 2020-05-14 10:17 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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