Eclipse completion proposals about external javascript libraries - eclipse

I'm trying to develop a javascript project with eclipse. I created a JavaScript Project and I added many external JS libraries (Right click on Project --> JavaScript --> Include Path --> Add JavaScript Library ...). After this, I expected completion proposals (what is obtained with CTRL + space, just to be clear) during the development of the script in my HTML page about my external libraries, but I have no suggestions. Anyone can help me?

If you wish to have powerful JavaScript completion inside Eclipse, I suggest you that you install tern.java (disclaimer, I'm the author of tern.java). It support several JavaScript frameworks like jQuery, node, RequireJS, Angular.

Related

How to add Jasmine autocomplete to WebStorm 7.0

I search around the net but did't find a concrete answer. Please help - How to add Jasmine autocomplete to WebStorm?
Here's the step-by-step process for adding library definitions, which are provided courtesy of borisyankov/DefinitelyTyped at GitHub.
In WebStorm, open the Settings dialog (File > Settings).
Under the Project Settings category, navigate to JavaScript > Libraries.
Click the Download button on the right side. This opens the Download Library dialog.
Select "TypeScript community stubs" from the combo box.
Find the library you're looking for, select it and click Download and Install.
To restrict usage of a library definition to specific files/folders, use the Manage Scopes dialog. In your case, you might consider it appropriate to only show Jasmine autocomplete in your test spec folder.
NOTE: Even though the dialog is named Download Library, this process is only for downloading the definition of the library (method signatures, types, etc). You still need to download the actual library yourself to use it.
You have to download jasmine.js and configure it as a library (Settings/javaScript/Libraries, Add...)

How do I use angular.js with jsdt-jquery?

In https://stackoverflow.com/questions/12989859/what-is-the-best-ide-for-angularjs
Tonte Pouncil mentioned that it's possible to add angular.js as a library in jsdt-jquery. How does one go about doing this? thanks!
If you install https://github.com/angelozerr/angularjs-eclipse, you will benefit from
AngularjS features, in other words completion, hyperlink in HTML editor and Javascript editor.
jQuery completion because AngularJS Eclipse is based on the Javascript Inference engine tern.js.
Actually it is possible to add libraries to JSDT as well. I am not aware of such libraries. But there is angularjs-eclipse Eclipse plugin, see https://github.com/angelozerr/angularjs-eclipse

how to add my own templates to eclipse in play! framework editor

I've noticed that the play plugin for eclipse adds a play editor,
along with several useful templates
I'd like to add my own ones, but I couldn't find the way to do it
I go to window, preferences, web, html files, templates and I can add
templates to eclipse html editor, but I couldn't find a similar option
for play editor
Check out the source code for the play plugin :
https://github.com/playframework/playclipse/tree/master/source/templates
You might want to fork it and add your templates to that file. That is what I would do. But I do not have enough Eclipse development knowledge to help you further than point the direction.
I had a lok at the source, it seems like the template editor tags are defined here
https://github.com/playframework/playclipse/blob/master/source/src/org/playframework/playclipse/editors/html/HTMLEditor.java
looks like there's no support for creating your own templates thru eclipse...

How to extend netbeans javascript editor content assist to view Rhino accessible entities

I have introduced a Rhino-based scripting language. In this language, by its nature of course, it is legal to write something like:
var y = new org.mypackage.JavaClass();
print(y.javaMethodReturnsString());
Which means I'm mixing Java entities and Javascript entites.
I wish to make a netbeans editor plugin for my new language. This editor must feature content assist.
Now, the javascript entites appear in the javascript editor content assist by default.
I guess I can extend the netbeans javascript editor, but how? Which class is it?
Then, how do I extend the content assist scope with the java entities?
Or maybe I should make my own editor and "import" java and javascript content assist behavior? But again, how?
Thank you
EDIT: to have the java entities in the classpath, I followed this blog post :
Java Classes in Code Completion
by the way, this works only if edited document is in a source folder.
Still remains open the question about extending javascript editor. Anyone?
Even if this question was worth the Tumbleweed achievement, I found a solution myself. I've written a netbeans module to handle content assist on Rhino scripts. It's in early development and it's my first netbeans plugin but should be better than nothing.
The plugin can be turned on/off for javascript files and can be class-extended to suit any rhino-interpreted languages, which is the next thing I'm into.
Javascript Rhino context plugin

Eclipse plugins for working with Apache Wicket projects

Are there any widely adopted, currently maintained Eclipse plugins for working with Apache Wicket projects? If so, where are they? Who maintains them? What do they do?
Take a look at Qwickie (eclipse plugin): https://github.com/count-negative/qwickie
The standard used to be wicket bench, but it has been discontinued and you can find a fork named stump.
I don't know stump, but wicket bench mainly had a refactoring listener (if you rename a java class, the HTML is also renamed) and some wizards (create a Panel with associated markup etc).
I haven't used bench in years, as it was rather buggy in newer eclipse versions. But I have made pretty good experiences using a custom set of eclipse HTML templates that you can download from this location: http://www.wicket-praxis.de/blog/wp-content/uploads/2010/01/wicket-template.xml
(German) description on this page: http://www.wicket-praxis.de/blog/download/
You can install these as HTML Code Templates in Eclipse:
Window -> Preferences -> Web -> HTML Files -> Editor -> Templates -> Import...
and that will enable wicket-specific template shortcuts in the HTML editor.
It's too bad you don't use IntelliJ IDEA. It has an excellent plugin called WicketForge.
Not right on the question, but not completely off it, either.
I have released a tool that can be used as an eclipse save action. It generates Java interfaces with constants for ids in wicket templates and resource keys from translation files, so that you don't need to use strings for component ids and translation keys, but can use these generated constants.
It can be integrated in eclipse quite simply as an annotation processor. After a save of a component the interfaces will be generated and built. See its readme:
https://github.com/neurolabs/wicket-id-bindings-generator
I'm maintaining it on github (feel free to fork/contribute) and am using it in all of my wicket projects.