Building templates using the Eclipse plug-in development environment

Source: Internet
Author: User

Background

Eclipse has been very successful since its launch, and most of its success stems from the various projects that make up the eclipse platform. One of these includes a project named Plug-in Development Environment (PDE). If you have created plug-ins in Eclipse, you must have used PDE. PDE is a set of tools that help you create, package, and manage Plug-ins.

We will focus on the template features provided in PDE. If you remember the scenario when you tried to create the first plug-in in Eclipse, you know that everything started with the New Plug-in Project Wizard.

Figure 1. PDE Plug-in Wizard

Then, in the process of creating the first plug-in, you stumbled upon something of value.

Figure 2. PDE Plug-in Wizard template

Oh, my--the template! PDE provides a variety of templates for you to start the Eclipse plug-in creation journey. The purpose of this article is to discuss how to create these templates to simplify the learning curve faced by end users when they use extension points or code.

Creating templates

Goal

I find the best way to learn knowledge is through a good simple example. So, guess what? That's what we're going to do today. We will develop a simple template for creating a simple view. I hope this article will lay the groundwork for future template creation.

Creating Plug-ins

The first stop for this journey is to create a new plug-in project (File > New > Project > Plug-in Project). Please use a template. Ensure that there is a dependency between the project and the Org.eclipse.pde.ui. When this is done, you can go to the Extensions tab of the plugin editor and start creating the template.

Template Wizard

The most important extension point for creating a template is org.eclipse.pde.ui.pluginContent. This extension point can contribute to the wizard that creates additional content for the PDE plug-in project. After you have created the list of Plug-ins and key files, you can use these wizards to add more files and extensions to the original schema. The implementation of this wizard adds content based on a custom parameterized template that the user chooses in the wizard. Now, let's start using this extension point.

Figure 3. Sample Extensions Page

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.