pdt-eg / p2-mirror-dev

PDT Extension Group / Development p2 repository
8 stars 1 forks source link

Getter/Setter generation : Choose method name formatting (camelcase or underscores) #19

Closed lpotherat closed 7 years ago

lpotherat commented 7 years ago

Before the last update, i was able to choose the method name formatting, in my case I have this :

class A {
  private $my_first_member;
  private $my_second_member;
}

Before the update, I could generate getters and setters like this :

class A {
  private $my_first_member;
  private $my_second_member;
  public function getMyFirstMember(){
    return $this->my_first_member;
  }
  public function setMyFirstMember($myFirstMember){
    $this->my_first_member = $myFirstMember;
  }
  public function getMySecondMember(){
    return $this->my_second_member;
  }
  public function setMySecondMember($mySecondMember){
    $this->my_second_member = $mySecondMember;
  }
}

That was great, because I could continue mapping my members into database fields automatically, and respect the public members naming convention.

Know it generates method names like this : getMy_first_member().

Can we have a feature to choose the naming convention ?

Thanks in advance

zulus commented 7 years ago

getter/setter generator is no longer part of PDT-EG. It's part of PDT, so correct place for such bugs is PDT bugzilla: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=PDT

lpotherat commented 7 years ago

Thank, i didn't notice that ;) I'll transfert the request. => is it the same for the class wizard ?

zulus commented 7 years ago

Yes, see readme here: https://github.com/pdt-eg/Core-Plugin

lpotherat commented 7 years ago

Thanks, i'll send a bug to PDT for this too !