Importing and exporting projects

If you don't want to start from scratch with a new project, you can import an existing project. You can also export a project to save it in your file system.

Import a sample app

You can import sample apps into the IDE from your file system or from the IDE. The Welcome page provides access to key resources, such as documentation, sample apps, and support forums.

You can import a sample app from the Welcome page.

  1. On the Welcome page, click Sample apps.
  2. Click a sample app to read more about it.
  3. Click Download and import on the sample of your choice. The project folder for the sample is added to the Project Explorer view and a launch configuration is created for this project.

Import an existing project

You can also import existing project files from the File menu.

  1. On the File menu, click Import.
  2. Expand General and select Existing Projects into Workspace. Click Next.
  3. Select the Select root directory option and click Browse.
  4. Browse to the location of the project or projects that you want to import, and click OK.
  5. In the Projects section, select the project or projects that you want to import, and click Finish. You can see the imported project or projects in the Project Explorer view and you can explore the source code.

Import a Makefile project

You can create a BlackBerry C/C++ Makefile project from the code and Makefiles in an existing folder.

  1. On the File menu, click Import.
  2. In the Import wizard, expand BlackBerry and select Existing Code as BlackBerry C/C++ Makefile Project. Click Next.
  3. In the Code location field, click Browse, and then select the project.
  4. Click Finish. The Momentics IDE builds the project and the project appears in the Project Explorer view.

Import from your file system

You can copy files and folders from your file system into an existing, empty project in your workspace.

  1. On the File menu, click New > BlackBerry Project.
  2. In the New Project wizard, click Core Native, and then click Next.
  3. On the Templates tab, click Empty, and then click Next.
  4. Complete the rest of the wizard.

    To create a project for a Makefile, in the Builds section, select Makefile.

  5. In the Project Explorer view, right-click the project, and select Import.
  6. Expand General, select File System, and then click Next.
  7. In the From directory field, click Browse and navigate to the folder where the source code is located.
  8. Select the files to import. Use the Filter Types, Select All, and Deselect All buttons to select the files.
  9. Click Finish. The Momentics IDE builds the project, and the files appear in your project.

Import a team project set

Team project sets are a convenient way of sharing a collection of projects that are stored in a version-control system among members of your development team. You can create team project sets by using the Import wizard.

  1. On the File menu, click Import.
  2. In the Import wizard, expand Team and select Team Project Set. Click Next.
  3. In the File field, click Browse, and select the project.
  4. Click Finish. The Momentics IDE builds the project and the project appears in the Project Explorer view.

Import an archive file

You can copy files and folders from a ZIP archive into an existing project in your workspace.

  1. On the File menu, click Import.
  2. In the Import wizard, expand General and select Archive File. Click Next.
  3. In the From archive file field, click Browse and select the archive file.
  4. In the Into folder field, click Browse and select the project or folder.

    This project or folder must exist before you open the Import wizard.

  5. Click Finish. The Momentics IDE builds the project and the project appears in the Project Explorer view.

Export projects

You can export files, folders, or entire projects to your file system or to an archive file.

Export files or folders to your file system

To export a file or folder, do one of the following:

  • Drag a file or folder from a project to your file system. To copy the file or folder instead of moving it, press Alt while you drag.
  • Right-click the file or folder and select Copy or Cut, and then paste it in your file system.

Export files or projects to a file system or an archive file

  1. On the File menu, click Export.
  2. Do one of the following:
    • To export your project to the file system, select General > File System.
    • To export your project to an archive file, select General > Archive File.
  3. Click Next.
  4. Select the projects that you want to export. You can also select or clear specific files in each project.
  5. Do one of the following:
    • If you are exporting to the file system, in the To directory field, click Browse, and then select the directory.
    • If you are exporting to an archive file, in the To archive file field, click Browse, and then select the archive file.
  6. Click Finish.

    If you export more than one project and then import from the resulting folder or archive file, you get one project that contains all of the exported projects.

Index your project

The C/C++ search features use an index of symbols to find the locations of declarations and references. The index of symbols comes from the source code in your projects and from external header files.

The indexer needs a successful build before it can populate the index. When you create a project, you trigger a build. However, when you import a project or sample app, there are problem markers throughout the project. To resolve the problem markers, you must start a build.

The Momentics IDE uses fast indexing, which provides the fastest indexing capabilities for declarations and cross reference information. The indexer parses each header file that is included in a project only once. For example, if a header file is included by two compilation units, the parsing of the second unit reuses the results of parsing the first unit. This is similar to how precompiled header files work.

If you disable the indexer, the search feature doesn't work correctly.

You can specify the indexer options for all projects in the current workspace or for a specific project only.

  1. Do one of the following:
    • To specify default indexer options for all projects, on the Window menu, click Preferences. Expand C/C++, and then click Indexer.
    • To specify indexer options for a specific project, in the Project Explorer view, right-click the project, and then click Properties. Expand C/C++ General, and then click Indexer. Click Enable project specific settings.
  2. If necessary, click Enable indexer.
  3. Select the indexer options, and then click OK.

    The indexer gathers information to identify overloaded operators, which means that the indexing time may be longer and the size of the index file is likely to be larger. To skip the collection of implicit references, select the Skip implicit references (for example, overloaded operators) option.

Last modified: 2014-11-17



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus