Modifying Generated Files

Generated files may be fully or partially owned by the UI Designer.

The parts of a generated file which are fully owned by the UI Designer should not be edited as long as you plan to continue performing updates to the UI Design. These sections are bounded with a "do not modify" label.

Other parts of the generated files may be partially implemented but require you to add code to complete their function. These sections contain a "TODO" label which describes the functionality which you must provide.

Modifying Generated Files

  1. Open your project and display its contents in the Project Explorer view
  2. Right-click the file you wish to modify.
  3. The C/C++ Projects context menu will appear.

  4. Select the Open option from the context menu.
  5. The selected file will be opened in the appropriate editor.

    NOTE In place of steps 2 and 3, you can simply double-click the file to open it.

  6. Look for sections of the file which are owned by the UI Designer.
  7. These sections are bounded by comments which indicate the beginning and end of the owned code.

    Example:

    void CNewTestAppUi::ConstructL()
    {
    // [[[ begin generated region: do not modify [Generated Contents]
    BaseConstructL( EAknEnableSkin );
    InitializeContainersL();

    // ]]] end generated region [Generated Contents]

    }

    NOTE The UI Designer will implement the basic functionality of many of the standard class methods. You may add code to methods either before or after the owned regions to perform additional processing within those methods.

  8. Look for sections of the file which you must complete.
  9. Sections of code which require you to implement their functionality will contain a "TODO" marker.

    Example:

    TBool CNewTestForm::SaveFormDataL()
    {
    // TODO save values
    return ETrue;
    }

  10. Implement the code for the TODO sections.
  11. Edit other sections of the file which are not owned by the UI Designer.
  12. When you have finished modifying the file contents, close the file using the standard method for that file type.
Related concepts
Related references