Go to Eclipse Development tools (vii)

Source: Internet
Author: User

14 compilers (1) compiler-related settings

Compile level

class file generation


(2) when building

General

Build a path problem

Output folder


(3) settings for errors and warnings

Code style

Potential program Issues

Naming shadowing and conflicts

Outdated and restricted APIs

Unnecessary code

Generic type

Annotations

NULL analysis


15 Commissioning (1) The concept of program debugging

What is program debugging (debug), when something goes wrong in the program, we want this:


When the program executes Glitter run the end, how to let the program run step-by-step?

(2) program debugging

1) Set breakpoints

Breakpoint: The line of code that the program paused to execute

2) Single Step operation

3) Observation variables


(3) Basic steps for using the Eclipse debugger

How to debug a program

Step 1: Parse the error and set the breakpoint

Step 2: Start debugging

Step 3: Single Step operation

after debugging starts, the code line that runs to the set: Breakpoint stops

Click the F6 button to run the program, observe the program running process

Step 4: Observing variables

You can see the current value of a variable in the virables of a single-step run with a mouse hover or early debug view

Step 5: Discover the problem

Step 6: Fix the code and rerun

Step 7: Resolve the issue
(4) debugging operations in Eclipse

1) Control execution

Debugging using the F5 entry method, Step into

Use F7 to jump directly out of the current method, Step Return

Use F8 to jump to the next breakpoint, Resume

Terminating jvm,terminate with Ctrl+f2

2) expressions and display view

You can use expressions or statements to observe the results of an operation


3) Logical Structure of the collection

The logical structure is used to display the value of a map or other collection class storage. It shows the logical part directly, without having to show the other internal changes in detail

Amount

4) Single Step filter

You can skip part of the code and jump directly to the code we need to debug.

5) Conditional Breakpoint

Sets the condition on which the breakpoint hangs, and the breakpoint is suspended only if the condition is met, otherwise, the breakpoint is skipped directly.

6) Exception Breakpoint

Sets an exception that the breakpoint will hang when the program throws the exception.


16 generating Javadoc (1) What is Javadoc

extract classes, methods, members, and other annotations from the program source code to form an API help document that is compatible with the source code, as long as the program is written in a set of special

after the program has been written, the Javadoc can be to form the development documentation for the program at the same time.

(2) View Javadoc

Use the Javadoc view to view Javadoc directly in Eclipse. On the menu bar, locate window, and in the drop-down list, locate the show view

option, and then find the Javadoc option, we place the cursor in a document comment, and the Javadoc window below will form a Javadoc document.



(3) generation of Javadoc

1) Mode 1: Use File->export

Select the demo project, right-click to select Export, the dialog box appears, and then the Javadoc document will be generated.


The exported Javadoc document.


View the generated Javadoc document in the browser.


2) Mode 2: Use Project->generate Javadoc

Find the Project option on the menu bar, find the Generate Javadoc option in the drop-down list, and laterstep above. 18 Import and export (1) Import and export concept

Import: Import an external resource into an existing project or create a new project.

Export: Export the project file file from eclipse to an external file.

(2) Import and export operations 1) file->import for import

On the menu bar, locate the import option under File, select the type of file you are importing, select the location of the import file, and under which item to add, choose

After you choose, click Finish.




2) file->export for export

Export preference files and export jar files

On the menu bar, find the export option under File, select the exported file type, select the location of the exported file, and then click Finish

Can.



19 Plug-in installation (1) Plug -in concept

Plugin: can be used to enhance the functionality of Eclipse.

(2) How to install the plugin 1) Online installation

by URL

On the menu bar, locate the Install NEW software option under Help, open the Install dialog box, can be installed online.


Through Eclipse Marketplace

On the menu bar, find the Eclipse Marketplace option under Help, and open the Eclipse Marketplace dialog box, which can be installed online, depending on the action.


2) offline installation

1 Local Files

On the menu bar, locate the Install NEW software option under Help, and open the Install dialog box, which can be installed according to the local file.

2 Copy installation

Locate the Dropins folder under the files for the Eclipse installation, set up a folder based on the installation plugin, and then unzip the plugin files that are downloaded to the local

Copy all of the files to the folder you created.


3 Link Files

Locate the Dropins folder under the files installed by Eclipse and set up a text file based on the installed plugin to unzip the plugin file downloaded to the local

After all the files are copied to a new folder below.


20 Performance improvements several tips for improving eclipse performance
1) Adjust the amount of memory used by Eclipse

Locate the Eclipse.ini configuration file under the files installed by eclipse


2) Disable unused plugins


3) Disable unused items


4) Turn off validation


5) Disable spell checking


21 Supplements 1) code shrinkage


2) Associated file types


3) copy fully qualified name



4) Automatic Update


Go to Eclipse Development tools (vii)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.