How to activate syntax highlighting for CoffeeScript in Eclipse? - 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

Related

Add ttcn3 syntax highlighting to eclipse

I don't work with ttcn3 full-time, what I need is just basic syntax highlighting and commenting on Ctrl+/ added to eclipse.
After some googling I discovered Eclipse Titan, but it seems to be a full-blown IDE for ttcn3 with compiler and stuff, and I need just a plugin to eclipse.
I would like to find something like "Set syntax: ttcn3" from SublimeText, is it possible in eclipse?
if you go to this link:
https://projects.eclipse.org/projects/tools.titan/downloads
you will find that you can download the Titan plugins for Eclipse (today they look like this):
Eclipse plug-ins 6.2.0
You may want to install them in your current Eclipse and find out if that is what you are after.
Gustavo.
After installing the plugin
1.change the nature of your ttcn project for "TITAN Nature" this way:
Project popup>Properties>Project Natures>Add...>TITAN Nature.
(if this is not enough:)
2.Select Window>Preferences>TITAN Preferences>On-the-fly checker>Enable parsing of TTCN-3, ASN.1 and runtime configuration files
(You can also set perspective TITAN Editing/Titan Executing/TITAN Log Viewer)

Java code completion in Eclipse IDE

A few years ago i set up my first Eclipse IDE env at work to begin studying the language. As i remember, it was some Luna build and it had a specific and really addictive code completion, which understood skipping some letters... like "p l n" would find "println".
Now i'w installed Mars build(the Luna's one has gone with the past harddrive), and cant find this option. Some code completion works, but it looks only by the current character.
Could someone tell me where to look.
Eclipse does understand skipping some letters in code complete, for example, if I have:
System.out.pln
with my cursor after the n and I press Ctrl+Space I am presented with all the println choices:
If it is not working for you I suspect that you don't have Code Recommenders installed or enabled. It should come by default with Eclipse IDE for Java Developers.
To check to see if it is installed and enabled, in Preferences, choose Java -> Editor -> Code Assist -> Advanced and see if Java Proposals (Code Recommenders) is listed and checked:
If it is not installed, install it from the Mars update site:
From Help menu, choose Install New Software
Choose Work With: as Mars - http://download.eclipse.org/releases/mars . from the drop-down list.
Choose Code Recommenders for Java Developers from the list. You may need to uncheck Group items by category to find it.
Complete the wizard, restart, check setting about and away you go.
In Eclipse just press ctrl + space bar. to auto code completion

Eclipse Indigo "Save Actions" are not being applied

I'm new to Eclipse and downloaded the following version:
Eclipse Java EE IDE for Web Developers.
Version: Indigo Release
Build id: 20110615-0604
[edit] Eclipse Platform Version 3.7
I have edited Java > Editor > Save Actions to do the following: Remove trailing white spaces on all lines, Correct indentation
When I save the .java file, those actions are not applied... is this a bug?
Found this that might be related: https://bugs.eclipse.org/bugs/show_bug.cgi?id=350475
Assuming that this relates to JavaScript files, then the related Eclipse bug could be helpful.
The problem (as I've just experienced) is that you can edit the JavaScript -> Save Actions preferences via the context menu when editing a JavaScript file, but the actions will not be run.
The solution is to right click on the project containing the .js file, and select Configure -> Convert to JavaScript project.
The bad news is that this will then will also enable Eclipse's not-so-great JavaScript validation, therefore telling you that libraries such as moment.min.js are broken.
Well for those of you who have found this topic... I did find 2 solutions, no thanks to Eclipse, other than the fact that it is open source and people can write plugins.
Eclipse Platform Version 3.7
AnyEdit - plugin that does it for you when you Save file (I believe this is what eclipse SHOULD be doing)
Go to: Window > Preferences. Then under General > Keys. Make sure drop down for Scheme: is Default and enter 'remove trailing' in the filter. You should then see "Remove Trailing Whitespace" under the command column. Bind it to your own key command.
The only drawback to #2 is that you have to actually press the key binding while editing the file, kindof like a cleanup action.
Too bad Eclipse hasn't taken the approach that ALL file types should be configurable in this way... sometimes I miss TextPad.
Old question, but at least for newer Eclipse versions there's a better solution: Go to the project properties, then to Project Facets. If it tells you that your project isn't in faceted form yet, then convert it. Afterwards (or if it already was faceted), just enable the JavaScript checkbox.
I had the same issue with Eclipse 4.4 (Luna) and this fixed it for me, the save actions are now executed on save.
Adding to jlh's answer, I also had to configure the JavaScript include path of the project to enable save actions. Before that even a manual "Clean Up ..." from the source menu wouldn't work.

Highlight .tpl syntax in Eclipse

I've been googling and can't find a solution for this. I'm trying to setup .tpl files to use either HTML syntax highlighting or PHP syntax highlighting. Has anyone does this, or do you know how?
Thanks
Go to Window -> Preferences-
Then General -> Editors -> File Associations-
Add the PHP Editor to the *.tpl file type. You may have to create the *.tpl type if it doesn't already exist.
You may also have to set the content type for your tpl files in Content Types also under the General settings. Scroll down to PHP Source File and make sure *.tpl exists there as well.
Then you need to restart eclipse to make it work.
Go to Window -> Preferences -> General -> Content Types
Select Text -> CSS, click Add, write *.tpl and save.
Do the step two for Text -> HTML, Javascript and PHP.
I took that from this link. You can get that form there or I give their content below if the anyhow that link doesn't work. It works for me nicely.
steps how to install SmartyPDT 0.9.1
Be sure that the .TPL files are not associated with any content type (file type). In Eclipse,
Be sure that the .TPL files are not associated with any content type (file type). In Eclipse,
Go to Help-> Install New Software
At the Work With section click on the Add... button. Give the new "Site" a name and set the location with http://smartypdt.googlecode.com/svn/trunk/org.eclipse.php.smarty.updatesite/ , then click OK. Go back to the Install New Software window and select the newly added "site". If the "Group items by category" check-box is checked, uncheck it. Now you should be able to see 1 item in the software list named "Smarty Feature"
Select the Smarty Feature, click Next> and from here afterwards it shouldn't be a problem.
If you are prompted that this is an unsigned package, just ignore the warning and install it anyway.
After the installation completes, restart Eclipse and it should be working.
Define a default PHP executable of type 'Zend Debugger' (only if you install vanilla Eclipse PDT):
In Eclipse go to Window->Preferences->PHP->PHP Executables Click on the Add button. Enter a name for that executable definition, for example "PHP localhost", complete the 2 fields which ask you for the PHP executable path (the PHP binary CLI executable) and php.ini path. Be sure that the PHP debugger is the Zend Debugger.
Installing smarty on eclipse kepler fails
(see Install SmartyPDT 0.0.9.1 in Eclipse Kepler).
The recommendation there is to use the PHP Development Tools (PDT) from former eclipse juno version. But in contrary to the recommendation I did not DELETE the mentioned features folder but I just uninstalled the plugins from eclipse itself (Help/About/InstallationDetails):
Uninstall all PDT packages
Restart eclipse
Then follow the instructions in above answer to install the PDT packages from Juno version and then the smarty package.
All these Installations worked without error.
But unfortunatly the *.tpl files are still not syntax highlighted. What to do more?
Our *.tpl file extension is not associated with the HTML editor in Eclipse by default.
Open Eclipse’s preferences.
Expand General from the tree on the left and select Content Types.
Expand Text on the right and select HTML. Click the Add... button below, enter *.tpl and click the OK button.
General -> Editors -> File Associations
Click Add..., enter *.tpl, and click OK.
Select HTML Editor from the Associated editors: section below and click the Default button to the right.

Eclipse "go to definition" problem

I'm using PyDev for eclipse and am experiencing some issues with "go to definition". It works for most modules, but for some site packages it does not. It does the "bump" sound and then nothing happens. One of the packages that doesn't work is Twisted, which is weird since the source is included and right there. Any idea how to fix this?
The go to definition works just fine. The problem was that eclipse didn't know where to find the source. You can go to window > preferences > pydev > interpreter > New folder, and add the folders missing. Even though you've added site-packages to the configuration, you still have to add subfolders separately to get code assist and to be able to go to the definition.
Pydev (also bundle with the Aptana distro) does not seem to have any bug exactly similar to the one you are describing.
Here is the list of bugs including the word "definition" for PyDev: bugs
You could open a bug report there with the exact version of eclipse, pydev, java used
But first:
What version of Pydev are you using? The open-source one or the commercial one (i.e. open-source + Pydev extensions)?
Because the matrix feature is quite clear:
Feature List Pydev "Open Source" Pydev Extensions
---------------------------------------------------------------
Go to definition BRM* Pydev Extensions(2)
BRM*: Bicycle Repair Man is an open-source program that provides 'go-to-definition' and refactoring. Its 'go-to-definition' only works for Python, and only works 'well' for global or local tokens (does not work very well on methods from parameters or on 'self'). It is currently 'unsupported'.
Pydev Extensions (2): Pydev extensions provides a 'go-to-definition' that works for python and jython, and should work even on methods from parameters and 'self'.