How to create an add-in project in Eclipse


Summary
This topic guides you through the step-by-step process of creating an add-in project using the Eclipse integrated development environment (IDE). This workflow can be followed for any ArcGIS for Desktop application that supports the add-in framework.

In this topic


About creating an add-in project in Eclipse

This topic guides you through the process of creating an add-in project using the Eclipse IDE. Before beginning this workflow, make sure that you have a supported version of the Eclipse IDE installed with the ESRI provided plug-in. For more information, see How to install ArcGIS plug-ins.
This topic defines an add-in project for ArcMap since there is no difference between creating an add-in project for any of the supported ArcGIS for Desktop applications. This same workflow can be applied when creating an add-in project for the other supported desktop applications. 
Creating an add-in project is different than defining a specific type of add-in (for example, button, tool, and so on). The Creating different types of customizations section refers you to topics describing each add-in type.
The workflow for creating an add-in project in Eclipse consists of the following (done in the order as shown):

Creating an add-in project in Eclipse

This section assumes that you have opened Eclipse and have set up a workspace location that you want your project to be stored in on disk. Do the following steps to create an Eclipse add-in project:
  1. Click the File menu, click New, then select Project. The New Project wizard appears.
  2. Click to expand the ESRI Templates node, click ArcGIS Extensions, then click Desktop.
  3. Select ArcMap Add-In Project. See the following screen shot:


  4. Click Next.
  5. Type a name for the add-in project in the Project name text box.
  6. Click Finish.
Clicking Next instead of Finish gives more Java setting options (for example, additional libraries you might need to reference). However, if you are only working with add-ins and do not require additional Java properties, such as referencing an external Java Archive (JAR) file, then clicking Finish already does the job of referencing the arcobjects.jar library needed to construct your add-ins. If you are unsure that the settings are necessary, click Next and examine the additional settings for the project.
When finished, an Eclipse add-in project is created with the project name you added on the New Project wizard. The project automatically generates the necessary library references and the config.xml file. The config.xml file is opened using the Add-In Editor. The Add-In Editor does not show Extensible Markup Language (XML), as you might expect, but rather a form based editor. The Add-In Editor provides the following views:
The Add-In and Source views are synchronized with one another. For example, if you make a change to a text box in the Add-In view, that change is automatically reflected in the Source view. The preceding screen shot has a value for the Name property, which is reflected in the Source view with this value placed between the <Name> and </Name> XML tags. However, if you removed the value for the Name property in the Add-In view, you will see empty <Name> and </Name> tags in the Source view.
The Add-In Editor is extremely useful because it provides all the necessary details you require when developing an add-in project, and any type of add-in, without concerning yourself with the proper XML syntax. Use the Add-In Editor to help minimize the potential for errors when defining the config.xml file. All the workflows shown to you will use the Add-In view on the Add-In Editor.

Setting properties

After you create the project, set the properties found on the Add-In Overview section of the Add-In Editor. These properties are essentially the project's metadata and become important at deployment time when the add-in is being used by you or end users.
You can define as many types of customizations as your organization requires in a project and the metadata acts as a way to describe the different types of add-ins as a group. Ideally, all the customizations that you define for a project should form some logical grouping.
Following this strategy helps you keep your functionality organized when it is being utilized by the end user and when you are trying to maintain your projects. See the following screen shot that shows the Add-In Overview section on the Add-In Editor:
The following describes each property on the Add-In Overview section:
An asterisk (*) on the Add-In Overview section, indicates that the property is required. The Name and Version properties are required, but as you continue to use the Add-In Editor, you will notice the asterisk is also used when setting other required properties for the types of add-ins that you define.
The Name, Company, Description, and Image properties are all used after your add-in project is deployed. For more information on this process, see How to deploy your add-in
The following screen shot shows how this metadata is used after your project is deployed. On the screen shot, the following values were added on the Add-In Overview section:
After these properties are completed and the project is deployed, you can view these properties on ArcMap's Add-In Manager (that is, the Name, Version, Company, Description, and Image properties). This information is useful, especially if there is more than one add-in project to choose from, or multiple versions of an add-in. See the following screen shot:

Creating different types of customizations

This topic showed how to create and set properties for an add-in project. The next step is to start creating your individual types of add-ins. The following refers you to topics that teach you how to create individual customizations:


See Also:

Understanding the config.xml




Development licensingDeployment licensing
ArcGIS for Desktop BasicArcGIS for Desktop Basic
ArcGIS for Desktop StandardArcGIS for Desktop Standard
ArcGIS for Desktop AdvancedArcGIS for Desktop Advanced