- 1 End-to-End Scenarios
- 2 Search
- 3 PDE as a Refactoring Participant
- 4 Cool Wizards
- 5 Target Definitions and Import Management
- 6 Running an OSGi Application
- 7 Import
- 8 Export
- 9 Launching
- 10 Target Management
A Full Plug-in Development Cycle
- From the top level menu, select Help > Cheatsheets... > Plug-in Development > Creating an Eclipse Plug-in. Press OK.
- Go through this cheatsheet to explore all stages of the plug-in development cycle.
Creating an Rich Client Application
- From the top level menu, select Help > Cheatsheets... > Plug-in Development > Creating a Rich Client Application. Press OK.
- Go through this cheatsheet to create a standalone, fully-branded rich client application.
Classic Plug-in Search
- From the top level menu, select Search > Search... to bring up the Search dialog.
- Click on the Plug-in Search tab. Enter *.debug.ui.* as a search string. Leave all defaults as-is. Press the Search button.
- Verify that the Search view opens and that it contains 31 hits.
- Double-click on the first hit to open the manifest editor of the org.eclipse.debug.ui plug-in.
- Verify that the editor opens to the plugin.xml source page and that the extension point ID is visible and correctly selected. Also verify that the arrow in the margin is on the correct line.
- Using the Down Arrow in the Search view toolbar, navigate to the next hit.
- Verify that the manifest editor for the org.eclipse.ant.ui plug-in opens with the extension hit visible and correctly selected.
- Press the Down Arrow again. Verify that the selection moves to another hit within the same editor. Verify that a new editor does NOT open.
- Close all manifest editors.
Plug-in Search in Mixed Namespaces
- Bring up the New Plug-in Project creation wizard via File > New > Project... > Plug-in Project. Press Next.
- Enter com.example.xyz as the project name. Press Next.
- Accept all defaults and press Finish. Answer Yes when prompted to switch to the Plug-in Development perspective.
- On the Extension Points page of the plug-in manifest editor, press Add...
- Enter org.eclipse.pde.core.parsers as the extension point ID. Enter Parsers as the extension point name.
- Uncheck the checkbox to edit the extension point schema. Press Finish.
- Verify that the extension point was created. Save the file and close the editor.
- Bring up the search dialog via Search > Search... from the top level menu.
- On the Plug-in Search tab, enter org.eclipse.pde.core.* as the search string. In the Limit To group, select Declarations. Press the Search button.
- Verify that the search view opens with 5 matches.
- Double-click on the org.eclipse.pde.core.parsers search hit. Verify that it correctly locates the extension point on the plugin.xml source page of the com.example.xyz plug-in.
- Double-click on the org.eclipse.pde.source search hit. Verify that the extension point declaration is correctly located on the plugin.xml source page of the org.eclipse.pde.core plug-in.
PDE as a Java Search Participant
- Check out the org.eclipse.pde.core plug-in project from HEAD.
- Right-click on the org.eclipse.pde.core.plugin package and select References > Workspace from the context menu..
- Verify that you get a search hit in the MANIFEST.MF file of the plug-in.
- Double-click on the search hit. Verify that the manifest editor opens on the MANIFEST.MF source page with the org.eclipse.pde.core.plugin package highlighted in the Export-Package header.
- Close the editor.
- In the Package Explorer view, select References > Workspace from the context menu of the org.eclipse.pde.internal.core.variables.TargetHomeDynamicVariableResolver.
- Verify that you get a search hit in the plugin.xml file of the plug-in.
- Double-click on the search hit. Verify that TargetHomeDynamicVariableResolver is highlighted in the resolver attribute of the org.eclipse.core.variables.dynamicVariables extension.
PDE as a Refactoring Participant
- Bring up the New Plug-in Project creation wizard via File > New > Project... > Plug-in Project. Press Next.
- Enter com.example.abc as the project name. Press Next.
- Accept all defaults. Press Next.
- Choose the Hello World template. Press Finish.
- In the Package Explorer view, select Refactor > Rename... from the context menu of the com.example.abc.Activator type.
- Enter BundleActivator as the new name and press Finish.
- Turn to the MANIFEST.MF source tab of the plug-in editor and verify that there is no warning next to the Bundle-Activator header and that its value has been updated to reflect the new type name.
- In the Package Explorer view, select Refactor > Rename... from the context menu of the com.example.abc.actions.SampleAction type.
- Enter NewAction as the new name and press Finish.
- Turn to the plugin.xml source tab of the plug-in editor and verify that there is no warnings in the margin and that the class attribute on line 21 references the new type name.
Renaming Packages and Subpackages
- Turn to the Runtime page of the manifest editor of the com.example.abc plug-in.
- In the Exported Packages section, press Add...
- Verify that the selection dialog shows two packages. Select them both and save the file.
- In the Package Explorer view, select the com.example.abc package and select Refactor > Rename... from the context menu.
- In the Rename dialog, check the Rename subpackages checkbox.
- Enter com.example.abc.def as the new package name. Press Finish.
- Verify that NO warnings appear on the MANIFEST.MF or the plugin.xml files.
- Turn to the MANIFEST.MF source tab of the plug-in editor and verify that the Bundle-Activator and Export-Package headers are now referencing the new package name.
- Turn to the plugin.xml source tab of the plug-in editor and verify that the class attribute on line 21 references the new package name.
Externalize Manifests Wizard
- Create a Hello World plug-in by repeating steps C1.1 - C1.4
- Select the com.example.abc plug-in project and select Properties from its context menu.
- On the Plug-in Development > Plug-in Manifest Compiler preference page, choose the Use project settings option.
- Raise the severity level for Usage of non-exteranlized strings from IGNORE to ERROR. Press OK.
- Answer Yes when prompted to rebuild the project.
- Verify that the MANIFEST.MF file now has 2 errors and the plugin.xml has 4 errors.
- Right-click on the com.example.abc project and select PDE Tools > Externalize Strings... from the context menu.
- Verify that the Bundle-Name and Bundle-Vendor headers in the MANIFEST.MF file are flagged as non-extenalized.
- Verify that there are four attributes in the plugin.xml that are flagged as non-externalized.
- Accept all defaults and press Finish.
- Verify that all errors have gone away.
- Verify that a plugin.properties file was created at the root of the project containing six key-value pairs.
- Verify that attributes/headers flagged in steps 8 and 9 now have keys that start with %
Organize Manifests Wizard
- Check out the org.eclipse.pde.ui plug-in project from HEAD.
- Open the manifest editor for the org.eclipse.pde.ui plug-in and go to the Runtime tab.
- In the Exported Packages section, remove the org.eclipse.pde.ui.launcher and org.eclipse.pde.internal.ui.wizards.xhtml from the list.
- Switch to the plugin.xml tab. On line 17, remove the $nl/ prefix from the value for the icon attribute. Save the file.
- Bring up the Organize Manifests wizard via PDE Tools > Organize Manifests... from the context menu of the org.eclipse.pde.ui plug-in project.
- Keep all default options. In the Internationalization section, check the first option. Press Finish.
- This should undo the damage done in steps 3 and 4.
- Select Compare With > Latest from HEAD from the context menu of the org.eclipse.pde.ui plug-in project.
- Verify that there are no differences.
Target Definitions and Import Management
Loading the RCP Target Definition
- Open the Target Platform preference page via Window > Preferences... > Plug-in Development > Target Platform from the top level menu.
- Press "Add...", select the "Template" radio button at the bottom of the wizard, and then choose the "Base RCP (with source)" target, and press "Next"
- Verify that the "Locations" tab lists two features: org.eclipse.rcp and org.eclipse.rcp.source. Press "Finish".
- Check (check box) the newly created target in the "Target Definitions" list to make it the active target.
- Press OK to apply the changes and dismiss the preferences dialog.
Software Site Target Provisioner
- Open the Target Platform preference pave via Window > Preferences... > Plug-in Development > Target Platform from the top level menu.
- Press "Add...", ensure the "empty" target is selected, and press "Next".
- Enter a name for the target definition - something like "Sofware Site Test".
- Press "Add...", select "Software Site" and press "Next".
- Use the "Add Software Site" page to select some IUs from a repository.
- Pressing "Finish" will cause the required bundles to be downloaded and stored locally.
- The "Plug-ins" tab will display all the bundles once they have been downloaded.
- The "Software Site" provisioner allows specific versions of IUs to be selected.
- You can add multiple sites to a target (although one is usually sufficient). However, this does allow for content to be derived from different sites (for example, the SDK from eclipse.org, and EMF from somewhere else).
- You can add/remove sites/IUs from a target definition incrementally.
- All target definitions share a local bundle pool (repository) in the org.eclipse.pde.core metadata area (.bundle_pool directory), and this respository is garbage collected as definitions are deleted.
- All "software sites" contained in a target definition are managed by a p2 profile - but other locations (bundles sources) are not currently managed by the profile (for example, directories or installs). For this reason, it does not make a lot of sense to mix software sites with other types of locations.
- Repeat steps C2.1 - C2.4 to create a Hello World plug-in project.
- Go to the Dependencies tab of the plug-in manifest editor and remove the two plug-ins listed in the Required Plug-ins section.
- Save the file. Verify that you get compiler errors in the project.
- Expand the collapsed Automated Management of Dependencies section and press the Add... button in said section.
- Verify that it lists the plug-ins from E1.5 and not all 111 plug-ins.
- Add all plug-ins from the selection dialog to the list and save the file.
- Verify that the code in the plug-in project now compiles again even though there are no plug-ins listed in the Required Plug-ins section.
- In the Automated Management of Dependencies section, click on the add dependencies link.
- Verify that the Required Plug-ins list is now re-populated with the org.eclipse.ui and org.eclipse.core.runtime plug-ins. No more and no less.
Running an OSGi Application
Create an OSGi bundle
- Bring up the New Plug-in Project wizard via File > New > Project... > Plug-in Project. Press Next.
- Enter com.example.bundle as the project name.
- In the Target Platform section, choose the OSGi framework option. Leave Equinox as the selection. Press Next.
- Accept all defaults. Press Next.
- Choose the Hello OSGi Bundle template. Press Finish.
- Verify that the manifest editor opens but does NOT show the Extensions and Extension Points tabs.
Run an OSGi bundle
- Select Run As > Equinox Framework from the context menu of the com.example.bundle project.
- Verify that the Console view opens and that it contains an osgi> prompt.
- Verify that it says Hello World!! at the prompt
- Press Enter to get a new prompt. Position the cursor after the > and type ss to display the list of installed bundles.
- Verify that two bundles are listed as active: the system bundle and the com.example.bundle
- Type stop 1 at the osgi> prompt to stop the com.example.bundle Bundle.
- Verify that the message Goodbye World!! is printed to the console.
- Type ss again at the osgi> prompt.
- Verify that com.example.bundle is now listed as RESOLVED.
- Type exit at the osgi> prompt to terminate the launch.
- Import from different targets (Eclipse installs, software sites, folders, etc.)
- Import using current target, select a different target, or from a folder
- Import as binary
- Check that plug-in builds, plugin/manifest files, check plugin dependencies, check source available, check translation files, .properties and other resources
- Import with linked source
- Same checks as binary, also check that source links can be opened
- Import with source
- Same checks as binary, check that source folders exists and are in build.properties
- Some plug-ins have multiple src folders (jdt.debug)
- Some plug-ins automatically get imported as binary (swt)
- Import plug-ins with no source, source in the target and internal source (source included in binary bundle during export)
- Test the feature import wizard
Self-contained Workspace (Dani workspace)
- Start with a new workspace
- Disable your target platform (ensure preference page warns you)
- Check out a plug-in from CVS that sits somewhere in the middle of the stack (org.eclipse.debug.ui)
- The plug-in will have compile errors
- Go to plug-in import wizard
- Select "Import plug-ins and fragments required by existing workspace plug-ins"
- After import, ensure plug-ins compile
- Try importing as binary, with links, with source
- Export multiple plug-ins at once
- Export into a folder and an archive
- Change metadata creation
- Multiple exports to same location should update metadata)
- Export with source, both internal and source bundles
Export and Install
- Create an Eclipse plug-in that adds a view (see #End_to_end_scenarios)
- Use the
- Export an example feature
Covered under #End_to_end_scenarios, creating a rich client application
- Change options on tabs and save the config
- Tabs should not be dirty (apply enabled) when first opened
- Some options disable other options
- Warning if no target is active
- Warning if backing file for active target is deleted
- Preview pane shows locations in each target
- Creating/editing/deleting/moving targets, hitting apply, etc shouldn't confuse the page
- Restore defaults should select existing default target if available, create one if not
Edit Wizard / Editor
- Create different types of targets
- Both wizard and editor should be able to edit same file
Software Site Provisioner
- Try different required software options (planner vs slicer problems)