Skip to main content

Netbeans 6.0 Shortcuts / Tips

1. If the code you pasted in is not formatted correctly, press Alt-Shift-F to reformat the entire file

2. Press Ctrl-Space to open the code completion box. A short list of possible ways to complete the word appears

3. Type sout and press Tab. The sout abbreviation expands to System.out.println(""); with the cursor positioned between the quotation marks.

4. Type psfs and press Tab. The psfs abbreviation expands to private static final String.

5. To supply command line arguments to the program Right-click the project node, choose Properties, and select the Run node in the dialog's left pane and then enter the arguments at the arguments dialog box

6. To run the project choose Run à Run Main Project (F6) from the Run menu

7. If you build a project and then later change classes, it is good to remove all build artifacts from your system and create a fresh build of the application. You can do this with the Clean and Build command (Shift-F11)

8. To create JUnit Test cases select the java file in the Project folder and (Ctrl-Shift-U)

9. To run the JUnit Test cases , select the project node in the project folder and Alt-F6

10. press Ctrl-F8 to set a breakpoint

11. To Debug Main Project Ctrl-F5

12. Click Step Into (F7) in the toolbar to step through the program

13. Generally speaking, Code Completion is useful for filling in missing code, such as symbols and keywords, automatically. As of NetBeans IDE 6.0 you can now also use Code Completion to generate whole methods. This is useful if you want, for example, to generate a constructor, override methods, or implement methods.

14. Generating Code Using the Code Generation Dialogs: Alt-Insert. Using it we can generate getters, setters, hastcode() and equal() methods

15. The IDE's Java editor provides several ways to add import statements for one or more classes, each offering you a list of possible classes to import when you click on the light bulb error mark or press the appropriate key combinations. In addition, the Editor also displays error hints that assist you with removing imports that aren't needed in your source.

16. Place the cursor on the line of the class that wasn't imported and press Alt+Enter. Alternately, you can click the warning mark in the Annotation Stripe (along Editor's left edge)

17. The IDE's Java editor also provides several other methods for managing imports, such as pressing Ctrl-Shift-I to import multiple types at once and pressing Alt-Shift-I while the cursor is positioned in a type identifier, which enables you to import that specific type

18. To duplicate/move the current line or multiple selected lines: Position the cursor on the line or selection you want to duplicate/move. Press and hold Ctrl-Shift / Alt-Shift, then press either the Up or Down cursor key to copy and paste the code above or below the original line.

19. To instantly Rename all the occurrence of a field, method, variable etc., place the cursor on the filed and press Ctrl+R and then enter the new name. To exit from it press Enter / Esc

20. To see the javadoc for an element press Ctrl+Shift+Space


Comments

Popular posts from this blog

Netbeans 6.0 - Code generation

The Java editor is capable of generating often used constructs for you automatically. Press Alt+Insert to invoke the code generation menu and pick what you want to generate To add import statements: Use error hints : Click on the error mark with the light bulb or press Alt+Enter . It will offer you a list of possible classes to import. Pick the proper hint and you are done Use the import class dialog : Put the caret into the name of an unimported class and press Alt+Shift+I . A list of possible classes to import will appear. Use the smart fix import : Press Ctrl+Shift+I . You will get a dialog that lists all unresolved identifiers in the source. If there is more than one option for resolving the identifier you may choose using the combo box. Classes shown in gray do not fit for some reason. Method exit points : Putting the caret on the return type of a method definition will highlight all places where the method can exit Exception throwing points : Putting the caret on an...

Artist got automated

Here is my first Tensorflow run to convert images to different styles of famous painters I am using the code that is available at  https://github.com/lengstrom/fast-style-transfer It uses specific versions of below libraries !apt install ffmpeg !pip install tensorflow==0.12.1 !pip install numpy==1.11.2 !pip install scipy==0.18.1 !pip install pillow==3.4.2 I started with latest version and that triggered failure after failure. If you are like me, add below changes to their respective files #This is to make tensorflow behave as if it is in v1 File : evaluate.py and ./src/transform.py import tensorflow.compat.v1 as tf tf.disable_v2_behavior() #Image functions are removed from scipy.misc module. so use imageio instead import imageio scipy.misc.imsave(out_path, img) --> imageio.imwrite(out_path, img) img = scipy.misc.imread(src, mode='RGB') --> img = imageio.imread(src, pilmode='RGB') Refer this post on more details on imageio changes Here is the ...

OnePlus 6T - Android 10 (OOS 10)

Its been more than 3 months since August security patch update. Out of curiosity I checked Oxygen Updater. To my surprise, Oxygen OS v 10 (based on Android 10) is available. Since this is a stable release, i went head and updated it. Its ended up being a buggy release. For those of you, who didnt get update over OTA, its better to wait for OOS 10.1. Here are the list of issue and the workarounds. Issue #1 :  Phone randomly restarts and then goes to boot loop Workaround : when the phone stuck in boot loop (with OnePlus logo animation), Press Power Button and Volume Down button to restart it Issue #2 : Google play wont work Work Around : Booting to recovery and clearing cache is expected to fix this. will update after testing To booting to recovery, Firstly, turn off your phone: press and hold the Power button for a while or press the Power key once and choose ‘power off’. Once the switch off process is completed start pressing and also holding down the Volume Dow...