Author |
Topic |
|
Cezariusz
Tomato Guru
Poland
244 Posts |
Posted - Jun 24 2004 : 09:30:38 AM
|
I've just started to work with NetBeans IDE for java and I've found some interesting features, some of them were already suggested for VA X. I'd recommend WT team to download this free IDE and test how it works. In following post I'll try to focus on most interesting features. |
Cezariusz Marek https://midicat.net/ |
|
Cezariusz
Tomato Guru
Poland
244 Posts |
Posted - Jun 24 2004 : 09:37:55 AM
|
Remeber suggestion to include headers topic? Here's how they have solved it in NetBeans:
The Fast Import feature enables you to quickly add import statements for Java classes in your file. To add an import statement:- Move the insertion point to the name of a class in your Java source file.
- Press Alt-Shift-I.
If the class is found in the code completion database, the Import Class dialog box is displayed. This contains a list of classes that match the class at the insertion point. For example, if the class name is List, the dialog box displays java.awt.List, java.util.List, and any other class that you have defined with the name List.
- Select the class that you want to import.
- Select the radio button that corresponds to the way that you want the class to be imported. You can choose between importing the class, importing the package, or having the fully qualified name generated in the code.
- Click Import. The IDE generates the import statement in your Java source file.
Easy, is't it?
|
Cezariusz Marek https://midicat.net/ |
|
|
Cezariusz
Tomato Guru
Poland
244 Posts |
Posted - Jun 24 2004 : 10:14:06 AM
|
Here's how code completion works:- In the Java Editor, type the first few characters of the expression, such as import javax.
- Press Ctrl-spacebar or Ctrl-\\, or pause after typing a period, comma, or the keywords new or import (followed by a space).
The code completion box is displayed, providing a scrolling list of possible classes, methods, variables, and so on that can complete your expression. For methods and fields, the code completion box displays only static or nonstatic options as appropriate, depending on the context of your code. Local variables are displayed in bold. The names of deprecated classes and class members are struck through. If the code completion database contains only one possible completion for the expression, the expression is completed automatically.
- Use the most convenient combination of the following options to select an item from the code completion box:
- Continue typing to narrow down the selection of items in the list.
- Use the mouse or navigation keys (up and down arrows, Page Up, Page Down, Home, and End) to scroll through the list and select an expression.
- Press Enter to enter the selection in the completion box into your file and close the code completion box. Alternatively, you can double-click an entry in the code completion box.
- Press Shift-Enter to enter the selection in the completion box into your file and keep the code completion box open.
- Press Tab to enter the common letters of all items in the completion box and keep the completion box open. This option works only when all items in the completion box start with a common set of letters that has not yet been completely typed in the Source Editor.
- Press Escape to close the code completion box without entering the selection.
If you press Enter for a method with parameters, replaceable text is given for the first parameter, which you can then fill in. If the method takes multiple parameters, you can reopen the list by typing a comma after you fill in each parameter. If the IDE recognizes the type of parameter required, its type is shown in the header of the code completion box. If not, a question mark (?) is displayed. If you enter a parameter that does not match any of the recognized parameter combinations for the method name, all the recognized methods and their parameter lists are displayed and an asterisk (*) appears in the header of the code completion box. Note that typing a comma in a parameter list not only shows overloads with enough parameter count, but it also checks their type and chooses the best matching overloads. |
Cezariusz Marek https://midicat.net/ |
|
|
Cezariusz
Tomato Guru
Poland
244 Posts |
Posted - Jun 24 2004 : 10:21:23 AM
|
That one is also interesting:
The word match feature enables you to type the beginning characters of a word used elsewhere in your code and then have the Source Editor generate the rest of the word. You can also use word match to generate the previous or next words in your file.
To use the word match feature: |
Cezariusz Marek https://midicat.net/ |
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - Jun 24 2004 : 11:10:25 AM
|
Emacs does the word match thing. I tried it out for a while, but I always found it quicker to type the word than to check emacs's guesses and possibly ask for another guess.
I've only used it in text, not code, but as VAX already restricts to the symbols which are valid in the current context, I doubt there's much advantage. |
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
feline
Whole Tomato Software
United Kingdom
19015 Posts |
Posted - Jun 24 2004 : 12:38:47 PM
|
VIM also does word matching, and i found it very useful for fairly unique words. it took some getting used to, and it was only worth going through the list of possible matches when the word is fairly long. still, it does save me a lot of typing under UNIX
when typing in code VAX tends to be better since i don't have to stop and think "is this a good candidate for word completion" as i am typing. if you use a common set of letters and then word complete then it could take quite a few guesses to get to the one I wanted. also, seeking in the wrong direction was always irritating since it could produce rather unexpected results.
i did find it useful when typing long variable names into comments, which i still miss in VS. the key here was i triggered suggestions manually...
*wonders*
ctrl_space works on comments in VS i wish i had thought of that sooner |
zen is the art of being at one with the two'ness |
Edited by - feline on Jun 24 2004 12:46:21 PM |
|
|
|
Topic |
|
|
|