在MyEclipse8.6中设置jQuery自动提示

    MyEclipse8.6是目前J2EE开发中高版本的开发工具,比起一般的Eclipse她有更多的功能!毕竟是商业版本嘛,绝对J2EE是开发神器!

    但是MyEclipse8.6默认是没有开启jQuery提示的,怎样才能开启提示呢?

    我在网上查,发现很多人都是在Eclipse中安装Skept插件作为JQuery的编辑器,但是我按照网上的说法进行安装时却提示我不支持的的Eclipse版本。是不是我的版本太高了?我想MyEclipse8.6毕竟和普通的Eclipse不一样,肯定会有更多的功能。经过查了她的帮助文档,关于她的MyEclipse JavaScript editor有这么样的介绍(在MyEclipse JavaScript Development and Debugging Tutorial 中的介绍):

 

5.2 Editing JavaScript Files

The MyEclipse JavaScript Editor provides advanced language specific editing features such as:

  • OOP aware
  • Smart code assist for built-in and custom objects with browser compatibility details
  • Syntax highlighting
  • Validation and style checking
  • Outline view with content filtering and selection synchronization
  • Quick comment toggling

Setting up Context (Optional)
In order to setup additional context for content assist, in MyEclipse you can use the JavaScript library property page (right click Project > Properties > MyEclipse > JavaScript Libraries) to add libraries to your environment and additionally specify source folders. JavaScript files in these folders will parsed and added to the your JavaScript project's global scope. Objects, fields and methods defined in these files will be provided as options for content assist even when you may be editing another JavaScript file.

Note: Adding files to a source folder is only necessary if you need additional context for content assist. Content assist for elements within a given source file will be provided even if it is not part of the global scope.
In MyEclipse Web projects, the WebRoot folder is automatically setup as a source folder when the project is created, this can be easily changed to suit your needs.


Figure 5a: JavaScript Libraries property page


Figure 5b: Available runtime JavaScript libraries


Figure 6: Specifying a source folder
As can be seen in the above dialog, there are several different ways in which JavaScript resources can be added to your project's scope.

Browsing Code
The Script Explorer view provides a JavaScript centric view of your project. The Project Explorer will now show additional detail for all JavaScript objects contained in source folders.


Figure 7: Script and Project Explorer views

JavaScript Outline View
The outline view depicts a structured view of the functions and variables of a JavaScript Editor. The variables in the list filtered using the Hide Vars action in the view's toolbar.


Figure 8: Outline view

Press Ctrl + O while editing a JavaScript file to open the Quick Outline dialog allowing you to easily navigate through your code.


Figure 9: Quick Outline Dialog

Content Assist
To view JavaScript code-assist proposals place your cursor in a context for which a completion proposal is desired and then press the Ctrl+Space key combination. If code completion proposals are available they will be presented in a popup window.


Figure 10: JavaScript content-assist example

Quick Comment Toggle
To toggle on or off one or more single line comments select the region to comment and enter Ctrl+Shift+C .

 
Figure 11a: Mark region to comment


Figure 11b: Commented region after Ctrl+Shift+C

 

但是我却没在项目的properties中找到所谓的right click Project > Properties > MyEclipse > JavaScript Libraries

 但是,我发现了有一个Myeclipse>JavaScript>Build Path,里面有Libraries的选项卡,点击AddLibrary后,选择列表中的第一项“JavaScriptLibrary”,点击next,我们可以看到MyEclipse里面内置了三个库,是DOJO、JQUery和YUI。如果你要加入JQuery,只需勾选后点击Finish即可成功。如下图:

添加JavaScript库

内置三个库

 

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值