Eclipse Work FAQs Summary

Source: Internet
Author: User
Tags delete key checkstyle

First, the Eclipse common shortcut keys use

AutoComplete Word: alt+/

Rename: Shift+alt+r (Uniform change field or method name)

Generate Getter/setter Method: Shift+alt+s, then R

Delete Current line: Ctrl+d

Position to previous (last) edit point: Alt + Left (right) arrow,

Modify the method to:

Windows->preference->keys, View tab, find

Navigate:backward (forward) history.

Note To remove a key combination, use the right-click menu instead of the DELETE key

Switch between multiple files that are currently being edited: Standard CTRL (+shift) +F6

Opens a Java class file: Ctrl+shift+t. (very useful because you usually remember the class name, but don't remember its package)

Open any file (larger than Open class lookup): Ctrl+shift+r

View the outline:ctrl+o of the current Java class file

Navigate to the definition of the current object or open the Java file for the current class: F3 or press the CTRL key on the current word and click the word when the word appears underlined

Comment or uncomment the currently selected piece of code: CTRL+SHIFT+C, or ctrl+/

Find/Replace in current document: Ctrl+f

Find the next place in the current document: Ctrl+k

Find the previous location in the current document: Ctrl+shift+k

Find the next place in the current document increment: Ctrl+j

In the current document increment find previous: ctrl+shift+j

What is incremental lookup?

"Incremental find" is a way to find the content that can be entered dynamically, in the following ways:

1. Start Incremental Lookup: Press CTRL+J, then the "Increment find" bar appears in the middle of the status bar

2. Build a letter, such as "a", the document "A" is immediately highlighted

3. If you press Ctrl+j again at this point, find the next "a", if you press CTRL+SHIFT+J, then find the previous "a"

4. If you type the letter "B" at this time, the "AB" in the document highlights

Search throughout the project: Ctrl+h General use of the "File Search" tab

Find a reference to a class (or function) (that is, which files are used in this class): Ctrl+shift+g, I changed to alt+3.

Back to just Perspective:ctrl (+shift) +f8, I changed to Alt+1 and alt+2

Close Current file: Ctrl+w

Close all files that are currently open: ctrl+shift+w

To keep the code in the correct indent: ctrl+i

F5: Single-step jumping in

F6: one-step skip

F7: Step Outside

F8: Continue, if there are no breakpoints behind, the program will run out

Run to the line where the current cursor is located: Ctrl + R

Save All: Ctrl+shift+s

Full screen (Restore) Current editor: Ctrl+m

Reorganize the import statement and delete unnecessary or imported packages: Ctrl+shift+o (very useful)

Current word capitalization: ctrl+shift+x

Current Word lowercase: ctrl+shift+y

Copy Current line: default is Ctrl+alt+down

Formatting the current file: ctrl+shift+f, notice what format is modifiable

How do I change the format of ctrl+shift+f?

Preference->java->codestyle->formatter [Edit]

Add shortcut keys for menu items without shortcut keys: Use Preference->general->keys's Modify tab, find menu item in category, find the menu item in name, and click

Copy fully qualified name: Select a class name, then edit-and copy qualified name. This command is useful when writing XML code because it is often necessary to write a fully qualified name string for the class.

What is the fully qualified name:

The fully qualified name, full qualified name, refers to a class name that contains the full package name.

Skip to File header: Ctrl+home

Skip to end of file: Ctrl+end

Refresh: Select the package you want to refresh, F5

Generates a comment for the current element that can be used as a Javadoc: shift+alt+j

Open type hierarchy: F4

......

What is smart insert mode?

Smart insert mode, which is inserted into the left parenthesis, automatically inserts a closing parenthesis, a closing quotation mark automatically appears, a newline is automatically indented, and so on; it is useful and should be enabled at all times.

How do I customize the code template?

Preference->java->editor->templates page Add, or source->surround with->configure templates ...

Double-click the opening parenthesis (parentheses, brackets, curly braces) to select everything in parentheses.

Shift+↑: Select an area up

Shift+↓: Select an area down

Alt+↑: Moves the current row up

Alt+↓: Moves the current line down

Ctrl+↑: Equivalent to dragging the scroll bar upward

Ctrl+↓: The equivalent of dragging the scrollbar downward, as in the current Chinese input state, displays the history of the input text two, the project's properties in Eclipse Deployment Assembly (deployment assembly) disappears.

There are probably 2 main reasons for this:

1. The project is not a Web project, so there is no deployment Assembly property. In eclipse, how do you turn a non-Web project into a Web project? 1) Right-click the project, select Project Facets, tap Convert to faceted from

2) Configure Project Facets

Change the version of the dynamic Web module to 2.5. (3.0 for Java7).

If you are prompted with an error, you may need to set compiler compliance level to 1.6 in Java compiler. Or you need to change the version of Java in this window to 1.6.

3) Configure Modify faceted Project

Click further configuration available ..., pop-up modify faceted Project window

Here is the path to set the Web. xml file, we enter Src/main/webapp.

Generate Web. XML Deployment descriptor automatically generates the Web. xml file, optional.

2. After 1 of project conversion, you should be able to see deployment assembly appear, but if it still appears, it is likely in Eclipse deployment assembly was disable, So what we need to do is to enable the Deployment assembly option.

In the workspace where the project is located, there is a. project file that opens the file to add the following line for the Enable Deployment Assembly property.

<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>

As in the following. project file.

1 <?XML version= "1.0" encoding= "UTF-8"?>2 <projectdescription>3     <name>Shortbread</name>4     <Comment></Comment>5     <Projects>6     </Projects>7     <Buildspec>8         <Buildcommand>9             <name>Org.eclipse.jdt.core.javabuilder</name>Ten             <arguments> One             </arguments> A         </Buildcommand> -         <Buildcommand> -             <name>Org.eclipse.wst.common.project.facet.core.builder</name> the             <arguments> -             </arguments> -         </Buildcommand> -         <Buildcommand> +             <name>Com.google.gdt.eclipse.core.webAppProjectValidator</name> -             <arguments> +             </arguments> A         </Buildcommand> at         <Buildcommand> -             <name>Com.google.gwt.eclipse.core.gwtProjectValidator</name> -             <arguments> -             </arguments> -         </Buildcommand> -         <Buildcommand> in             <name>Org.eclipse.m2e.core.maven2Builder</name> -             <arguments> to             </arguments> +         </Buildcommand> -     </Buildspec> the     <Natures> *         <Nature>Org.eclipse.jdt.core.javanature</Nature> $         <Nature>Org.eclipse.m2e.core.maven2Nature</Nature>Panax Notoginseng         <Nature>Org.eclipse.wst.common.project.facet.core.nature</Nature> -         <Nature>Com.google.gwt.eclipse.core.gwtNature</Nature> the       <Nature>Org.eclipse.wst.common.modulecore.ModuleCoreNature</Nature> +     </Natures> A </projectdescription>

Then restart Eclipse and you'll see the Deployment assembly option in Project's properties.


The list here is the path to the file publication when the project is deployed.

1, we delete the two items of test, because tests are used for testing and do not need to be deployed.

2, set the Maven jar package to be published under Lib.

ADD, Java Build Path Entries-Maven dependencies–> Finish



Third, Eclipse plug-in Checkstyle code specification

Please refer to:Eclipse plugin checkstyle results analysis Iv. Eclipse turns the project into Maven

Right-click Configure, Convert to Maven projects v. How Eclipse Configures resin debug

First look at the startup script,
Set java_home=c:\jdk1.6.0_03
E:\resin-pro-3.2.1\resin.exe-Xdebug-Xmn100M-Xms256M-Xmx512M-conf E:\workspace\kids-sns\resin.xml

To debug in resin, you must first modify the resin configuration file: E:\workspace\kids-sns\resin.xml
Find <jvm-arg>-Xdebug</jvm-arg>
Add in the following:
<jvm-arg>-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005</jvm-arg> 5005 of which is the socket port.

Open the appropriate project for Eclipse and configure Debug configurations.
Add a Remotes Java application

Apply & Debug

Eclipse configuration is complete.
When a corresponding breakpoint is set on the JSP page that is accessed, it enters the debug process of Eclipse.



Content from: cnblogs: Milk, unsweetened

Eclipse Work FAQs Summary

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.