ArcGIS for JavaScript 开发智能提示

  开发如果没有智能提示,可想而知是一件多举痛苦的事情,好在Esri为Visual Studio 2010、Aptana3提供了一个插件,这样就使我们在使用ArcGIS API for Javascrip的时候获得了方便,可以大大节约开发时间 。 这个插件本质就是javascript文件,下载地址 :http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/#api_codeassist

  需要注意的是在Visual Studio 2010中dojo并不能智能提示,而Aptana和Visual Studio 2012 中对dojo则可以做到智能提示,如果对智能提示要求高的,可以采用Aptana和Visual Studio 2012作为开发环境。

 

Code Assist Plugins

A code assist provides information about the ArcGIS JavaScript API classes and their properties and methods from within an IDE. Starting from version 3.0, a VSDoc code assist is available for Microsoft Visual Studio 2010 and 2012RC. The code assist was created by utilizing the JavaScript XML Intellisense feature in Visual Studio, which offers dynamic class lists and tool tips when users are coding in Visual Studio or development enviroments that support VSDOC like Aptana.

Code assist offers the following features:

  • Auto-completion of source code
  • Summary of classes, constructors, properties, methods and globals
  • Parameter hits for constructors and methods

 

Visual Studio Installation Instructions

The VSDoc file is a JavaScript file (.js). You can enable the VSDoc in Visual Studio by following the steps below:

  1. Download the zip file that contains the VSDoc file for the version of the ArcGIS API for JavaScript you are using. 
  2. If working in an HTML file, add a script tag to add a reference to the code assist   
    <scripttype='text/javascript'src='path_to_vsdoc.js'></script>
  3. If working in a JavaScript file, add a reference directive to the VSDoc file:   
          /// <reference path="~/Scripts/esri-jsapi-vsdoc.js" />
        

For more information about using VSDoc files with Visual Studio, refer to Microsoft's JavaScript Intellisense MSDN article.
Note: Currently this VSDoc file is only supported with Visual Studio 2010 and Visual Studio 2012 RC. Visual Studio 2012 supports code assist for classes with multiple constructors but Visual Studio 2010 does not. So if you are using Visual Studio 2012 download the VS2012 version of the code assist.

 

Aptana 3 Installation Instructions

  1. Download the zip file that contains the VSDoc file for the version of the ArcGIS API for JavaScript you are using.
  2. Drag the VSDoc file into your Aptana project.

Downloads

posted @ 2013-06-27 16:02  沉默的猿  阅读(3256)  评论(0编辑  收藏  举报
AmazingCounters.com
给我写信