2

I've managed to enable jQuery support using this tutorial How to enable jQuery support in Aptana Studio 3 and using code completion with:

$. or $("p").add( ... 

works. But in my projects I need to use the nonconflict Version. So I added this:

<aliases>
    <alias name="$" type="jQuery"/>
    <alias name="jQuery" type="jQuery"/>
</aliases>

but this doesn't seem to work.

This tutorial http://wiki.appcelerator.org/display/tis/Using+JavaScript+Libraries says

Save it to your disk, and then drag it into your project. It does not matter where in the project it sits, so you can create a new folder for files like this if you like.

so I added a folder /source/support to fit my structure and add .sdocml files there.... but nothing seems to happen. So I'm not really sure if adding the file actually does something. Tried adding it a couple of times, but this doesn't seem to trigger anything.

Any clues?

Community
  • 1
  • 1
spankmaster79
  • 21,555
  • 10
  • 42
  • 73

2 Answers2

0

I can get both content assist working for both jQuery and $ by modifying some part of Aptana Studio source code. https://github.com/JockiHendry/aptanastudio-contentassist-patch. I'm using this sdocml: https://raw.github.com/JockiHendry/aptanastudio-contentassist-patch/master/jquery-1.8.3.sdocml.

jocki
  • 1,728
  • 16
  • 26
0

A couple things to verify:

  1. Is your project a Web Project? You can verify that by right-clicking your project, then by selecting "Properties...". In the Properties view, select "Project Natures". "Web" should be selected. You may want to make it the primary nature just to narrow things down
  2. You may want to force a clean build of your project. Select the Project menu and select "Clean...". In the dialog, make sure your project is selected or "Clean all projects". This will rebuild the index associated with your project.

You shouldn't need to add the jQuery alias. The jQuery symbol is available by default.

Also, I should mention that there is a 3.0.5 beta out that you can try. That release changes how libs are associated with projects. With that update, you will need to make sure that at least your javascript-jquery ruble is up to date (Commands->Bundle Development->Update User Bundles). You can then use the following steps:

  1. Right-click the project you want to associate with jQuery
  2. Select "Project Build Path". You should see jQuery entries for 1.4.2 and 1.6.2
  3. Select the version of jQuery you want to use in your project and close the dialog

At this point, if you have any old sdocml files in your project, you can remove those. Also, it's a good idea to remove the jquery JS file in project's index. You can do that by right-clicking the file, selecting "Indexing" then selecting "Exclude from Index".

HTH, Kevin

thelonious
  • 261
  • 1
  • 6