简体   繁体   English

Aptana Studio 3.3.1。 Javascript代码完成

[英]Aptana Studio 3.3.1. Javascript code completion

I'm new to Aptana and I've just started a project which nature is Web. 我是Aptana的新手,我刚刚开始了一个自然是Web的项目。

I have two issues with code completion, did some research online but didn't find the solution. 我有两个代码完成问题,在线做了一些研究,但没有找到解决方案。

1) I have this two lines of code. 1)我有两行代码。

         var script = document.createElement("script");
         script.type = "text/javascript";

I expect to have code completion in the second line when I type "script. ", and I have some suggestions. 当我输入“script。”时,我希望在第二行有代码完成,我有一些建议。 But I don't have suggested Script's attributes, in particular in this example the property "type" is not suggested. 但是我没有建议Script的属性,特别是在这个例子中没有建议属性“type”。

2) I cant' "Go to declaration" on "document" object or "createElement" function. 2)我不能在“文档”对象或“createElement”函数上“转到声明”。

I don't know if these are unsupported features of autocompletion or I'm missing something, maybe some configurations. 我不知道这些是不支持的自动完成功能还是我遗漏了一些东西,可能是一些配置。

Just to compare, I've both features working in RubyMine. 为了比较,我有两个功能在RubyMine中工作。

Thanks in advance ! 提前致谢 ! Rodo RODO

I am going to assume you are writing Javascript inside the HTML editor, because I think if you were editing in the Javascript Source editor you would not be having this problem. 我将假设您在HTML编辑器中编写Javascript,因为我认为如果您在Javascript源编辑器中进行编辑,则不会遇到此问题。 Assuming that you are unwilling or unable to separate your Javascript out into .js files, newbie answered a similar (the same?) question here with a patch that I have not tried. 假设你不愿意或无法将你的Javascript分成.js文件, 新手 在这里回答了一个类似的(相同的?)问题,我还没有尝试过补丁

So you have a couple of options (if my assumptions are right): 所以你有几个选择(如果我的假设是正确的):

* Use the Javascript Source editor (by right clicking and choosing Open With > Other)
* Try the patch

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM