12
New Plug-in New Plug-in Template Wizard Template Wizard Present by Kun-Tse Wu Present by Kun-Tse Wu

New Plug-in Template Wizard

Embed Size (px)

DESCRIPTION

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. - PowerPoint PPT Presentation

Citation preview

Page 1: New Plug-in Template Wizard

New Plug-in New Plug-in Template WizardTemplate Wizard

Present by Kun-Tse WuPresent by Kun-Tse Wu

Page 2: New Plug-in Template Wizard

OutlineOutline

Creating a plug-in projectCreating a plug-in project Writing your own plug-in templateWriting your own plug-in template

org.eclipse.pde.ui.pluginContentorg.eclipse.pde.ui.pluginContent org.eclipse.pde.ui.templatesorg.eclipse.pde.ui.templates org.eclipse.pde.ui.newExtensionorg.eclipse.pde.ui.newExtension

ConclusionConclusion

Page 3: New Plug-in Template Wizard

Creating a plug-in Creating a plug-in projectproject

To create a plug-in To create a plug-in project, bring up project, bring up the New Plug-in the New Plug-in Project creation Project creation wizard via  wizard via  File > File > New > Plug-in New > Plug-in ProjectProject..

Part I

Page 4: New Plug-in Template Wizard

Creating a plug-in Creating a plug-in projectproject

On the Plug-in ContOn the Plug-in Content page, you set thent page, you set the data with which the data with which the plugin.xml file wile plugin.xml file will be initialized, incll be initialized, including the plug-id, vuding the plug-id, version and name.ersion and name.

Part II

Page 5: New Plug-in Template Wizard

Creating a plug-in Creating a plug-in projectproject

This page shows This page shows the various the various templates that templates that PDE provides PDE provides which generate which generate useful content useful content such as views, such as views, editors, property editors, property pages etc.pages etc.

Part III

Page 6: New Plug-in Template Wizard

Creating a plug-in Creating a plug-in projectproject

In this example, we In this example, we will create a plug-will create a plug-in with the "Hello, in with the "Hello, World" template.World" template.

This page will let This page will let you customize the you customize the sample extension sample extension that we are that we are creating.creating.

Part IV

Page 7: New Plug-in Template Wizard

Creating a plug-in Creating a plug-in projectproject

When you press When you press FinishFinish, the wizard , the wizard will create the new will create the new project, all the project, all the specified folders specified folders and files, and the and files, and the initial Java build initial Java build path.path.

Part V

Page 8: New Plug-in Template Wizard

Writing your own Writing your own templatetemplate

PDE provides several template plug-inPDE provides several template plug-ins that will generate a plug-in with one s that will generate a plug-in with one or more fully-working extensions.or more fully-working extensions.

We can create our own template throuWe can create our own template through these extension points.gh these extension points. org.eclipse.pde.ui.pluginContentorg.eclipse.pde.ui.pluginContent org.eclipse.pde.ui.templatesorg.eclipse.pde.ui.templates org.eclipse.pde.ui.newExtensionorg.eclipse.pde.ui.newExtension

Page 9: New Plug-in Template Wizard

org.eclipse.pde.ui.pluginCoorg.eclipse.pde.ui.pluginContentntent

This extension point provides for contrThis extension point provides for contributing wizards that create additional cibuting wizards that create additional content of the PDE plug-in projects.ontent of the PDE plug-in projects.org.eclipse.pde.ui.pluginContentorg.eclipse.pde.ui.pluginContent

Need a class which implements Need a class which implements org.eclorg.eclipse.pde.ui.IPluginContentWizardipse.pde.ui.IPluginContentWizard HelloWorldNewWizard.javaHelloWorldNewWizard.java

Page 10: New Plug-in Template Wizard

org.eclipse.pde.ui.templateorg.eclipse.pde.ui.templatess

This extension point registers plug-in This extension point registers plug-in project content templates that are used project content templates that are used to generate code for the new extensionto generate code for the new extensions.s.org.eclipse.pde.ui.templatesorg.eclipse.pde.ui.templates

Need a class that implements Need a class that implements org.ecliporg.eclipse.pde.ui.templates.ITemplateSectionse.pde.ui.templates.ITemplateSectionHelloWorldTemplate.javaHelloWorldTemplate.java

Page 11: New Plug-in Template Wizard

org.eclipse.pde.ui.newExteorg.eclipse.pde.ui.newExtensionnsion

This extension point should be used to cThis extension point should be used to contribute wizards that will be used to crontribute wizards that will be used to create and edit new extensions in eate and edit new extensions in PDE pluPDE plug-in manifest editorg-in manifest editor..org.eclipse.pde.ui.newExtensionorg.eclipse.pde.ui.newExtension

From the ‘Extensions’ page of the ediFrom the ‘Extensions’ page of the editor, click ‘Add...’. In the wizard that tor, click ‘Add...’. In the wizard that comes up, select ‘Extension Templatescomes up, select ‘Extension Templates’ in the left pane and choose the templ’ in the left pane and choose the template of choice in the right pane.ate of choice in the right pane.

Page 12: New Plug-in Template Wizard

ConclusionConclusion

In order to generate pluggable In order to generate pluggable software automatically , PDE software automatically , PDE template plug-ins can help us to template plug-ins can help us to generate a plug-in projectgenerate a plug-in project..

In order to collect the necessary In order to collect the necessary information about the pluggable information about the pluggable software, we use software, we use new plug-in project new plug-in project wizardwizard helping us to create the new helping us to create the new plug-in.plug-in.