issue with the code completion in Scala IDE for Eclipse - eclipse

I'm using "Eclipse for Java Developers 7.2" and Scala IDE 2.1.0. The issue is "code completion"...
I have "Use Scala-compatible JDT" and "Enable JDT content assist" enabled under my Eclipse.
Are there any other options I shuold turn on?

re-enable all the following unchecked java content assist mechanism in the scala-ide preferences:
Preference window:
/Java/Editor/Content/Assist/Advanced
preferences to check in the 'default' content assist panel:
Java Proposals
also enable the Java Proposals in the content assist cycling panel thats in the lower part of the window

Finally I got luck to solve this.
The reason behind why this happens is because eclipse stores a .metadata file in , which acts as a cache to load auto-complete suggestions.
If you try Project->clean, and then try the auto-completion the required java class members can be found in auto complete suggestions.
So the SOLUTION IS:
go to your eclipse.ini, in case of mac located at:
/Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini
and add "-clean" in the ini file just before "-project".
This has a down impact of that now your eclipse might take a minute or two longer to start for the first time. But for me , it was acceptable.

Related

Eclipse code error marks does not auto-refresh

I am working with Eclipse Photon 4.8.0 and I'm facing a weird behaviour when I'm working with Java files.
When I make a change in a file, usually Eclipse refresh the code reviewer automatically, marking errors and warnings on the fly in the code. This is not happening to me. The code marks appears or disappears only when I save the file.
I suppose there is some preference option to allow auto-refresh for this code checks, but I can't find it.
In Window > Preferences: Java > Editor check the checkbox Report problems as you type.
I think that actually it's not a fix for the problem, but I delete this Eclipse and downloaded Eclipse Oxygen. Now it works. I suppose it's a bug for the new Eclipse Photon.

Eclipse jsp automatic validation

In my old Eclipse (version 3.4.2) if I wrote an error in a java fragment inside a .jsp page (example a variable that doesn't exist) I automatically and immediately saw the problem (red line under
the word).
In Eclipse neon I have to manually validate the page (right click, validate) to obtain the same result.
Is it possible to configure the new version with the old feature?
You can try to go to Window > Preferences > Java > Compiler > Errors/Warnings
and set up your things here.
This feature is also included in Eclipse Neon, don't worry ;) but if you really struggle hard, I suggest an uninstall/reinstall

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

Is there an IntelliJ Keymapping plugin for Eclipse?

I am an old IntelliJ user, now working on a project that requires Eclipse.
I don't mind learning the Eclipse default keyboard shortcuts where they exist, but so many operations don't have shortcuts assigned (grrrr!)
I was wondering if there is any plugin that would automatically assign the IntelliJ defaults to any action that does not already have a mapping?
As an alternative I guess I could also use a plugin that just wipes out all of the Eclipse defaults and replaces them with the IntelliJ versions.
Or do I have to just go and manually replace them all one by one :( ?
The IdeaKeyScheme plugin was just developed by one guy that wanted the same thing. Source and binary are available. I haven't tried it myself, but many people use it with great success. It seems to be the only thing out there.
If you're concerned about keyboard mappings, the Key Promoter plugin for Eclipse (known as MouseFeed) will be a big help, too. There's also an IntelliJ version. I highly recommend this plugin for productivity enhancement.
Installation and enabling IdeaKeyScheme plugin
For Eclipse: add jar file to eclipse/dropins/plugins folder.
Restart Eclipse.
Open Window → Preferences → General → Keys and select the scheme "Intellij Idea".
I wanted the same thing since I predominantly use IntelliJ IDEA. Found this on the eclipse market place and up to now it has the same keymappings.
Activate it by going to :
Window >> Preferences >> General >> Keys : change the scheme to : IntelliJ IDEA
https://marketplace.eclipse.org/content/intellij-idea-keymap-eclipse
You may add a key map as described here:
http://www.jroller.com/santhosh/entry/intellij_idea_key_scheme_for
The plugin itself is:
http://jroller.com/santhosh/resource/IdeaKeyScheme.jar
You need just to put the jar file into eclipse/plugins and restart IDE. It works on Luna just fine!
Open your eclipse software
Drag and drop Installer button from
https://marketplace.eclipse.org/content/intellij-idea-keymap-eclipse
in your always open eclipse
and that's all
It turns out that in IntelliJ, by default you can choose a keymap scheme. So you can just apply the Eclipse Shortcuts without any plugin.
Just press CTRl + `
Details here
http://zeroturnaround.com/rebellabs/getting-started-with-intellij-idea-as-an-eclipse-user/4/

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.