IntelliJ - un-excepted format - scala

Is there a reason IntelliJ adds underscore lines for Scala code?
In this example bellow - IntelliJ is complaining about 'comment':
example
Style IDE Issue
How to prevent that / fix it?

That looks like ScalaStyle integration in IntelliJ IDEA (ScalastyleCodeInspection.scala).
ScalaStyle is a third-party tool and it's not enabled out of the box - it requires a custom configuration in .idea/scalastyle_config.xml.
It should be possible to disable the inspection, as usual: Alt + Enter / Disable inspection, or Settings / Editor / Inspections / Scala style inspection. Aternatively, you may simply delete the scalastyle_config.xml file from the project.

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)

Netbeans 8.0 - Preferences for code folding

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.

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 scala plugin console cannot display hebrew characters

I am trying to run the following scala code:
println("world שלום").
but in eclipse, this is what I see in scala interpreter console:
println("world שלום")
world ????
Is it possible to fix that?
You should tell where you see this. Is it the console? Also what platform are you running eclipse on.
You could try to add -Dfile.encoding=UTF-8 to your eclipse.ini file.
This works for me with Eclipse Indigo on Linux. It looks like you have some platform specific encoding issue ... but it's impossible to tell without more detail.
Answer here
http://decoding.wordpress.com/2010/03/18/eclipse-how-to-change-the-console-output-encoding/
relevant for all eclipse languages...
Taking the comment i got below into consideration, the short version of the link I gave says the following:
In eclipse, in the toolbar, in the 'run' button combo options, select 'run configurations'
There, go to the 'common tab' and change your encoding to UTF-8.

Autoformat pom.xml without using m2eclipse plugin

I don't use the Eclipse maven plugin while developing in Eclipse.
I generate my Eclipse classpath externally using the following command:
mvn eclipse:eclipse
This has worked fine for quite some time and I am not inclined to add a maven plugin.
However, I would like to be able to "autoformat" my pom.xml file.
My pom.xml is not showing up as a "Source" file and therefore the contextual "Source" menu doesn't show up.
Control-Shift-F doesn't work either.
Is there a way to do this without installing the m2eclipse plugin? Is there any other generic "XML Editor" plugin that can help with this?
I may be missing something obvious but why don't you use Eclipse's built-in XML Editor which supports formatting (via the regular Shift+Ctrl+F)?
So, I found a way -
Select source of pom.xml (ctrl+A).
Click right button of mouse.
Then click Source > Cleanup Document.
Check "Format Source" in popup and uncheck all other options.
it's Done!! :)
This problem occurs only when we open in text editor. Solution works when we open the pom.xml in xml editor and use the short cut commands as shft+ctl+F
Use ctrl + shift + F keys together, for me left side of ctrl + shift key combination of laptop did't work I tried with right side combination and it worked.