Creating a plug

Download Report

Transcript Creating a plug

New Plug-in Template
Wizard
Present by Kun-Tse Wu
Outline


Creating a plug-in project
Writing your own plug-in template
org.eclipse.pde.ui.pluginContent
 org.eclipse.pde.ui.templates
 org.eclipse.pde.ui.newExtension


Conclusion
Creating a plug-in project
Part I

To create a plug-in
project, bring up the
New Plug-in Project
creation wizard via File
> New > Plug-in
Project.
Creating a plug-in project
Part II

On the Plug-in Content
page, you set the data
with which the
plugin.xml file will be
initialized, including the
plug-id, version and
name.
Creating a plug-in project
Part III

This page shows the
various templates that
PDE provides which
generate useful content
such as views, editors,
property pages etc.
Creating a plug-in project
Part IV


In this example, we will
create a plug-in with the
"Hello, World" template.
This page will let you
customize the sample
extension that we are
creating.
Creating a plug-in project
Part V

When you press Finish,
the wizard will create the
new project, all the
specified folders and files,
and the initial Java build
path.
Writing your own template


PDE provides several template plug-ins that will
generate a plug-in with one or more fullyworking extensions.
We can create our own template through these
extension points.
org.eclipse.pde.ui.pluginContent
 org.eclipse.pde.ui.templates
 org.eclipse.pde.ui.newExtension

org.eclipse.pde.ui.pluginContent


This extension point provides for contributing
wizards that create additional content of the
PDE plug-in projects.
org.eclipse.pde.ui.pluginContent
Need a class which implements
org.eclipse.pde.ui.IPluginContentWizard
HelloWorldNewWizard.java
org.eclipse.pde.ui.templates


This extension point registers plug-in project
content templates that are used to generate code
for the new extensions.
org.eclipse.pde.ui.templates
Need a class that implements
org.eclipse.pde.ui.templates.ITemplateSection
HelloWorldTemplate.java
org.eclipse.pde.ui.newExtension


This extension point should be used to
contribute wizards that will be used to create
and edit new extensions in PDE plug-in
manifest editor.
org.eclipse.pde.ui.newExtension
From the ‘Extensions’ page of the editor, click
‘Add...’. In the wizard that comes up, select
‘Extension Templates’ in the left pane and
choose the template of choice in the right pane.
Conclusion


In order to generate pluggable software
automatically , PDE template plug-ins can help
us to generate a plug-in project.
In order to collect the necessary information
about the pluggable software, we use new plugin project wizard helping us to create the new
plug-in.