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—Examines the process to create an ArcMap add-in project in Eclipse.
- Setting properties—Examines the properties that can be set for the add-in project with descriptions for each property.
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:
- Click the File menu, click New, then select Project. The New Project wizard appears.
- Click to expand the ESRI Templates node, click ArcGIS Extensions, then click Desktop.
- Select ArcMap Add-In Project. See the following screen shot:
- Click Next.
-
Type a name for the add-in project in the Project name text box.
-
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:
- Add-In view—Form based editor of the config.xml file that allows you to define properties for the add-in project and add-in types.
-
Source view—Source view that shows the raw XML code for the config.xml file.
See the following screen shot:
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:
-
Name*—Descriptive project name that encompasses all of the customizations that will be developed for this project (required).
-
Version*—Used to determine the add-in's deployment release number. By default, a value of 1.0 is used; however, when new versions of your projects are defined, you can update this value to 2.0. It is also possible to increase versions in decimal point increments (for example, 1.1, 1.2, 0.1, and so on). For more information, see, How to version your add-in for the workflow that defines how to version projects (required).
-
Company—Name of your organization (optional).
-
Description—Brief description to explain the project's purpose. This should be a description that encompasses all add-in types that will be developed for this project (optional).
-
Author—Name of the developer that created the project (optional).
-
Image—To use an image, create an Image folder within your Eclipse project, place the image into that folder, then use the Browse button to locate the image (optional).
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:
- How to create an add-in button
- How to create an add-in tool
- How to create an add-in combo box
- How to create an add-in toolbar
- How to create an add-in tool palette
- How to create an add-in menu
- How to create an add-in dockable window
- How to create an add-in application extension
See Also:
Understanding the config.xmlDevelopment licensing | Deployment licensing |
---|---|
ArcGIS for Desktop Basic | ArcGIS for Desktop Basic |
ArcGIS for Desktop Standard | ArcGIS for Desktop Standard |
ArcGIS for Desktop Advanced | ArcGIS for Desktop Advanced |