Increase productivity in programming


                                                    IntelliJ IDEA - Wikipedia        File:Windows logo – 2012 (dark blue).svg - Wikimedia Commons

(A)Short Cuts

1.windows Shortcutes
Ctrl+tab>navigate across tabs

2.Short cuts in InteliJ

Ctrl+Alt+Shift+l>Auto indentation & organize code

Alt+Insert>automatically generate methods. Eg:-Setters,getters,Overrides.

Ctrl+Q>quick documentation in the java editor

Ctrl+Alt+Shift+T>Encapsulate fields & refactor

Alt+Enter(on the SQL query)>can Inject the SQL statement 


(B)Tips

1.Tips in InteliJ
Copy module
Go to show in Explorer by right clicking  any module in  your project
Copy & paste any where  inside your project or outside.
Delete IML File (.iml) inside the module.

Change variable name as bulk
Right click the variable or Refactor(Ctrl+F6)->change.

Change data type as bulk
Right click variable name ->Type Migration(Ctrl+Shift+F6)->change.

Ignore an error for testing purposes 
Run->Edit Configuration
Remove Build(Select & "-" Symbol) in Before lunch:Build,Active tool windows 
add(+) Build no error check->Ok

File->Project Structure->Libraries->click the +(Symbol on the window) then Select option java||Mevan||Kotlin then add thee library on your disk(copy libraries to your project file is good practice)

(C)Tools

1.Programming
1.a)PROJECT LOMBOK

Adding lombok to inteliJ
Download lombok Jar:https://projectlombok.org/downloads/lombok.jar(Add that to the library folder & add library to project,using Project structure.)

File->Setting->Plugin->Market Place
Serach lombock & install then restart the inteliJ



Using lombok Annotation we can reduce the boiler plate code
Eg:-
package entity;

import lombok.*;

@ToString// to String method
@AllArgsConstructor//Full arg constructor
@Getter//all getters
@Setter//all setters
@NoArgsConstructor//no arg constructor

public class Student {
   private int id;
    private String name;
    private String address;
}
-------------------------------------------
package entity;

import lombok.*;
@Data//to string method,no arg,setters,getters
@AllArgsConstructor//Full arg constructor
public class Student {
   private int id;
    private String name;
    private String address;
}

1.b)Java Visualizer plugin & CS 61B plugin

1.c)javap
Eg :-
Go to out/production/projectA/entity,I have Student.class file which compile previously.
open Terminal & type javap Student.class ,we can get the class structure of that file.
Output:-
Compiled from "Student.java"
public class entity.Student {
  public java.lang.String toString();
  public entity.Student(int, java.lang.String, java.lang.String);
  public int getId();
  public java.lang.String getName();
  public java.lang.String getAddress();
  public void setId(int);
  public void setName(java.lang.String);
  public void setAddress(java.lang.String);
  public entity.Student();
}

2.Design
Just color picker:-Free portable offline colour picker and colour editor for web designers and digital artists

                                                                                                                                  





Comments

Popular posts from this blog

Hibernate-1

Map Interface using Java

GIT & Version Controlling