Skip to content

zeroc-ice/ice-builder-eclipse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Ice Builder for Eclipse

The Ice Builder for Eclipse provides a plug-in which automates the compilation of Slice files using the Slice-to-Java compiler and manages the resulting generated code.

An Ice installation with slice2java version 3.4.2 or higher is required.

The Ice Builder for Eclipse plug-in provides the following features:

  • Automatically compiles all the Slice files in your project
  • Incrementally recompiles Slice files after modifications
  • Maintains dependencies between Slice files
  • Highlights Slice compilation errors in your source code
  • Manages code generated by slice2java and removes obsolete generated files automatically

Contents

Installing the Ice Builder Plug-in

The Ice Builder for Eclipse is distributed through the Eclipse Marketplace:

  1. From the Help menu, choose Eclipse Marketplace
  2. Search for Ice Builder
  3. Click Install to install the Ice Builder plug-in

Upgrade Notes

From Ice Builder 4.0

The Ice Builder 4.0 adds all the project's Slice directories to the list of include directories during compilation.

Newer versions of Ice Builder no longer add these directories to the list of include directories. As a result, when upgrading from Ice Builder 4.0 to the latest Ice Builder, you may need to add some of your project's Slice directories to the Include Directories (see Configuring Project Settings below).

From a 3.x Plug-in

If you are upgrading from an Ice plug-in version 3.x, you should uninstall the old plug-in before installing the Ice Builder. For such versions, after installation it might be necessary to manually reconfigure the Ice Builder settings as old settings are not automatically migrated.

Usage

Configuring the Plug-in

The plug-in preferences can be accessed by navigating to Window -> Preferences and selecting Ice Builder.

Preferences Dialog

You can use Ice Home to specify where slice2java and the Ice Slice files are located. Ice Builder looks for slice2java in the bin subdirectory of Ice Home, and for the Slice files in the following subdirectories of Ice Home:

  • share/slice
  • share/ice/slice
  • share/Ice-<version>/slice, where <version> is the output returned by slice2java -v
  • slice

The Ice Builder uses the following Ice Home directories by default:

Platform Default Ice Home
Linux /usr
macOS /usr/local
Windows Latest Ice installation recorded in the Windows registry

Build Automatically allows you to choose whether Slice files should be rebuilt automatically as they are updated; it is generally recommended to disable this option for larger projects.

Activating the Plug-in for a Project

The plug-in is enabled on a per project basis. To enable it, right click on the project, choose Ice Builder and select Add Ice Builder.

Activating the Plug-in

Upon activation, the project immediately creates a generated directory to hold the Java source files the Slice compiler generates from your Slice files.

To de-activate the plug-in, navigate to the Ice Builder menu and select Remove Ice Builder. Removing the Ice Builder plug-in will remove all the generated code but will not affect your Slice files.

Configuring Project Settings

To configure the project-specific settings, select Properties from the Project menu or right-click on the name of your project and choose Properties. Click on the Ice Builder menu to view the plug-in's settings for the selected project.

Project Properties Dialog

The Generated Code Directory allows you to specify where all generated files should be placed in the project. By default, the plug-in uses the generated directory for this. To change the directory, you must first create the new directory, and then click Browse to navigate to it. The new directory must be empty, and the plug-in requires exclusive use of it: any files or changes made to the directory will be lost during the next Slice compilation.

The Include Directories list allows you to specify Slice include directories passed to slice2java through its -I option. These directories are searched by slice2java in the order you specify them. The Ice Builder automatically adds the Slice directory found within Ice Home to the end of this list.

You can pass additional options to the Slice compiler with the Additional Options field. For a list of all supported options and their descriptions, refer to the slice2java page in the Ice Manual.

Compiling Slice Files

Slice files can be manually compiled through Eclipse or by using the Compile Button under the Ice Builder project menu.

If automatic building is enabled, Slice files will be compiled if one of the following is true:

  • Any Slice files in the project have been updated since the last compilation through the plug-in (this includes removing Slice files from projects).
  • The options used to compile Slice files have changed.

During a full build, the Ice Builder plug-in automatically searches all directories within your project's scope for Slice files, and compiles all of them, in addition to removing any obsolete generated code.

For incremental builds, only the Slice files that have changed in the project, and the Slice files in the project that directly or indirectly reference them, are recompiled, and their corresponding generated code updated.

Building the Plug-in from Source

In order to build the plug-in, you need an installation of Eclipse suitable for plug-in development.

You also need to install the Eclipse Plug-in Development Environment if it is not already installed. Go to Help > Eclipse Marketplace and search for Eclipse PDE, then click Install to install the Eclipse PDE.

To import the project choose File > Import > General > Existing Projects into Workspace and select the java directory in this repository as the root directory.

To create the plug-in, use File > Export > Plug-in Development > Deployable plug-ins and fragments.