For the original official documents, see: Q: What happened in my workfspace? Where are my projects? A: Don't worry, but the method is slightly different. Intellij idea creates a project as the code base for all your work and creates a module for each component. Therefore, the module of intellij idea is like an eclipse project, while the project is similar to the eclipse workspace. Although not all of your work is included in eclipse's workspace, you can open multiple projects of multiple intellij idea at the same time. This table helps you understand how eclipse and intellij idea correspond to each other. Q: How can I open my Eclipse project? A: It's easy. You have an import option, or direct link to them. Intellij idea supports eclipse classpath module dependencies, so you can directly link your Eclipse project to intellij idea and make it work, even in teams that use hybrid IDE. Alternatively, you can import an Eclipse project in the native format of intellij idea, if you do not need any backward compatibility. If you use Maven, you can directly open the Pom. xml file. intellij idea will import all dependencies, download the required libraries, and complete all settings. Q: facets-what are they? A: to simplify the project configuration. Facets (dimensions and aspects) support various frameworks, technologies, and languages. For example, if you want to use spring in your project, you only need to add a corresponding facet (aspect ). All libraries will be downloaded and configured, and you will be supported by the full series of code, refactoring, and so on. In addition, the Code model is also confirmed, so you do not need to worry about any configuration issues. In most cases, you can add multiple facet of the same type to your project. For example, you can have multiple web applications to be deployed on different servers, or multiple EJB applications of different versions. (For more information, see project configuration .) Q: Where can I configure the JDK? A: In the Project Settings dialog box. To add a JDK to the project, press CTRL + ALT + Shift + S for JDK, click jdks under the platform settings option, and specify the JDK path. After that, you can click the project and specify the JDK configuration you want to use in the current project. Note that JDK configuration is ide-level, so when you create another project, you do not have to add the same JDK. Q: How do I add files to my projects? A: Just copy them to the project folder. Intellij idea tracks all changes to the project file and automatically takes appropriate actions. Q: How do I share my favorite configurations? A: Use the project-level settings. In intellij idea, you have some options to share code style settings, run configurations, and check configuration files at the project level, so they are saved in the project description file and visible to all team members. You can also set Synchronization Through the intellij idea server to synchronize your preference settings to any computer running intellij idea. (See setting synchronization in IDE .) Q: How do I configure a code template? A: In the Settings dialog box. There is a dynamic template in intellij idea-call predefined code snippets by entering the abbreviations. They may include context parameters for automatic adjustment when they are inserted. Click here to view more information about how to use the template in the code. To manage a dynamic template, press CTRL + ALT + S to open the Setting dialog box, and then click Live Templates. (See code generation .) Q: How can I ensure that all my files are saved? A: You don't have to worry. They are all automatically saved. When you switch to another application, compile or run your code, execute VCs operations, and so on, you never have to worry about saving files in intellij idea. For additional security, you can enable automatic save within the specified time. If you need to roll back any unnecessary changes, you can use the built-in VCs in local history (Local History)-intellij idea. Q: What does incremental compilation do? How can I compile my project? A: Yes, but the work style is slightly different. By default, intellij idea compiles files only when needed (when you run your application or explicitly use build actions ), therefore, you can save system resources for other important tasks at the same time. This compilation is incremental: intellij idea keeps track of dependencies between source files and only compiles the changed files. Files with incorrect compilation will be highlighted, including folders containing them-so you can easily find them through project view. View a list of all files with compilation errors. You can select scope | problems from the combo box in the project view. After each compilation, intellij idea constantly analyzes the code of the error file in the background. If you have fixed the error, the red highlighted mark is automatically removed. You can use the eclipsemode plug-in to trigger compilation for each save: (a third-party developed, non-bundled plug-in ). To run code in the error era, you can select the eclipse compiler in the Settings dialog box, compiler, Java compiler, and add the-proceedonerror extension command line parameter to the compiler. Q: Which options can be used to configure code check? A: IDE and project-level configuration files and check settings for each file. In intellij idea, you can define a collection of active code checks-A Profile (general and summary ). The IDE-level configuration file is valid for all projects on the current machine. The project-level configuration file can be used by all team members. Here you can find some source code check information. To configure the check configuration file, open the Settings dialog box or click the Hector icon on the toolbar. You can also configure the check separately-each ball pops up to tell you a problem. press Alt + enter and click the right arrow to display the menu, you can configure or disable this check for the current file or even the entire project. Q: Where are the keyboard shortcuts I used to use? A: They are still there. Intellij idea includes eclipse keyboard ing. If you like to use the shortcut keys you are used to, you can select them in the Settings dialog box and keymap. If you want to learn how to use intellij idea shortcuts, you can read or print the default keyboard ing reference from the Help menu. Q: I think the editor works differently. Am I right? A: Yes, you are right. In eclipse, virtual space (the possibility of inserting symbols at the end of a line) is disabled by default, which is the opposite of the default setting of intellij idea. To change it, go to the Settings dialog box, editor, and clear the option (allow placement of caret after end of line) that allows the line to be inserted after the end ). By default, eclipse highlights the usage when inserting symbols. To enable this behavior of intellij idea, choose highlight usages of element at caret in the same menu above ). Note that there is a maximum number of editor labels that can be opened (adjusted through the Settings dialog box), so if you want to open a new file, when the number of tags in the editor reaches the maximum, the earliest tags are automatically disabled. Q: Why are there three methods to call the code? A: There are different things to accomplish. In intellij idea, three types of code are automatically completed. These different methods allow you to select the best code at any time during your work. For example, you can press Ctrl + space to complete an obvious declaration quickly. This is the so-called basic completion. It also provides a complete list or keywords that can be selected in the current context. If you need higher precision and do not want to choose to scroll up or down the list without stopping, use Ctrl + Shift + space to narrow down the select drop-down expression type. Smart completion provides the filtered list in this way, allowing you to get what you need more quickly. In addition, if you press it again, it will even tell you the symbolic identifier that will be reached through a series of method calls. Finally, the class name is automatically completed (Press CTRL + ALT + space) so that you can quickly complete the name of a class and insert an import statement automatically, if it has not been referenced before. (See Intelligent Code assistance .) Q: How to configure VCs integration? How can I add my project to VCs? A: In the Settings dialog box, use version control ). In intellij idea, first configure VCs by selecting the type, specifying the server name and access creden。, and then map your project folder to the configured VCs. To add a project to VCs, you only need to map its root folder to VCs. Q: How do I use VCs? Where can I check for changes? A: In a dedicated change view. In eclipse, you have a synchronization perspective that shows the differences between your local version code and the VCs server. In intellij idea, this function is a view changes, where you have a local label to display your local changes, the incoming tab displays the changes that have been detected by other team members who have submitted to the VCs server that have not been synchronized, and so on. To enable tracking for incoming changes, go to the changes view, open the incoming tab, click the refresh button, and specify the cache settings. Q: How can I check out a project in VCs? A: On the welcome screen. This is the easiest way to create a project from the source code, if you check the source code from VCs. Click the check out button in version control. |