Sample: Contributing a Property and a Wizard Page to the iSeries Project
Object Model
What is this Sample about?
This sample demonstrates the following:
-
How to contribute an ISV property to the iSeries Project Object model
-
How to contribute a wizard page to the existing iSeries Projects creation
wizards
-
How a wizard page is notified when the Finish button is pressed, for post-processing
-
How to contribute a properties page to the iSeries Projects perspective
-
How to contribute an action to the iSeries Projects perspective
-
How to perform filtering on actions and properties pages, to control where
you contribute the pop-up
Details:
This sample demonstrates how to contribute ISV properties to the iSeries
Project object model. If you examine plugin.xml, you can see steps taken
to contribute properties.
The sample first contributes a property and a wizard page that configures
that property. This contribution adds the supplied wizard page to the new
iSeries Project wizard, which allows the ISV to set the values of the properties
just defined. The wizard takes care of generating and caching these values.
Next, the sample contributres an action called Enable ISV Properties
Page to all iSeries Projects. The action toggles the boolean value
of the contributed ISV property, to enable or disable the display of a
Property page, contributed also by the ISV.
With this plugin installed, you can run the New iSeries Project wizard,
and you will see the added wizard page as the last page in the wizard.
If you check the boolean property in that wizard, and click on Finish,
the project will be created and all properties cached. If you right-click
on the new iSeries Project and select Properties, the ISV properties
page will opoen. De-select the boolean value, and close the properties
page. Right-click again on the project and select Properties; now
the properties page is not contributed, because you filtered it out with
the boolean persistent property. If you right-click on the project again,
and select Enable ISV Properties Page you will now be able to see
it again. This demonstrates two things: filtering, and how to save and
retrieve values from the properties model into the properties page.
Next, the sample contributes an action called Clear Modified Properties
to all iSeries Project objects in the tree viewer. With this action, you
can clear all the modified properties on that specific object (project,
srcpf, or member). The action demonstrates how to manipulate the properties
model associated with the iSeries project object model.
Also, for convenience, the sample contributes a property page called
iSeries
Resource Info to all iSeries resource objects in the iSeries project
viewer. You can use that property page to check the state of the properties
model for the various objects in the tree.
Gotchas:
-
For this release, filtering by iSeries project model properties can only
be done on local properties (not on a team shared property) whether it
be a predefined property or an ISV defined property. The technical reason
is that local properties are persistent properties and Eclipse already
supports filtering by persistent properties.