Matching Other Words in a File


If you are typing a word that appears elsewhere in your file, you can use a keyboard shortcut to complete that word according to the first word found in the Source Editor that matches the characters you have typed. This word-match feature works for any text in the file. It also searches through files that you have been recently working in (in the order that you have last accessed the files).

To search backward from the cursor for a match, press Ctrl-K.

To search forward from the cursor for a match, press Ctrl-L.

For example, if you have defined the method refreshCustomerInfo on line 100 and now want to call that method from line 50, you can type ref and then press Ctrl-L. If there are no other words that start with ref between lines 50 and 100, the rest of the word refreshCustomerInfo will be filled in. If a different match is found, keep pressing Ctrl-L until the match that you want is filled in.

For typing variable names, you might find that the word match feature is preferable to code completion, since the IDE only has to search a few files for a text string (as opposed to code completion feature, where the IDE searches the whole classpath).




NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 279

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net