0

Is there any way to remove the generic code completion hinting from the object attributes list in netbeans (in PHP)? For any variable, in addition to whatever methods/properties are available for a given object variable, Netbeans includes something like 35 generic hints. They are basic design patterns like for and if blocks. These are things that someone might use, but I never do. They clutter up the property list, and make it take longer to browse through the available methods and properties of an object. Is there any way to get rid of them?

In the picture below, I have a dummy class called SomeClass with a function called "method," and that is the only thing I would like to see in the hint box:

enter image description here

chiliNUT
  • 18,989
  • 14
  • 66
  • 106

1 Answers1

0

EDIT

This is probably a more correct way of doing this:

To view the code templates that are defined in NetBeans, open Tools > Options (NetBeans > Preferences on Mac), select the Editor features, and select the Code Templates tab. To see the PHP code templates, select PHP in the Languages drop-down list. A table appears of code template abbreviations and expanded texts. If you select a code template in the table, its expanded text appears in the Expanded Text tab.

https://netbeans.org/kb/docs/php/code-templates.html

They can also be removed from here.

DIRTY WAY

I did this by deleting the XML file that contains these. They are called "code templates". The file is located in a jar file. On Windows, the jar file is located at

C:\Program Files\NetBeans 8.0\php\modules\org-netbeans-modules-php-editor.jar.

Extract the jar file with your favorite zip program.

Extract the jar file, and the xml file is located at

<extracted folder>\org\netbeans\modules\php\editor\resources\code-templates.xml

Delete the file from the jar file.

Re-zip the file back into a jar and replace the file. I chose "store" compression, as the original jar did not have compression. Now my class attribute menu is much cleaner.

chiliNUT
  • 18,989
  • 14
  • 66
  • 106