[Eclipse plug-in Development Guide] 2.2 create a plug-in Project

Source: Internet
Author: User

The first step is to use the Wizard Page of eclipse to create a project (new project. In addition to creating a project, there are many configuration items that generate different codes on the Wizard Page to generate a Simple plug-in code, such as views, editors, and actions ). To simplify things, let's focus on creating a plug-in. Select the plug-in and a view option, which will be discussed in the following chapter.

2.2.1 create a plug-in Project Wizard Page

From the File menu, select new> project to run the Wizard Page (Figure 2-1) of the new project ). On the first page of the Wizard Page, select plug-in project from the list and click Next.

Figure 2-1. Select a project type on page 1 of the new Wizard (based on eclipse3.5)

On the next page of The Wizard Page (Figure 2-2), enter the project name, for example, Com. qualitypeeclipse. favorites. This looks like a common plug-in identifier. In Chapter 3rd, Eclipse plug-in structure overview, we will discuss plug-in identifiers and more details about other plug-in structures. Enter other fields as shown in the figure and click Next.

Figure 2-2 new Project Wizard Page 2 named Project (based on eclipse3.5)

A project can be named casually, but it is easy to name it like a plug-in ID. As a professional habit, eclipse organizations use them to work. This is the naming rule for plug-in development. Because of this, the project name on the new project navigation page is the same as the plug-in ID.

2.2.2. Define a plug-in

Each plug-in has a META-INF/manifest. MF file. In addition, it may include a plugin. xml file and a Java class for plug-in programming. The page on the next navigation page shows the configuration plug-in list and some options of the plug-in Java class. Provide the plug-in identifier, plug-in version, plug-in name, or more for the plug-in, as shown in Figure 2-3. Then click Next.

Figure 2-3 new project navigation page 3 plug-in description

Next, the new plug-in project page displays many types of automatically generated plug-ins (Figure 2-4 ). there are many different options here to quickly generate streamlined code. It is helpful to test these options and check the generated code. In this example, select plug-in with a view and click Next.

Figure 2-4 Create a plug-in project page 4 select a plug-in type

2.2.3 define View

The next step is to select the Automatic Code Generation option. Enter a value on this page (Figure 2-5). Do not select the check box Add the view to the resource perspective to simplify the file for generating the plug-in list, and then click Next.

Figure 2-5 new plug-in Project 5 view definition

Note: This figure is based on 3.2. If this option is not available in 3.5, use the default settings.

Finally, do not select any item (Figure 2-6) on the final navigation page. Each check box is part of a common view that generates code. These will be discussed in subsequent chapters. When you click Finish, a new plug-in project is created and the plug-in List editor is automatically opened.

Figure 2-6 options for Automatic Code Generation in the view on the new plug-in project page 6

Note: This figure is based on 3.2. If this option is not available in 3.5, use the default settings.

This article is the original article of eclipselight.org (eclipse light). For more information, see the source.

Fixed Link: http://www.eclipselight.org/eclipse-plugin-tutorial/543/

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.