New features of Eclipse 3.2 Java development tools

Source: Internet
Author: User
Tags file size file system memory usage apache tomcat java se

Eclipse is a popular integrated development environment (IDE) for Java programming. It can also be used as an environment for writing other languages, such as C + + and Ruby, incorporating frameworks for various kinds of tools, and creating a rich client platform for desktop or server applications. Today, the Eclipse open source community has dozens of projects ranging from business intelligence to social networking. Eclipse is also the name of a non-profit organization that manages these projects. (And, although I'm pretty sure it's not floor wax, there are eclipse cars, football teams and chewing gum.) )

Eclipse version 3.2 is a milestone in the history of Eclipse Callisto release: 10 Eclipse projects were released at the same time on June 30, 2006. This article focuses on the Eclipse IDE, especially its Java development tool (JDT).

JDT composition

JDT's history dates back to about 1996 years with the Visual age for Java (Vaj) written by Smalltalk. In Vaj, everything is compiled as input and fully parsed in memory. The scalability of this design is not very good, it is difficult to expand, the reconstruction of the file also has some difficulties.

The IDE team started developing visual Age Micro Edition (Vame) in 1999. This tool is written entirely in Java and uses the Standard widget Toolbox (SWT) to implement its user interface. At that time, Vame targeted the development and application of embedded space. To do this, it uses the standard Java VM and saves the workspace in the file system. However, file and folder names are some of the UUID that cannot be read.

Vame's incremental compiler is nearly 10 times times faster than the Vaj-supplied compiler. The model is built on state (instead of the current eclipse, Eclipse is based on the source code). Vame has its own repository system rapier and can be extended using Plug-ins.

Vame is not really popular in the community, but it contains a lot of good ideas that developers have been following in the Eclipse project. 2001, Eclipse 1.0 released. It is described as "a generic IDE, not specifically for what." At first, both Eclipse and JDT were built as platforms for use by other development tools. The workspace is saved on disk and is open for other workspaces. Eclipse 1 is a collection of CVS, not a dedicated repository.

There is an important difference between eclipse and its forerunners: it is open source. Its user community is growing at an explosive rate and can be maintained on an independent basis. Most of the new and improved features of Eclipse 3.2 derive from the enhanced requirements that eclipse users have raised. More than 30,000 fixes and enhancements have been resolved since the 3.1 release. Since it will take a long time to get all these requirements over, let's focus on some of these requirements that are particularly important to most Java developers.

Eclipse compiler

One of the more powerful features of JDT is its built-in incremental Java compiler, which is fully compatible with Javac. Although you can let eclipse use Ant and Javac, and even let the problem flag appear in the IDE (this is a new feature in version 3.2), the Eclipse compiler can provide better diagnostics and a faster turnaround period.

The JDT compiler was originally written for Vame and was modified for eclipse. This compiler builds on what developers call "the 3 Big Rules of compilation" (imitating Asimov's 3 Laws of Robotics):

• Correctness: The compiler cannot harm the source program.

• High efficiency: Compilers must be fast unless the speed conflicts with rule 1.

• Friendliness: Compilers must help users correct programming errors as long as such help does not conflict with rule 1 and rule 2.

• Correctness: When designing a Java compiler, you must not only follow the corresponding specification, but also understand the "spirit" of the specification, and only consider correctness. As a result, JDT developers have worked hard for years to keep up with the capabilities of other compilers, including the Sun's compilers. In Eclipse 3.2, only checks for correctness exceed 15,000 unit tests (in contrast, unit tests are not at all in Vaj).

• High efficiency: Thousands of projects and millions of lines of code are often common things. This means solving many problems, such as memory usage that must be predictable and graded. Eclipse 3.2 continues to be actively tuned for this. For example, a developer can rewrite a flowchart to use a bit operation, and the time consumption of the result bit operation is reduced from 20% to 4%.

• Friendliness: Reporting errors is an art. It's not enough to use line numbers alone. Second-level errors are minimized. For example, if a semicolon is missing from a file, it does not affect other files associated with it. The improved static analysis feature helps to identify error patterns. In addition, eclipse can check for the correctness of Javadoc.

For version 3.2, the Eclipse compiler is compatible with the Java SE 6.0. Yes, Eclipse supports Java 6 classes and stackmaptable attributes (even before Java 6 is released). In addition, the compiler provides a number of new diagnostic features to help you find errors before you run your code. Compared to the 3.2 version of the compiler, which provides 45 diagnostics, VAJ provides only 3 types of diagnostic functionality. Some of the most recent diagnostic features include detection of the following:

• Use variables that are obviously null.

• Unnecessary null checks.

• Accidental assignment of method parameters.

• Toggle case input By letting the previous case state fail.

• Use a non-generic (original) type.

• Unused labels.

• Unnecessary-nls

By default, most of these features are in a closed state. Of course, you can also use annotations to set them to off state.

Starting with version 3.2, you can download this version separately if you want to use the eclipse compiler outside of Eclipse. Its command-line arguments are compatible with Javac, and the download file size is only about 1MB. Since the Eclipse compiler is open source, many other projects, such as Apache Tomcat, can bind it to their own software.

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.