Skip to main content

NetBeans 6.0 - Code Completition


1. Code completion behavior Ctrl+Space lists symbols which are already imported in your source file, plus of course symbols from the java.lang package. Pressing Ctrl+Space again will list all symbols from the project class path whether imported or not. If you want to go to the list of all types immediately you can use the All Symbols Completion, which is invoked by pressing Ctrl+Alt+Space

2. Smart completion - Notice that the standard completion list box is divided into two parts separated by a black line. The first section includes smart completion items. The editor chooses these items based on the current context (i.e. around the current caret position) when completion is invoked. See other bullet points below starting with "smart" for more information and examples of this smart completion feature

3. Completing Keywords You may use code completion for completing keywords: the editor knows which keywords fit into which place in your code.

4. Field/Variable names When you introduce a new field or variable, you often want its name to mimic its type. Code completion now supports this. To prepend a prefix to the guessed name, simply type the prefix and then invoke code completion. This works for method names as well.

CC_VariableNames.png

5. Smart completion examples

a. After new (with generics) This will help especially when you are declaring a field or variable with complicated generics.


CC_SmartNewGenerics.png

In method call parameters Smart completion will offer only those fields, variables, methods which can be passed as an argument to the method

For exceptions In a catch block smart completion will offer only those exceptions which have been thrown in the try block but not yet caught

Parameter guessing Code completion of method calls guesses which variable, field or parameter should be used based on type and similarity of the name

Code completion ending character Notice that you may select the item of choice with different keys. Selecting with Enter you'll get what you expect. Should you select the item with ".", "," or ";" code completion will append the character you typed at the end of the completed word

Creation of elements - Invoking code completion between class members will offer to create a constructor (either a default constructor or one initializing uninitialized fields), override methods or implementation methods

Comments

Popular posts from this blog

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 ...

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...

My algorithmic Trading journey

Like many i used to manually watch and trade stocks, ETFs. Its non-productive and involves our emotions in trading decisions. So I wanted to automate trading. Initially used Trailing Stop and Limit orders. But they can automate only in a prescribed way. I started thinking about a way to trade programatically, where we have more control. My quest pointed to Zipline, a python algorithmic trading library. It support backtesting (testing algorithm with historic data) and most importantly supports live trading In this blog, I will walk you through my algorithmic trading journey. Zipline Installation From  https://www.zipline.io/index.html , I see it only supports python 2.7 or Python 3.5 Since python 2 was sun set on Jan 1 2020, there is no point in trying it. I went ahead with Python 3. For programming, installed latest Ubuntu 19.10 in a virtual machine . Ubuntu 19.10 comes bundled with Python 3.7.5. You can check your python version by typing python3  -V ...