Use Java development tools IntelliJ IDEA local history

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

Change the IntelliJ IDEA local history can help the user to record and track the project, to prevent project accidental loss or from outside the IDE project change. This tutorial will show you how to use the local history view and restore some program changes.

1 ,Start by creating a new project from scratch

Start to create a program called Java HistoryApp ab initio. We will take this project as an example to show how to use the Local History local history.

Java开发工具IntelliJ IDEA使用教程: 本地历史记录

2 ,Create a HelloWorldApp class

Create a Java class HelloWorldApp. We will change this kind of how to demonstrate local history record just changes.

Java开发工具IntelliJ IDEA使用教程: 本地历史记录

3 ,The main method of definition

Define the output “ Hello world! ” public static main method.

Java开发工具IntelliJ IDEA使用教程: 本地历史记录

4 ,Display history file

Now the project has changed, we can examine the. Use the Local History &rarr showed local history; history from the editor, right-click menu, display the current document revision history.

Java开发工具IntelliJ IDEA使用教程: 本地历史记录

After a window will appear in the window, all changes are in accordance with the time the packet. The user can select any change, and see the difference. The user can also freely here before resuming operations.

Java开发工具IntelliJ IDEA使用教程: 本地历史记录

5 ,Add the document

To add a document for this class

Java开发工具IntelliJ IDEA使用教程: 本地历史记录

6 ,Place the labels

Because this time we have a final version of the class, so we can place a label. Tags help find the specific version of the historical changes in user.

Place the labels from the right click menu editor.

Java开发工具IntelliJ IDEA使用教程: 本地历史记录

To label any name, we will be in the local history to find the tag.

Java开发工具IntelliJ IDEA使用教程: 本地历史记录

7 ,Add comments

Add in for some changes after recovery, add some comments to the output.

Java开发工具IntelliJ IDEA使用教程: 本地历史记录

8 ,Display alternative history

Now let us have a look all changes the selected code happen. Select the output statements, and the use of local history → display alternative history.

Java开发工具IntelliJ IDEA使用教程: 本地历史记录

Now we can see the change the selected code. The user can easily find the name “ Initial version” label.

Java开发工具IntelliJ IDEA使用教程: 本地历史记录

9 ,Restore the changes

Assume for the moment that we no longer need some change, and want to restore our previous version of the code. Can be re used from the right click menu, so as to restore to the appropriate version.

Java开发工具IntelliJ IDEA使用教程: 本地历史记录

Inteliij the latest version download address

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Barret at November 15, 2013 - 2:58 AM