Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Use exclusion rules when developing in the BlackBerry Java Plug-in for Eclipse

by Retired on ‎02-16-2010 03:10 PM - edited on ‎12-20-2010 11:20 AM by Retired (2,111 Views)

Summary

 

This article applies to the following:

 

  • BlackBerry® Java®  Plug-in for Eclipse®


  • Details


    When you develop Java applications for the BlackBerry smartphone, you might want to exclude some files in the source folder from being compiled with the application code. A common example occurs when you are using source control, which often creates a subfolder in the project’s src folder. When you build the project, the source control subfolder may be included in the build, increasing the size of the .cod and .jar files.

     

    BlackBerry Java Plug-in for Eclipse includes tools that allow you to specify which files and folders to include or exclude from the build.

     

    There are two tasks you must complete to set up this feature.

     

    Task 1


    Note: If you do not perform this task before the next task, errors will occur when you build the project.

     

    Enable project-specific settings to allow for the exclusion rule changes to be enforced. This can be done by completing the following steps:

     

    1. Right-click the project name.
    2. From the context menu, select Properties.
    3. In the left pane, select the Enable project specific setttings check box.
    4. Apply the changes and then close the window.

    Task 2


    Specify the files or folders to exclude. This can be done by specific files or folders or by using a rule to filter files or folders.

     

    To specify files and folders, complete the following steps:

     

    1. Below the main src folder of your project, right-click the Java source file of the package you want to exclude.
    2. To exclude files or folders from all subsequent builds, select Build Path > Exclude.
    3. To include files or folders from all subsequent builds, select Build Path > Include.

    To create a rule to filter files and folders, complete the following steps:

     

    1. Right-click the main src folder of your project.
    2. Select Build Path > Configure Inclusion / Exclusion Filters.
    3. In the Inclusion and Exclusion Patterns window, specify which patterns will be used to determine whether a file or package is added to the project build.

      Note: For more information on the supported format for these rules, search for Inclusion and Exclusion Patterns in the Eclipse Help.

Users Online
Currently online: 49 members 565 guests
Please welcome our newest community members: