From 2009 Java development, using a lot of development tools from MyEclipse, Eclipse, NetBeans each development tools have their own characteristics, NetBeans do GUI is very convenient, MyEclipse plug-ins than Eclipse at the beginning of the rich. Eclipse is much lighter. Since 17 years ago, I have been familiar with idea, a tool developed in a small country like Czech. IntelliJ is recognized as one of the best Java development tools in the industry, especially in intelligent code assistant, code automatic prompts, reconstruction, J2EE support, all kinds of version tools (git, SVN, etc.), JUnit, CVS integration, code analysis, innovative GUI design and other aspects of the function can be said to be extraordinary, thanks to gome, Commander Liu, thank gome elder brother, Commander Liu let me hit the road idea, too late to shake hands, already goodbye. Used a software for many years, change a new tool there is always adaptation period, about 2-3 weeks familiar with the elated. Source: github.com/limingios/n…

IDEA

  • history

IntelliJ IDEA 1.0 was released in January 2001, followed by 2.0 in July of that year, followed by almost one release per year (except 2003), with some updates for each release. Since version 3.0, IDEA has won several awards, including the Jolt Productivity Award and JavaWorld Editors’ Choice Award in 2003, which have established IDEA as an IDE.

  • evaluation

Although the industry considered the best Java development tools, but how the most, also need to experience. Support multiple languages, database and other operations, code index search, git plug-in is stronger than the Eclipse Git plug-in. Although IDEA still has some shortcomings at present, it is not easy for it to get such a good reputation as an IDEA with such strong vitality after more than 10 years.

Why use it

Quick search, analysis, positioning, and efficient reconstruction.

  • advantages
  1. Intelligent selection

Choosing a piece of code is a matter of moments.

  1. Navigation mode

Many of the ideas fit well with the programmer’s ideas. Maven plugins are easy to use.

  1. The historical record

Git and SVN have history tools, but IDEA has its own history tools. History changes with some tools.

  1. refactoring

Normal software development, iterative development, code change history, code is always moving forward, refactoring is a required course for programmers.

  1. Code auxiliary

Get Set toString Generated instantly.

  1. Intelligent layout, control

Import and export, intelligent control formatting. Very convenient.

  1. To find the
  • disadvantages

charge

How to use

  • Install the article

All the way next

Presentation skills

Configuration coding problem

Displays toolbars and toolbutton bars

Configure the associated workspace

Focus on understanding the project class file generation (run packaged build file storage path) configuration

The default imL file generated during IDEA construction is a. Classpath file

Sets the Settings associated with the project in the workspace

Set the font size, font type, code line spacing distance, etc

Tool buttons push the device in the area scope

The DEDUG mode debugs the configuration

Configure the generation templates for various files

Here I’m going to configure a class file as a template

Shortcut Settings

Console prints logs with various levels of color configuration

Space and TAB indent Settings

Common Shortcut keys

To tell you the truth I do not want to say, I suggest or to see their own, because what, different routines (Eclipse, IDEA) show the name of the shortcut key. Just tell me how to look

DEA export JAR source code

If it is a Maven project, the source package is automatically downloaded by default. If it is a Java Web or simple Java project, the custom jar is not source code, this time to manually add the source package.

The web project tomcat

Normal development of a routine, project import or create, configure the server, add projects.

Creating a Maven project

After configuring Tomcat, as with the war project above, note that Maven needs to be exploded when you select it

Clean, intall, and in the directory target will generate a war package

Start tomcat

Tomcat remote Debugging

First, ensure that the war package is consistent with the current project. Run the MVN package command to type the WAR package into the Tomcat webapps directory

In the bin directory of tomcat:

catalina.bat jpda start
Copy the code

Debug Modifies parameter values in the debug mode

Debug already has a parameter and can assign a value to the variable using new Watch

When you do one step, it automatically changes to the new value you just assigned to message

Delete the new Watch and re-enter with the original value

If too many breakpoints can be handled here

The breakpoint is introduced

Plug-in installation

Example: Checkstyle strongly recommends this plugin.

Software refactoring

  • Unified Name Change

After modification, all changes occur

  • Method change parameter

Select a method to complete the parameter change

  • How methods are migrated

Class A A method moves to class B, and class B produces method A

  • Methods To extract up and down floating

You’ll see A scenario in development where, if you’re done with class A and class B, you need to write A common class C that pulls the methods of A and B together and puts them into C. Class A and class B are integrated with C, which is more troublesome if you want to change it manually. The original idea itself has this function

If it’s C and you don’t want it, you can float down to A and B

The idea of the analyzer

How to check code to see duplicate blocks, coverage, exception stacks, where data comes from and where it goes.

  • The code checks < the project is too large, do not select the whole project, be careful to roll over >

When too many problems pile up it’s an absolute problem. Have an early warning of possible problems when you take on a new project. It’s easy to look up things you’re not familiar with.

There are suggestions to show which parameters are not used and which are problematic.

  • Repeat block of code < project is too big, do not select the whole project, be careful to roll over >

It’s time to really show the technology, whether it’s moving bricks or building aircraft carriers. It’s a terrible tool to expose through this tool. I really dare not write this tool, for fear of hurting you old iron.

B inherits C, and B has been written again and again, which can be checked out, and what can not be checked out of the old iron.

  • Analysis of the stack

The customer said that there was an error, took out the error content and sent it to me. How should I use the analysis stack? This is also the most awesome point of IDEA.

  • Write a Java class to raise an exception
public class Main {

    public static void  bbb(a){

        throw new RuntimeException("Deliberately creating an anomaly!");
    }

    public static void main(String[] args)
    {
        bbb();
        System.out.println("Hello World!"); }}Copy the code

Abnormal information is displayed during operation

Click the button to go directly to the specified exception class, slowly analyze the code, a way to check the problem, very convenient.

Where do data trends come from and where do they go

Most of the time, if you want to analyze the direction of a variable, you need to remember the name of the variable and then step by step, CTRL +F, from class to class, with this tool everything is not a problem. This tool tracks variables.

PS: To do a good job, you must sharpen your tools. Of course, no matter how to praise it, it is just someone else’s experience, if you really want to understand it, the only way is to experience it yourself. There is no most popular frame, only the most popular HelloWord. The best is not the most suitable. The most suitable is the best. Simple things will feel very simple to people who have used them, in fact, feel very difficult to have not used them. In the use of IDEA development, often is to write this run this, small steps fast thinking, as far as possible to make the code stable.