Code insertion options


This feature is no longer available. It was removed for the 10.3 release of the ArcObjects .NET SDK.
Summary
The ArcGIS Snippet Finder enables Visual Studio developers to customize components of the ArcGIS snippet inserted into the code editor. This topic describes the various options available to help you develop with your preferred coding style.

In this topic

  • Setting code insertion options
    • Preferences dialog box
    • Insertion preferences

Setting code insertion options

To set code insertion criteria, click Tools and click Options on the Snippet Finder to access the Preferences dialog box. See the following screen shot:

Preferences dialog box

On the Preferences dialog box, click the Insertion node. See the following screen shot:

Insertion preferences

The following explains the Insertion preferences:
  • Enclose ArcGIS Snippet within #region (C#) or #Region (VB.Net) statements—This option (selected by default) encapsulates all inserted text in Visual Studio's code editor in a region block of code. See the following screen shot:


    • Click the plus sign symbol (+) to expand region blocks of code. See the following screen shot of an expanded region:


    • Click the minus sign symbol (-) to collapse region blocks of code. See the following screen shot of a collapsed region:


  • Add all necessary References (i.e., Assemblies) to the project—This option (selected by default) automatically adds to your project the necessary assemblies for the ArcGIS snippet to run. See the following screen shot:



    The following screen shot shows references added in the project:


  • Include XML code documentation—This option (selected by default) adds programmer Extensible Markup Language (XML) documentation for the ArcGIS snippet in Visual Studio's code editor. XML comments use the .NET standard three forward slashes (///) for C# and three single quotation marks (''') for Visual Basic .NET comments. XML documentation is recognized by the Object Browser and IntelliSense of Visual Studio. See the following screen shot:



    The following screen shot shows XML comment code in the code editor:


  • Coding style—This section includes choices for how ArcGIS snippet code displays in Visual Studio's code editor. See the following screen shot:


    • Use fully qualified variable syntax—This indicates (not selected by default) the long form of coding is used. All variables use the fully qualified assembly name as part of the coding syntax. If this option is not selected, the using (C#) or Imports (VB .NET) statements are not added to the top of the project. See the following screen shot:


    • Use using (C#) or Imports (VB .Net) statements and shortened variable syntax—This option (selected by default) indicates that the shortened form of coding is used. All variables use the minimum necessary part of coding syntax. The using (C#) or Imports (VB .NET) statements are added to the top of the project, and the compiler automatically interprets which objects belong to which assemblies. See the following screen shot:


  • Additional comments—This section (by default, all options are not selected) allows additional programmer comments and provides the necessary software requirements to use the snippet. Comments are useful to determine if a snippet is needed and provide help when viewing the Snippet text area on the ArcGIS Snippet Finder. See the following screen shot:


All customizations that are used by the ArcGIS Snippet Finder through the Tools menu Options selection are stored on disk in an XML file named ArcGISSnippetPreferences9.xml. This XML file controls the behavior of the ArcGIS Snippet Finder. The following is the location on disk for this XML file:
  • %APPDATA%\ESRI\ArcGISSnippets\Settings\ArcGISSnippetPreferences9.xml
If the ArcGISSnippetPreferences9.xml is deleted, it will be re-created with default settings the next time the ArcGIS Snippet Finder is used.


See Also:

ArcGIS Snippet Finder
Refining searches
Adding user-specified directories
ArcGIS Snippet Editor




Additional Requirements
  • Use display settings of 96 dots per inch (dpi) when using the ArcGIS Snippet Finder and ArcGIS Snippet Editor.

Development 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
Engine Developer Kit Engine