Handlebars js editor. - eclipse

Lately I have started to explore Ember.js, from their site I understood that there is a good synergy between Ember and Handlebars language.
I wondered if there is any editor (plugin) that can help me with handlebars auto-completion and coloring.

If you are using handlebars as .hbs files (no script tag) you can enable syntax highlight by configuring 2 settings: the editor and content types:
Eclipse -> Preferences -> General -> Content_Types
add *.hbs under html
Eclipse -> Preferences -> General -> Editor -> File Associations
Add *.hbs to html editor.
Close the editor and re-open it
[optional] If still not highlight (old eclipse versions) restart eclipse.
This works for aptana and zend studio as well

If you use Sublime Text 2, there is a great Handlebars package for syntax highlighting, etc.
https://github.com/nrw/sublime-text-handlebars
TextMate version:
https://github.com/drnic/Handlebars.tmbundle
It can be installed manually or with the Sublime Text 2 package manager.

IntelliJ IDEA (an alternative to Eclipse) has a handlebars plug-in. For Emblem, a Haml-like version of Handlebars, the nearest plug-in would be Slim.

Related

No JavaScript syntax highlighting in Eclipse 2020-09

I just upgraded to Eclipse 2020-09 (4.17.0) from Eclipse Luna. After installing, I installed Eclipse Web Developer Tools 3.19 from the Marketplace, then restarted Eclipse. When I open a .js file, there is no syntax highlighting. It was fine out of the box with Luna, so is there anything extra that I need to configure in 2020-09? File associations for *.js shows this:
It seems JavaScript files (*.js) have been associated with the plain text editor instead of the Generic Text Editor by mistake (please make sure it has been reported to Eclipse).
Right-click the file and choose Open With > Generic Text Editor.
Or better, associate all *.js files with the Generic Text Editor by right-click a *.js file, choose Open With > Other..., select the Generic Text Editor in the list and tick the Use it for all '.js' files* checkbox at the bottom (as shown in my video here).
Yes, you need to install the Wild Web Developer feature so that it provides that functionality through the Generic Text Editor.

Autocomplete not working with Eclipse Oxygen Javascript project

I'm using Eclipse Oxygen (4.7) with the Eclipse Web Tools Platform installed on Ubuntu 16.04.3. Auto-completion of variables and functions only works provided that the variable or function is local to the file that I'm currently working on. Auto-completion attempts using Ctrl-Space for variables and functions that are located outside the current file result in the dialog with No Default Proposals. Also, auto-completion for var/funcs within the current file are case sensitive, otherwise no proposals are displayed (a problem that I didn't have with previous versions of eclipse).
My project is a JS project and I am using the JS perspective. Under the Source files and folder in the global scope section of the Include Path of my project, the source tab shows Included: (All). Is there something else I need to do?
As a side note, I can't correctly configure the syntax highlighting for Javascript source files successfully. Certain things work fine, but others (like local variables) refuse to use the color that I've selected. Are these all bugs?
NOTE: I'm using the Darkest Dark eclipse theme. I don't know if that has any impact on auto-completion (but seems likely it would for syntax high-lighting).
I had the same problem in Eclipse Oxygen using Ubuntu 18.03, and I fixed it doing next:
Go to Window -> Preference -> Javascript -> Editor -> Content Assist -> Advanced and put the configuration like this one
After that I was able to autocomplete Javascript code.

How to activate syntax highlighting for CoffeeScript in Eclipse?

I'm running an Eclipse Luna. Additionally I installed Nodeclipse.17.plus via the marketplace and checked all provied tools. This also includes the Nodeclipse Coffee-Script viewer:
CoffeeScript Editor let's you edit *.coffee files with some advanced features.
Highlights include
- syntax highlighting
- variable autocompletion in the current namespace
- correct autoindent
Additionally I activated XText Nature for that project.
But there is still no syntax highlighting for *.coffee-files.
Have I done anything wrong? (By the way, the Nodeclipse EditBox is working, but it is not sufficient to make CoffeeScript readable for me)
The Nodeclipse CoffeeScript Viewer seems to be installed:
But it does not appear in the List of internal editors:
I'm afraid that there is no satisfactory answer to your question.
On http://marketplace.eclipse.org/content/nodeclipse-coffeescript-viewer-editor-eclipse-431 it says:
There is problem since Eclipse 4.3.1 release https://github.com/Nodeclipse/coffeescript-eclipse/issues/19
Get 4.3.0, e.g. as Enide Studio 0.5.x http://marketplace.eclipse.org/content/enide-studio
Help us if you know Eclipse XTEXT.
and
We were looking for new owner familiar with XText technology.
To me it seems, that there are profound problems with this plugin.
I also had the problems with a missing entry in the list of internal editors after installing nodeclipse. I simply removed the plugin and reinstalled it. But than I ran into those XText-problems
and finally gave up,...
This plugin for Coffeescript in Eclipse is a little buggy but maybe you could try it - https://github.com/adamschmideg/coffeescript-eclipse/
Installation steps are given in the README.
Try this
1.Open "Window" -> "Preferences" -> Expand "General" and "Editors" -> Click on "File Associations" -> "File types:". Add ".coffee" to the list if it does not appear.
2.Look for "Associated editors:" in your "File Associations" dialog then click "Add"
3.Select "Internal editors"
4.Select "Coffee-Script Viewer". Click "OK" then "OK"
Eclipse Pluging For Coffee Script

Mark occurrences for JSP and Scriptlets is not working in Eclipse

I am not able to highlight the matching variables in JSP and scriptlets. I have already tried
Window -> Preferences -> Java -> Editor -> Mark Occurrences
and
Preferences > General > Editors > Text Editors > Annotations.
These are not working.
Is there any way I can highlight the matching variables in JSP and scriplets?
I am using Eclipse Java EE IDE for Web Developers.
Version: Luna Release (4.4.0)
Thanks a lot in advance.
Thanks & Regards,
Archana
It appears that JSP files are opened in Eclipse using their own 'editor' distinct from the Java editor. Its settings are located under Window -> Preferences -> Web -> JSP Files -> Editor, but unfortunately it appears to lack the 'mark occurrences' feature found in the editors for Java and some other languages.
There's an answer to another question on here with information on how to implement 'mark occurrences' in an editor (pointing to Source viewers and annotations in the Eclipse developers guide), but I couldn't even find a bug in the Eclipse JSP 'product' requesting the feature. It's open-source, though, so of course anyone is welcome to contribute that functionality!
It doesn't accomplish quite the same thing (lacking the intelligence to restrict scope), but you can get a rough approximation of this functionality by selecting your variable/method/text and using the generic Source -> Occurrences in File feature.

Format freemarker files in Eclipse

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