Generate Constructor,Getters and Setters in NetBeans PHP IDE

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Generate Constructor,Getters and Setters in NetBeans PHP IDE

Post by VladSun »

I've never known it could be done in Netbeans IDE :) (and it was already available in Netbeans 6.5 , 2008 :( )

http://netbeans.dzone.com/news/generate ... -getters-a

I was about to write a plugin for this functionaluity :)

How about submitting here such tips and tricks?

I often use the Code Templates (configured in Tools->Options->Editor/PHP), the fast Rename (cursor positioned on the varibale/function name and Ctrl+R pressed)
There are 10 types of people in this world, those who understand binary and those who don't
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Generate Constructor,Getters and Setters in NetBeans PHP

Post by josh »

Jump to matching bracket
keyboard shortcut = control + [
combine it with shift to select all code between current bracket & matching bracket.

Also highlight a project or path within a project and control f to search.

Also shift + escape hides all the docked panels and maximizes the code. control + 1 shows the projects window, control + 7 to show the navigator window again.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Generate Constructor,Getters and Setters in NetBeans PHP

Post by josh »

Also this is really cool. http://blogs.sun.com/netbeansphp/entry/type_hierarchy Couldn't get it to work though.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Generate Constructor,Getters and Setters in NetBeans PHP

Post by VladSun »

Predefined palettes are also very useful :)
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Generate Constructor,Getters and Setters in NetBeans PHP

Post by Jonah Bron »

Very cool. Does anyone know if someone has made a dark gEdit Oblivion type palette?
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: Generate Constructor,Getters and Setters in NetBeans PHP

Post by greyhoundcode »

I dunno, but on the subject of palettes a minor gripe of mine - unless/hopefully I'm missing something - is that it doesn't seem possible to define your own colours in hex/RGB, instead you have to select from the predefined range of colours.

... Hopefully I am wrong?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Generate Constructor,Getters and Setters in NetBeans PHP

Post by VladSun »

I was talking about Code Palettes - i.e. a predefined set of code snippets to use.
No colors :)
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: Generate Constructor,Getters and Setters in NetBeans PHP

Post by greyhoundcode »

VladSun wrote:I was talking about Code Palettes ... No colors :)
Aaahh... ! Even so, and continuing my slight :offtopic: digression, I do like the darker [syntax highlighting] profiles - although I'm not completely enamoured with the supplied Norway Today theme.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Generate Constructor,Getters and Setters in NetBeans PHP

Post by VladSun »

There are 10 types of people in this world, those who understand binary and those who don't
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Generate Constructor,Getters and Setters in NetBeans PHP

Post by josh »

I think you should extract new methods at that point. If you need to fold code, your methods are too long in my opinion :-) For me code folding is a tool for dealing with "code smells", not a tool for developing.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Generate Constructor,Getters and Setters in NetBeans PHP

Post by VladSun »

Nah, my PHP files are indeed very short. I just can't stand looking at methods like get/setVar :)
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply