Aptana Studio 3.3.1. Javascript code completion
Asked Answered
G

1

3

I'm new to Aptana and I've just started a project which nature is 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.

         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. But I don't have suggested Script's attributes, in particular in this example the property "type" is not suggested.

2) I cant' "Go to declaration" on "document" object or "createElement" function.

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.

Thanks in advance ! Rodo

Galahad answered 8/2, 2013 at 3:22 Comment(0)
W
1

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. 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.

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
Wileywilfong answered 8/2, 2013 at 17:1 Comment(6)
Thank you for your answer. I'm using Javascript source editor. Notice that as I said before I have some suggestions, but the support for code completion seems to be not as complete as could be. I guess if you try the both lines of code I supply you shouldn't see that attribute (type) suggested. Please let me know. Thank you.Galahad
Apologies, I was trying .js files in the Javascript editor which do appear to have complete code assist. The 'type' attribute you mention does come up for me when I type the code you provided, regardless of whether I use the HTML editor or the Javascript Source Editor.Wileywilfong
Are we using the same version ? I'm with Aptana Studio 3.3.1, standalone. I've tried it on my Macbookpro and also in a linux box without success. Thank you.Galahad
I am also on 3.3.1 standalone, but I am running on Windows Vista (...). I wouldn't think the OS would make a difference... I take it you don't see 'getElementById' in the list when you type document. into a .js file?Wileywilfong
I see the getElementById when I type document.. As far as I can see Aptana suggest to me a lot of options, but not Script's element options, like srcor type. I can tell you that Aptana suggest me options from HTMLElement (generic), Node and Objetc, but not from the specific element I've just created (script or input for example)Galahad
Code Assist fails to show objects methods and properties in context. SnapshotRendition

© 2022 - 2024 — McMap. All rights reserved.