jQuery Autocompletion with Eclipse Juno Java EE - javascript

I've read several DATED information on how to enable jQuery (specially auto completion) support for Eclipse. Either using Aptana or other plugins.
I've tried Aptana 3 version plugin, but I get nothing but problems.
Can someone please explain on how to achieve this?
Maybe nowadays there are better options from Aptana.
Tried with Eclipse Indigo and Helios, and still Aptana Web tools pkg. does not work.

I got the jQuery code completion in Juno. Just follow the following steps:
1) Install the JSDT jQuery Integration plugin
2) Go to Project Explorer--> JavaScript Resources
3) Right click on it and go to properties.
4) Select "Add JavaScript library"
5) Select "jQuery Library"
6) You will get code completion as follows
Enjoy.

Much simpler thanks to logic8 comment is to add it from
help > Install new software
and enter http://svn.codespot.com/a/eclipselabs.org/jsdt-jquery/updatesite
Tada!!

I have used https://marketplace.eclipse.org/content/angularjs-eclipse
Once you install this you can right click on your project , Configure to Angularjs project ,
And that's it.

There is just something I have not seen anyone say.
If you already have a ready project, but when you created it did not using a javascript project, then you must convert your existing project.
Keep calm, because this conversion will not harm your existing project.
Right click on your project > Configure > Convert to javascript project
Ready! Now you can follow the step by step our friend up here did.
I believe this can really help beginners like me.

Related

Is there any way to get "good" Autocompletion in VS Code?

I recently tried PhpStorm and it's great especially with the completion.
When I Ctrl + Space (mac) I get suggestions that actually exist, like when I'm in a JS file and my project has jQuery I get Element Suggestions when typing $("#.
But in VS Code it feels like all suggestions come from AI and aren't even based on what is present in my project.
EDIT: Because I have difficulties describing what I mean I uploaded this video to help you understand my problem
Is there any way to get similar behavior in VS Code?
Yes, there is a way to improve IDE suggestions, and that is by installing extensions for the particular programming language that you use.
So, based on the tags you added for your question, for PHP, you can install "PHP Intelephense", for jQuery you can install "jQuery Code Snippets" and for HTML install "HTML CSS Support".
You can very easily install all 3 extensions by clicking on the "Extensions" option on the left hand side of the IDE (little cubes).

NetBeans IDE no autocomplete due to JSX parsing error [duplicate]

I've just downloaded Netbeans 8.1 for PHP. Based on https://netbeans.org/bugzilla/show_bug.cgi?id=250288 , it appears that there is no native ReactJS/JSX support. Is anyone using this for react. Are there any workarounds? I'm been using Netbeans for years and would hate to have to move to a different IDE.
Well, i'm a Netbeans user too, but because of needs like this, i've switched myself from Netbeans to Sublime (first) and now to Atom for Frontend development and honestly, the workflow is great. I use ReactJS, AngularJS and VueJS, and for all of this Atom fits my needs.
Atom uses packages (like plugins) to support all of this, here's what i use for React:
Atom (https://atom.io/)
React Package (https://atom.io/packages/react)
The package adds:
Syntax highlighting
Snippets
Automatic indentation and folding
JSX Reformatting
HTML to JSX conversion
Autocomplete
Something important to remember is that sometimes Atom uses the wrong syntax highlight for some reason, so, in JSX files just click in the bottom right corner (next to the encoding) and you can select your filetype there (for ReactJS, should be Javascript(JSX)) and everything should be fine :)
I invite you to try it, its a great experience and for backend development (in my case, PHP) Netbeans is way better, from a lot of benefits that in frontend you might not need (the most to me is think is "Go to declaration", which in frontend i don't have/need).
If you want to know what other packages i use that might help you in frontend development just let me know and i'll update this post :)
Good luck!
Try this:
https://blogs.oracle.com/geertjan/entry/react_js_and_netbeans_ide1
It's still in early development but it should do the job.
Support for ReactJS is now included in Netbeans 8.2
source (last post):
https://netbeans.org/bugzilla/show_bug.cgi?id=250778
I personally don't find it satisfactory yet, which brought me to this question....

How can I reverse engineer my JavaScript files with js/uml?

Goal
My goal is to get an UML model out of my JavaScript project (consisting of several .js files) and store it as XMI.
How far I've come
I searched the internet and found out js/uml is the first place to go.
I've managed it to get the js/uml plugin running with Eclipse 3.7.1 (Win32) and a local installation of my pre-downloaded additional plugins:
mdt-uml2tools-Update-incubation-I201103290512.zip (installs required org.eclipse.uml2.diagram.clazz 0.10.0)
jsuml-eclipse-0.8.4.zip (only works with Eclipse 3.7.1 (Indigo))
I loaded the provided example project jsuml-example-yui-0.8.4.zip into Eclipse and added all my .js files to this project also.
Problem
Now I'm stuck and do not get it how to call the reverse engineering of my .js files. I can call 'New'->'Other'->'UML 2.1 Diagrams'->'Class Diagram' from the project's context menu, but I don't get the following steps of that assistant dialog, nor do I get it if this is the right way at all. Please, could you help me with an easy understandable click tutorial? The js/uml homepage does not explain it well enough IMHO. Thanks for your help in advance.
Someone adapted UML for web artifact, its called the "WAE" extension of UML. This way you can see not only your javascript files but the html and css. If you work with node.js, i created a module that generate class diagram for javascript/node/html/css. Its called wavi. For javascript, function,variable are automatically recognized. You can use it for documenting your application.
https://www.npmjs.org/package/wavi
Well, I think I have come quite close.
There's a command-line tool called Code2Flow. which uses GaphViz to generate graphs for Python and JavaScript sources.
I tried it, it does generate the graphs but somehow i can't make to do right.
I hope this will help you or someone.

Autocomplete in Aptana

I am using Aptana studio 3 for web programming. Also I use jQuery for the same purpose. The problem is with the autocomplete in Aptana. For instance I am getting this:
$('div').click(function() {
${0:
\}});
Instead of this:
$('div').click(function() {
});
Maybe there is some way to change it (the same happens with other jquery aoutocomplete options).
Thanks!
I had a similar thing happening when trying to type $.ajax... Aptana would insert Array(...
I discovered I needed to install the jQuery bundle!
Open the commands menu > bundle development > install bundle
In the "select bundle to install" window, choose jQuery and hit OK. That's it! You may need to restart Aptana.
Hope this helps.
Try to use latest vsdoc file and use it for code completion. The latest one could be found here. Also please check following related question.
I don't know if this will work for you, but you can try it if you're only using JavaScript and jQuery. https://github.com/JockiHendry/aptanastudio-contentassist-patch

jQuery code assist in Aptana Studio 3.1.1

This is not duplicate question because lots of things changed in Aptana Studio 3.1.1 and there is no question regardnig that version.
I would like to have code assist for jQuery in Aptana Studio.
I already installed jQuery bundle. But I still don't get any code assist for my code.
I type for example:
$("div#chat").
After typing dot I should see list of all jQuery functions. But I don't see anything.
What I have to do to fix it?
It works for me as expected using the directions here:
Commands > Install Bundle > jQuery
Right click on a project, select Properties > Project Build Path and select the checkbox for jQuery 1.6.2.
If you don't do the second part, you'll just get snippets. This prevents you from needing to copy it into every project.
Got it fixed.
If you want to have code hinting for jquery you need to download (uncompressed) jQuery library and place it in the same folder as your script.
This is working but it is not satisfying me. I have many folders and I don't want to duplicate jQuery file over all folders.

Categories

Resources