How to enable inline JavaScript autocomplete in Eclipse IDE with the Aptana extension

29,726

See if you can go to Window > Preferences > Javascript > Editor > Content Assist and ensuring that, under Auto-Activation, Enable Auto Activation Is checked.

That should automatically bring up Content Assist in blocks in html files.

Tested on Vanilla Eclipse PHP development install.

If that is still not working, try pressing CTRL + SPACE in the script block and see if content assist pops up. That is what should appear when Auto Activation is checked.

Share:
29,726

Related videos on Youtube

Rhyknowscerious
Author by

Rhyknowscerious

I love computers!

Updated on September 18, 2022

Comments

  • Rhyknowscerious
    Rhyknowscerious almost 2 years

    Background

    • I have Eclipse IDE.
    • I have installed the Aptana studio plugin for Eclipse.
    • I am editing an HTML file.
    • JavaScript auto-complete / content assist only works half of the time:
    • Eclipse won’t content assist my functions and variables between <script> tags.
    • But it will work for core JavaScript items.
    • I have searched the Eclipse help menu in the Eclipse program but that keeps getting indexing errors when I submit a search query.
    • I have checked the Eclipse site.
    • I have searched google.

    If Eclipse content assist works for user-created ids and classes in HTML and CSS, surely it can work for user-created JavaScript variables and functions, right?

    Unhelpful Findings

    1. I seem to have found a guide on how to enable javascript content assist for PHP files. But the problem is that I’m not using PHP. I’m using HTML so I can’t select the PHP Explorer View as this guide instructs.

    2. This guy seems to have the same problem - maybe. But he might just be typing in syntax errors with his javascript according to his example code (the capital D in getElementById...).

    3. Here’s one more. Under the heading JavaScript Content Assist Configuration, this guide says to go to Window | Preferences | Web | JavaScript | Editor | Content Assist. Problem is Window | Preferences | Web doesn’t even exist in my version of Eclipse

    Problem

    Does anybody know how to enable Eclipse’s JavaScript content assist in an html file between script tags for the functions and variables that I have created in the html file?

    • andyPaul
      andyPaul about 10 years
      Same with me, don't know who can help us with this.
    • Rhyknowscerious
      Rhyknowscerious about 10 years
      @andyPaul we're doomed.
    • Damian Nikodem
      Damian Nikodem over 9 years
      I have the exact opposite problem (and funnily enough I run netbeans), I only get auto-complete suggestions on my code, and basic constructs. document.get<pause> Returns nothing... Anybody have a little bit more reputation and want to start a bounty?
    • Admin
      Admin about 9 years
      Just a tidbit of info, Aptana was recently acquired by Appcelerator to most likely merge with their Titanium product. techcrunch.com/2011/01/18/… Just thought this might be relevant if it is a bug, as Aptana might be discontinued and there for no longer support bug fixes.
    • Sachith Muhandiram
      Sachith Muhandiram almost 9 years
      what about sublime text? most times it gives me good support.
    • MyNameWouldGoHere
      MyNameWouldGoHere almost 9 years
      I think this is sadly just an unfixable bug. You'd probably be better off just totally swapping software to Dreamweaver, Sublime Text, or another piece of software designed for web based project editing
  • udog
    udog about 8 years
    Solved it for me with Eclipse Mars.1
  • DavidHyogo
    DavidHyogo almost 6 years
    Solved it for me with Eclipse Photon