Netbeans 8.0 - Preferences for code folding - netbeans

I have recently switched to using Netbeans IDE 8.0 for a PHP project and would like to know if it's possible to either:-
Configure NetBeans to remember my code fold status (open/ closed) when I save the file
Automatically fold only functions upon startup.
Many thanks in anticipation.
Phill

Apparently Netbeans cannot remember the state (see https://netbeans.org/bugzilla/show_bug.cgi?id=188573).
Regarding your second question have a look at: Tools / Options / Folding.

Related

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 enable collapse/expand code blocks feature in eclipse

I'm using the following version of eclipse on windows 7 desktop. On my ColdFusion files opened in eclipse I don't see +/- symbols for collapsing/expanding blocks of code. On the tool bar I can't find any option for enabling this feature. I don't see an option for Java-->Editor... either. In Preferences section I see only the options shown in the attached image:
Eclipse IDE for Java Developers
Version: Mars Release (4.5.0)
Build id: 20150621-1200
UPDATE Using the help from #E-Riz I found the folding option in Preferences and enabled all the options there as shown in the updated image below. But still I'm not seeing +/- symbols in the code editor to collapse/expand the code blocks. I've tried closing and reopening eclipse, as well.
As you can see there are no +/- sings in the file below although the editor used is CFEclipse:
The feature is called folding. If you enter "folding" (without the quotes) in the Preferences search field, you'll find the places where it's configured.
I don't know if you have a plug-in specifically for editing ColdFusion files; if you do, it may or may not support folding. For example, CFEclipse has folding support, so if you open your files in that editor, you should see it.

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/

issue with the code completion in Scala IDE for 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.

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.