Using the iSeries Project Model apis

The iSeries Project Model can be manipulated programmatically through public java apis that targeted towards creating iSeries Projects, source files, and source members in the iSeries Project view.  
 

Manipulating the Properties Model:

    IISeriesProjectPropertiesModel propertyModel = iSeriesProject.getPropertiesModel();
    String newStringValue = propertiesComposite.getStringTextField().getText();
    propertyModel.setProperty("xxx.yyy.myString", newStringValue);
    propertyModel.setBooleanProperty("xxx.yyy.myBoolean", true);

    // generate new model, only if model changed.
    if (propertyModel.isDirty()) {
       propertyModel.save(monitor);
     }
 

Creating source files:

    // Create a srcpf with defaults
    ISeriesNativeObjectUtil.createSRCPF(
       "DEFAULT2",
       selectedProject.getBaseIProject(),
       ISeriesNativeObjectBasicUtil.getDefaultSourceFileProperties(),
       null,
       null);

    // create custom srcpf
    Properties srcpfProperties =
       ISeriesNativeObjectBasicUtil.getSourceFileProperties(
        37,
        112,
        false,
        "custom description, with ccsid=37, rl=112, igcdata=false");

    ISeriesNativeObjectUtil.createSRCPF(
       "CUSTOMSRCP",
       selectedProject.getBaseIProject(),
       srcpfProperties,
       null,
       null);
 
 

Creating source members:

    // create custom srcpf
    Properties memberProperties =
       ISeriesNativeMemberBasicUtil.getSourceMemberProperties(1000, "last_edit_time=10, myString=testingISV");
    memberProperties.setProperty("com.ibm.etools.iseries.perspective.isv.sample1.myString", "testing ISV");

    ISeriesNativeMemberUtil.createMember(
       "CUSTOM.rpg",
       (IFolder) selectedNativeObject.getBaseIContainer(),
       memberProperties,
       null,
       null);
 

The above snippet is taken from one of the samples included with the iSeries Project perspective. You can check the Installing and Running the Samples section for details about this sample. Also you can check the Java documentation for the iSeries Projects for details.