I am trying to use Tern Eclipse IDE in a static web project. Alas, I'm not able to configure it to validate javascript in script tags in .html files. Is this even supported? Is there any doc how to do it?
Related
I have just installed this eclipse plugin. But I found it can neither show a list of functions when typing '.', nor use templates like 'if...else...'.
Read http://www.nodeclipse.org/ carefully
Features Creating default structure for New Node
Project and New Node Source File Generating Express project
with Wizard JavaScript Syntax highlighting Bracket
matching and marking selection occurences with background color
Content Assistant within one file Go to definition with
Ctrl+click when JSDoc is
used Refactoring within one file
(Alt+Shift+R) JSON files highlight and
validation NPM support Debugging - Breakpoint,
Trace, Variables, Expressions, etc... via Eclipse debugger plugin for
V8 Setting project properties for JSHint-Eclipse
automatically; JSHint
settings template
Passing arguments to Node application and Node.js,
specifying environment variables values to use Running
CoffeeScript *.coffee files Running *.js files with
PhantomJS, MongoDB Shell or Java 8 Nashorn jjs util
Bundled together with Markdown Editor, GitHub Flavored Markdown,
StartExplorer (for system explorer and shell), RegEx, Icon Editor,
MongoDB, RestClient Tool and other plugins (20+ in total, check
update site and Nodeclispe Plugin
List) Support for Eclipse Juno, Kepler, Luna M3
As of 0.7 completion work as standard JSDT functionality, that is
for objects defined in the same class,
for objects annotated with with JSDoc
If you want more, do it yourself with help from the other people.
I suggest you that you install tern.java which uses the powerful JavaScript inference engine tern.js. You have a node.js module which provides node.js completion. As Nodeclipse editor is based on JSDT, you can use it with tern.
I have this project that contains some HTML templates in src/webapp. Those templates have freemarker placeholders like
<# something %>
which make Eclipse complain about unclosed tags.
Is there anything that I could configure in M2E plugin to instruct Eclipse to skip validation of those files?
Try to uncheck some html validations in eclipse using this:
Window > Preferences > Validation
Using the Eclipse keybinding Shift-Ctrl+F (Format) in Python (with help from PyDev), Javascript or plain HTML files works as expected.
Jinja2 templates however, become a mess. Is there a solution to solve or easily work around this?
As Jinja2 seems very close to Django templates, it may be worth using the Django templates editor (it's distributed along with Aptana Studio 3 -- you just have to change the file association to open html files with that editor in the file association).
Actually we have freemarker files (ftl) under Eclipse + Freemarker plugin (from JBoss).
Do you know a way to format ftl files ?
Thanks
For ftl files that represent HTML configuring eclipse to open the HTML Editor works nicely. The HTML Editor has formatting capability as asked for. Todo configure eclipse to open ftl files with the HTML Editor you can use "open with" and there you'll get offered to link the HTML Editor permanently to the ftl extension:
In the Content Types Preferences Page you can than actually add the *.ftl extension:
I looked for a formatting tool a few months ago and I was unable to find any such tools. To my knowledge there no such tools currently available, just the syntax highlighting you mentioned.
Associated the ftl file extension with your web page editor (assuming you have wtp already installed).
An old question. I had the same problem for some time now, the default html editor contains some irritating features when working on freemarker templates, especially when using the bracket syntax.
Aptana studio eclipse plugin solves most of the problems:
http://www.aptana.com/products/studio3/download
I'm using NetBeans for PHP. When I edit a .js file, it gives me JavaScript code completion. How can I get it to also give me jQuery code completion?
NetBeans 6.9 code auto-complete is not working for jQuery plug-ins.
The code auto-complete is working for jQuery but not for plug-ins such as the validate plugin.
Is this a bug in NetBeans 6.9?
Try this
http://netbeans.org/kb/docs/web/js-toolkits-jquery.html
or
You can also try following
http://forums.netbeans.org/topic15076.html
I add jquery.js to include path of project and it's working fine for me.
I was having the same problem. I have Netbeans 7.2.1 under linux (in an Oracle VirtualBox).
I had copied the jquery library 1.10.2 (not minified) into my own project
I had added the path into the Project Properties > PHP Include path
I still had no auto-complete
I found a solution based on How to include js file in another js file?
I type out the following in the header:
var imported = document.createElement('script');
imported.src = 'jquery-1.10.2.js'; // I put the jquery library in the same folder
document.head.appendChild(imported);
Now I get auto-completion!