Bridges > Java and COM - Export Bridge Assistant > Working With A Project

# Working With A Project

The Export Bridge Assistant works with a project that contains an IDL source object to be exported. You can create a new project or open an existing one, modify or update it, and save it.

## Opening a Project

If you are creating a new project, you have the choice of making it COM or Java. For both object types, you must specify the IDL source object by selecting either an IDL source file (<idlObject>__define.pro) or a SAVE file containing an object definition (<idlObject>__define.sav).

To open an existing project, you must select an existing wrapper definition file (<idlObject>_<dest>_wrapdef.sav) created by a previous invocation of the Assistant.

Note: You can create or open a COM project on UNIX, but you cannot build any COM objects. See Output Destinations for details.

Once the source object is specified, the IDL object is resolved. Note that the source object file does not have to be in the path. However, any supporting or referenced source file must be in the same directory or in the IDL path so that it can be resolved.

When the object is resolved, the Assistant populates the project tree with property names, routine names, and parameter names from the object. You can use this view to specify information about the object necessary for creation of the wrapper objects.

If you create a new project or open an existing project while you already have a project open, you will be prompted to save any changes made to the current project before the new or existing project opens. You can cancel instead to continue working on the current project.

## Saving a Project

You can save your work in the current project at any time. The Assistant stores the information in an IDL SAVE file. If you are saving a project for the first time, the Assistant prompts you for the SAVE file’s name and location. The default name is based on the source object class name as follows:

<idlObject>_<dest>_wrapdef.sav, where <dest> is either java or com.

Note: This filename is the default created by the Assistant, but you can save project files in SAVE files with any name.

## Updating a Project

You might have used the Assistant to generate a wrapper object’s specification, make changes to the original IDL source object, and want to merge these changes into the existing object specification without losing the initial work done in the Assistant.

You can do this by bringing in the modified source object and having the Assistant respond with both automated and manual update functionality.

The following list provides some common cases where an update might be useful:

- Changes to the IDL object
  - Changes to method names in IDL object, parameters unchanged
  - Methods added
  - Methods removed
  - Method parameters added
  - Method parameters removed
- Changes to object specification
  - Method data modified (e.g., from function to procedure, the return type, whether the return value is an array or not)
  - Parameter data modified (e.g., parameter type, array)

When you select an object definition using the File > Update From Source... command, the Assistant compares it to the object in the current project and ensures that the object class of the file selected matches the class of the existing project.

Updating an existing project with an IDL source object redefines the project based on the definition of the source object. When applicable, attributes from the existing project are applied to matching items from the update. This application takes place both automatically in the Assistant and manually through interaction with a dialog that launches to guide the update.

First, the project tree is populated with routine names and parameter names from the updated source (the master). Next, information from the IDL source object is compared to the existing definition. Property, method, and parameter information is copied when the item is present in both existing definition and the updated source object. The matching functionality is triggered if there are both added and removed methods. The matching dialog is displayed (if applicable) so you can match names of methods that were renamed. If matched, parameter information that matches exactly is copied to the new wrapper definition.

The following dialog shows a method that has been renamed in the updated source (marked with '_CHANGED'). The method TESTPROCEDURE1MULT from the old methods has been linked to the new method TESTPROCEDURE1MULT_CHANGED, which updates the display of linked methods.

The following summarizes the details of object modification and project update.

Object Modifications | Effect of Modification in Assistant | Manual Action Taken | Automatic Action Taken
--- | --- | --- | ---
Method renamed, parameters unchanged | Both Methods Added and Methods Removed are true | Object method added, object definition method missing; you can match old method name with new method name | New method added, information from old method copied to new method, old method removed.
Method added | Object has a method not in the project | If Methods Removed is false, add method; otherwise, see the method-renamed information (above) | New method added
Method removed | Object lacks a method in the project | If Methods Added is false, remove method; otherwise, see the method-renamed information (above) | Old method removed
Parameter renamed | N/A | None | New parameter added, old parameter removed
Parameter added | Updated object has a parameter not in the project | None | New parameter added
Parameter removed | Object lacks a parameter in the project | None | Old parameter removed
Property added | Updated object has a property not in the project | None | New property added
Property removed | Object lacks a property in the project | None | Old property removed