本文所提及的Web前端技术人员指的是为.Net平台网站做开发的前端研发或开发人员。如果你不对应.Net技术或者和Visual Studio并未谋面,可能没什么帮助。
Visual Studio是一个灰长强大的编辑器,但是如果用于CSS或者Javascript部分工作的开发工具,真的是在功能和效率上都不是最好的。而一般情况下Web前端的开发人员不需要面对太多的后台代码,所以尝试脱离VS用一种更理想的IDE是一个比较不错的尝试路径,而且在Assist Code For Javascript 或 CSS上,其它的IDE可能比起Visual Studio更有优势。
今天要尝试的工具是Eclipse,具体来说应该是其Eclipse For Javascript
1.安装Eclipse
这里有一点要注意的是,在选择安装Eclispe的时候,32位与64位倒是没有什么问题,但是为了能够正确的安装Aptana的插件,这里选择的Eclipse版本最好不要使用带有Web Tools的版本,否则在安装完Aptana以后会出现在CSS里的提示错误的成为HTML提示的问题,当然,如果不需要使用额外插件的话,可以直接使用Eclipse For Javascript Developer版本,详细的对比信息可以参考Eclispe的版本比较。推荐使用Eclispe Classic,虽然这个版本存在着一些问题,可能比较起来不如其它定制版本使用起来方便。
2.安装Aptana Studio 3.0 For Eclsipe Plugin
这个插件是一个非常强大的前端开发IDE,3.0版本发布后,反响很强烈,非常受推崇,不过具体使用起来如何应该还是看个人习惯,具体细节问题请到官方直接查询。
官方的安装方法如下:
Installing via Eclipse
Please copy the following Update Site URL to your clipboard and then follow the steps listed below to add this URL to your Available Software Sites list. Attempting to access this URL using your web browser will return an Access Denied error.
http://download.aptana.com/studio3/plugin/install
- From the Help menu, select Install New Software… to open the Install New Software dialog.
- Paste the URL for the update site into the Work With text box, and hit the Enter (or Return) key.
- In the populated table below, check the box next to the name of the plug-in, and then click the Next button.
- Click the Next button to go to the license page.
- Choose the option to accept the terms of the license agreement, and click the Finish button.
- You may need to restart Eclipse to continue.
安装方法不难,使用的是Eclipse通用的插件安装方法,不再赘述。因为这个插件是带有Ruby支持的,所以如果需要使用的话,还需要配置Ruby的支持环境,这个可以参考相关文章,Linux下的配置问题可以参考我的另一篇关于Linux下配置Ruby开发环境的文章。
3.安装Eclipse For Microsoft Team Foundation Server的支持(用于微软下的源代码管理)
这个可以支持Eclipse访问TFS的插件在微软的产品叫做Microsoft Visual Studio Team Explorer Everywhere 2010。
下载完成后使用的是Eclispe的离线插件安装模式。具体安装方法可以参考下载页面中的InstallTEE.htm中的安装方法,搬运如下:
- Open Eclipse.
Note These installation instructions assume that you have Eclipse 3.5. On other versions of Eclipse, the steps might have different menu items, but the process is the same.
- On the Help menu, click Install New Software.The Install dialog box appears.
- Click Add.The Add Site dialog box appears.
- In Name, type Local Team Explorer plug-in archive.
- Click Archive.
- Specify the location of the archive file on the product media of this procedure and click Open.You can find the archive file TFSEclipsePlugin-UpdateSiteArchive-10.0.0zip in the \PluginForEclipse folder on the product media.
You can also download the archive file from the following page on the Microsoft Web site: Microsoft Download Center.
- Click OK.
- In the list of features in the Install dialog box, select the check box that corresponds to Team Explorer Everywhere.
- Click Next two times.
- Accept the Microsoft Software License Terms, and then click Next.
- Select the Use a full-featured trial version of Microsoft Visual Studio Team Explorer Everywhere check box, and then click Finish.You must restart Eclipse when prompted.
序列号:7W3RJ-4WX3R-BV8JM-FC8P7
另:序列号的有效范围给我的感觉是跟你使用的Eclispe Workspace有关系,当Workspace变更时,会提示重新输入序列号。顺道鄙视一下连这个都要收费的微软……
Microsoft Visual Studio Team Explorer Everywhere 2010微软官方下载地址
题外话:
关于在Eclipse中访问现有.Net Solution的问题,因为在Eclipse中不会识别.Net的项目结构,因此,在Eclipse中,呈现出来的项目结构应该是纯文件夹的,但是你可以不变更原始的结构,这样可以在VS和Eclipse中都能够正常的访问。其实可以费点儿劲,在Eclipse中也建立正常的网站结构,然后使两个IDE的配置文件共存,不会冲突。不过静态文件本身其实就是文件夹,也不需要什么项目结构支持,所以,我觉得其实都是无所谓的。
还有一点:在同一TFS中,在VS中和Eclipse中的同步状态不是很及时,因此,建议在签入签出的时候不要跨平台操作文件。否则可能需要重启IDE解决同步问题。
