Eclipse and c++11 - eclipse

I had programmed in c/c++ some years ago, amongst other languages, before I started to spend a lot of time on web stuff using php. Recently I decided to refresh my knowledge which is minimal in c++ using c++11. So, I went back to Eclipse, a few years old by now?
But obviously, my old version was not very well adaptable to C++11 because, even though I added the compiler directive "-std=c++11" in the appropriate places, the editor still complains, not only about current c++11 stuff, but also now about statements like "using namespace std" which used to be acceptable in the past. But the code compiles and runs just fine, but with a whole bunch of icons in the editor that just confuses any attempt to discover what actual errors exist.
So the c++11 stuff works, but the editor complains about stuff that (1) it did not complain about before and (2) refuses to accept with the more recent C++11 stuff. In fact, the bogus errors are so frequent that I have a devil of a time finding the real ones, a forest for the trees effect.
I have accessed whatever solutions have been offered for making the editor more tolerant, with no success. Any other thoughts out there? I am using Eclipse Juno under Window 7 with the cygwin compiler.

Related

Using IntelliJ like IntelliJ

I am a backend developer working on a cocktail of JVM based languages(mostly Java). I have been using Eclipse IDE for nearly 4years until a week ago I was mandated to use IntelliJ. I had a look at IntelliJ documentation to figure out the advantages it offers for me over Eclipse,Netbeans,STS etc but it was information overload. Currently I have changed the keymap to Eclipse. I believe IntelliJ has lot more potential which is waiting to be unearthed. What specific advantages does it offer w.r.t exposing/testing REST API, connecting to NoSQL DBs,refactoring code etc over Eclipse.
I won't be able to produce a detailed comparison matrix between IntelliJ and Eclipse but, for me, here are the most common things I miss when using eclipse on the workstation of some colleagues:
code navigation only with the keyboard
refactorings and their associated shortcuts (unlike Alt+Shift+L, Ctrl+Alt+V is actually "smart")
efficient "Find usages" (Ctrl+Alt+F7 or Alt+F7)
While debugging, real code edition with autocompletion (watched, code expressions, code fragments)
The new debugging visualization right in the editor (introduced by IntelliJ 14)
So are only the few things I use when helping colleagues. I'm not even talking about smart autocompletion, property files,
I admit that since I switched over to IntelliJ (~5 years ago) I never dove again into Eclipse. I'm sure they've improved a lot since but, from what I see on a daily basis with some coworkers, I'd rather stop programming than using Eclipse =D
Give it a real and serious try. There is a small time needed to got used to it but once you learn the key mapping and most of its productivity features, I'm almost certain you won't regret it. So far, I know nobody who has.

Relationship between Eclipse, Aptana, PyDev, and LiClipse

I've been going nowhere but in circles trying to understand the odd relationships between and varying levels of "standalone-ness" of these tools.
I've been using Aptana Studio on OSX for about 4 years and been happy with it, however my recent update to 3.6 blew up so many things I ended up rolling back to 3.4 just so I could work.
For better or worse, I do like Aptana, but I'm not bound to it and am now very frustrated with the latest version, specifically that all the python stuff went haywire. Searching for help is painful, as threads and advice are many years old.
So, in way of questions:
can anyone explain the relationship between Eclipse, Aptana, PyDev, and LiClipse? And more importantly:
a recommendation that meets the following criteria
What I need/want is:
something free and open source
with a current and active community
easily themeable with dark colors so I'm not staring at the sun 8 hours a day
tight python features (pep, pylint, ability to jump to references with a keypress, etc)
tight html/css/javascript features
Like I said, I do like Aptana, just frustrated in the apparent lack of a current community and how it seems to be falling apart.
Well, I'm not sure this is a good question for stackoverflow... anyways, I'll try to explain how it goes:
Aptana Studio 3 is an IDE which is currently supported by Appcelerator. Their main focus is currently on supporting the Appcelerator mobile platform (actually that's Titanium Studio, but Aptana Studio 3 is the basis for it -- the languages they aim for are html/css/javascript, which is what's needed for Titanium)... Although they do integrate a pretty old version of PyDev too (as PyDev requires a newer java whereas they're still on an older version of Java, so, I guess it's currently hard for them to keep it up to date).
Back in the day, they supported the development of PyDev, but decided to stop that support some time ago -- there's a bit more history at: http://pydev.blogspot.com.br/2013/03/keeping-pydev-alive-through-crowdfunding.html.
After that, LiClipse (http://www.liclipse.com/) was created out of my frustration to support dark themes and have support for more languages (it was a crowdfunded project -- it should've been an open source project, but didn't reach its goals for that, so, in the end it's closed source, and its revenue is a part of what keeps the PyDev development going on).
And at last, Eclipse is the basis for both platforms -- so, external plugins should integrate nicely into any of those.
Now, on the recommendation front:
LiClipse should meet your dark/python/html/css/javascript issues (its focus on the editors front is on being dark-themed/lightweight and easy to add support for new languages), but it's not completely open source (some parts of it have been made open source though: http://www.liclipse.com/text).
Aptana Studio 3 should still work and give support for the dark/python/html/css/javascript too, but given that they have to convert some things from the PyDev Java to its own version, Python support is always a bit outdated (as for the current community/support, I can't really comment, but I guess you should be able to report problems to them to try to solve the issues you have).
And the other choice (which may be a bit more work to configure) would be using a bare Eclipse and installing PyDev and separate plugins for html/css/javascript (it seems there are multiple available, but I can't really comment on any of those).

Eclipse vs Netbeans Benchmark

Is there any benchmarks or study done comparing these two IDEs in terms of
-- stability
-- developer productivity
-- features
-- performance
-- etc.
I am an Eclipse user (not by choice). Not sure about stability, but performance wise NetBeans is far supperior at least with the lates versions that I worked in; personally, I think NetBeans has enough features to make it a good development environment but I can't tell you for sure, it depends on what is the scope of your task. Overall, eclipse is a good IDE, but NetBeans is just a little better...
Mostly working with eclipse nowadays.
All I can say is M2E is a pain.
With no disrespect intended to the developers of m2e ...
This is the simply the absolute worst plugin for maven. It is slow and it is painful to use.
For big maven projects with more than 70 module components, you can forget about having a quick eclipse evironment.
If you use mvn eclipse:eclipse, the deprecated plugin for configuring eclipse, I believe you are faster with eclipse than with netbeans. Especially when it comes to refactoring.
If instead you use the official m2e plugin ...
Oh my god!
I am answering to this question due to the pure shear pain of waiting for eclipse.
" Invoking CDI Builder" because an #Inject collaborator moved around in the class, triggering a massive build wait time delay... god!
Eclipse! Well... Eclipse is a great IDE for getting started, on small projects, but as projects get enterprise level, and if you use m2e ... oh! you will cry!
And wonder ... how can it be this bad.
Netbeans! Perhaps nota any better in the end.
Last time I used Netbeans, i had two major complaints, that were total deal brekers:
(a) Netbeans was simply awful when dealing with massiven class refactoring.
You change a class name on sub module A, that affects modules B, C and D.
And until you class renaming, move over packages is done, you can go take a coffee, and order a cab.
(b) netbeans had a bug in parsing interfaces, namely there was some sort of regular expression that would take the longest time to run.
So if you can use the old deprecated mvn eclipse:eclipse, you would end up being far better of.
With that said.
The Netbeans debugger compared to the eclipse debugger is light years better.
I prefer the graphics of netbeans and I prefer the simplicity of netbeans.
Just try using the "expressions" where the autocomplete does not work, and you ave to go to "display" to get autcomplete to work and copy it bakc over to expressions!
Eclipse is a patch work, with hundreds of thousands of developers making hundreds of different components of the IDE, leading to an overall result of a total inconsistent product.
Eclipse is a never ending set of settings, just open the preferences and ...
Netbeans, UI is always desing for maximum simplicty.
As I wait for my m2e to finish rebuilding prjects based on whatever whim lead eclipse to start a new build, I start considering again if I should not revisit Netbeans and install the eclipse formatter ...
Eclipse is really in bad shape, In my humble oppinion.
Ther performance of eclipse has to improve 100 fold, especiall eclipse + m2e has to get way way better.
Intelli J - i have never tried.
The best IDE have used so far, is wihout any doubt, Microsfot Visual Code for Javascript and TypeScript.
You use Microsoft Visual Code, and just wonder why eclipse is not like that.
If you are doing Angular Js/Typecipt, simply forget about any other IDE out there. Microsoft Visual Code is the best thing there is, it is fantastic and joy to use.
Blazing fast and light and good looking on every platform of your desire.
But for java + maven, the echo system is a bit lacking on good options.
The man is not supposed to wait for the machine.
A human is always supposed to be slower then a machine ... this is not the case with eclipse m2e, this I can tell you.
The furstration!!!!
Unless you have lots of hardware to throw at it, go with Netbeans.
I have a VM running CentOS 7. At this time, I am only able to allocate 2G ram to the VM, and running Eclipse Oxygen for PHP on it is painfully slow. Netbeans runs just fine in this configuration.
I'm sure some Eclipse devotee would suggest giving the VM more ram which might probably resolve the issue, but unfortunately that is not currently possible.
Another thing that ought to be mentioned is that Eclipse is rather unique in its UI. For example, virtually every editor on the planet uses Ctrl-F to "Find", then function key F3 to "Find Next". Ctrl-G is "Goto line number". Netbeans follows this convention. Eclipse, however, uses Ctrl-K to "Find Next" and Ctrl-L for "Line number".
This won't be an issue if you use Eclipse and nothing else, but if you're like the more typical developer, you use Eclipse when appropriate along with some other tool when appropriate. You will get confused sometimes and use the wrong shortcut. This creates unpredictable problems, particularly if you're unsure what the wrong shortcut just did to your file.
It's not a "performance" issue as per the application, but it slows down the developer. To me, that's just as bad.
Again, some Eclipse devotee might suggest that Eclipse shortcuts can be configured any way you like, which is true, but really, does anybody have that kind of time? Eclipse comes with literally thousands of configuration options, and it's an Internet Search to figure out how to change almost anything.
Netbeans doesn't have thousands of configuration options, although there are things you can tweak. It just sorta mostly works the way you expect out of the box.
To conclude, the actual slowness on less-than-most-super-powerful hardware is probably the biggest thing against Eclipse. I don't know what the code is trying to do, but Netbeans is somehow able to do it with less hardware.
Eclipse and Netbeans are both good IDE (Integrated Development Environment) programs. If you are just a Java, C++, C or Fortran programmer you can use any of them.
If you are WEB base developer (For Example: JSF, Serverlet, Applet) in this case NetBeans is much more powerful then Eclipse.
On the other hand, If you are mobile developer for Android OS, in this case Eclipse is much more powerful then Netbeans.
So it depends on your programming league :)))

How to become more productive using Scala? (Tools, IDEs)

What Tools do you people use to work with Scala? For my learning phase, I used the Scala REPL and hacked some code with TextMate and compiled it with the scalac CLI. But as the projects grow in size, much more sophisticated tools are required.
I am aware of the Scala plugins for Elipse, IntelliJ and Netbeans and I tried them all. The best one is IMHO IntelliJ, but still far away from being perfect.
The major issue I have is the lack of auto completion. As a not-so-advanced Scala coder, I still dont know the whole standard API and have to switch between the Scaladoc and IDE regularly. This feels like "killing productivity". But they all fail to auto-complete method arguments. (I heard that method arguments are not included in compiled scala code, but what about attaching source to do auto completion?)
Another very annoying issue is the build process. I am using Maven to build my Scala projects and manage their dependencies. But nevertheless, I have to do a full rebuild to test my changes. Maybe I am spoiled by Eclipses incremental rebuild available in the Java world, but it feels like a big issue to me.
I like Scala very much and I feel way more productive while coding, but the lack of sophisticed tools let me feel less productive. And both seem to cancel out themselves.
So, whats my question? I doubt every single Scala programmer uses good ol' vim or emacs along with scalac to do their work. So what tools do you use? What workflows have you developed to bring speed into developing with the Scala language?
Edit
Clarification what I ment with auto-completion of method arguments.
val myList = "foo" :: "all your base" :: Nil
myList.partition(_.length > 3)
For the code above, IntelliJ fail to provide me with the information that partition requires that I have to pass a () => Boolean function. In fact, IntelliJ does not check for this contraint. I can pass a String and IntelliJ will not indicate my error until I do a compile.
scalac
Get familiar with command line options to Scalac.
-deprecation
-Xprint:all: watch your code progress through compiler phases, very useful to see what implicits are applied.
-help / -X' /-Y` list all options.
The latest nightly builds of scalac include a bash completion file that makes these easier to use.
IntelliJ IDEA
Method completion with Javadoc (CTRL-Space, CTRL-Q/Apple-J) Screenshot
Parameter Info for the example in the question (CTRL-P) Screenshot
Method Argument Completion (CTRL-SHIFT-Space). Screenshot
You need to have the source or javadocs linked into the dependencies in IntelliJ to see the Javadoc.
It doesn't currently highlight type errors on the fly, as there are still too many false-positives in complex code. This is coming, though.
Simple Build Tool
SBT keeps the compiler resident, and analyzes dependencies between classes to allow incremental recompilation. It can also monitor for changes to source files and automatically trigger recompilation and/or test execution.
Continous Compilation: >~compile
Continuous Compilation + Test: ~test-quick
I have SBT and IntelliJ project configured in http://github.com/scalaz/scalaz, you could use this as a reference.
I've been using Scala daily for the last six months. I'm still using vim (and ctags to find stuff), and Maven for builds. I've gotten some good mileage out of JRebel when working on Lift web apps -- it will reload changes on the fly without server restarts.
I spent some time looking into IDEs, but it got depressing really fast. I really missed a lot of Eclipse features at first, but after a period of adjustment I don't think I'm significantly less productive now.
I've heard some rumblings that NetBeans is the current champ for Scala IDEs, but I haven't tried it first hand.
One simple way is to use fsc, an offline compiler. It maintains caches of information, and the standard compiler will talk to fsc (running as a daemon) and use its cached information during compilation, thus speeding up your compilation cycle.
Here's my answer on a similar thread. After giving about an hour to Ensime. I just can't help but get the word out. I must say it's very, very well written for an Emacs package.
I am afraid you have to wait for Scala to become rock-solid.
I had exactly the same issue with Java ten years ago. It was even worse.
I also tried them all. For Scala 2.7.7 IntelliJ is the winner, but for Scala 2.8.0-SNAPSHOT Eclipse is not that bad.
Wait half of a year after 2.8.0 is released and check again. It should become bearable.
With Scala 2.8, please see this for getting better performance out of Maven.
You should also give Netbeans 6.8 a try with the nightly Scala build. I am very satisfied programming Scala with this IDE. For building, I sometimes also use Ant. The best thing about NB Scala plugin is that it is fast and code-completion works flawlessly.
For the example you gave: NB gives me this error
code-completion:
The Eclipse Scala IDE is quite mature now (as of 3.0).

What's the best Scala build system? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I've seen questions about IDE's here -- Which is the best IDE for Scala development? and What is the current state of tooling for Scala?, but I've had mixed experiences with IDEs. Right now, I'm using the Eclipse IDE with the automatic workspace refresh option, and KDE 4's Kate as my text editor. Here are some of the problems I'd like to solve:
use my own editor IDEs are really geared at everyone using their components. I like Kate better, but the refresh system is very annoying (it doesn't use inotify, rather, maybe a 10s polling interval). The reason I don't use the built-in text editor is because broken auto-complete functionalities cause the IDE to hang for maybe 10s.
rebuild only modified files The Eclipse build system is broken. It doesn't know when to rebuild classes. I find myself almost half of the time going to project->clean. Worse, it seems even after it has finished building my project, a few minutes later it will pop up with some bizarre error (edit - these errors appear to be things that were previously solved with a project > clean, but then come back up...). Finally, setting "Preferences / Continue launch if project contains errors" to "prompt" seems to have no effect for Scala projects (i.e. it always launches even if there are errors).
build customization I can use the "nightly" release, but I'll want to modify and use my own Scala builds, not the compiler that's built into the IDE's plugin. It would also be nice to pass [e.g.] -Xprint:jvm to the compiler (to print out lowered code).
fast compiling Though Eclipse doesn't always build right, it does seem snappy -- even more so than fsc.
I looked at Ant and Maven, though haven't employed either yet (I'll also need to spend time solving #3 and #4). I wanted to see if anyone has other suggestions before I spend time getting a suboptimal build system working. Thanks in advance!
UPDATE - I'm now using Maven, passing a project as a compiler plugin to it. It seems fast enough; I'm not sure what kind of jar caching Maven does. A current repository for Scala 2.8.0 is available [link]. The archetypes are very cool, and cross-platform support seems very good. However, about compile issues, I'm not sure if fsc is actually fixed, or my project is stable enough (e.g. class names aren't changing) -- running it manually doesn't bother me as much. If you'd like to see an example, feel free to browse the pom.xml files I'm using [github].
UPDATE 2 - from benchmarks I've seen, Daniel Spiewak is right that buildr's faster than Maven (and, if one is doing incremental changes, Maven's 10 second latency gets annoying), so if one can craft a compatible build file, then it's probably worth it...
Points 2 and 4 are extremely difficult to manage with the current scalac. The problem is that Scala's compiler is a little dumb about building files. Basically, it will build whatever you feed it, regardless of whether or not that file really needs to be built. Scala 2.8.0 will have some tremendous improvements in this respect, but until then... Eclipse SDT actually has some very elaborate (and very hackish) code for doing change detection and dependency tracking. On the whole, it does a decent job, but as you have seen, there are wrinkles. Eclipse SDT 2.8.0 will rely on the aforementioned improvements to scalac itself.
So, building only modified files is pretty much out of the question. Aside from SDT, the only tool I know of which even tries this is SBT (Simple Build Tool). It uses a compiler plugin to track files as they are compiled and query the dependency graph computed by the compiler itself. In practice, this yields about a 50% improvement over the recompile-the-world approach. Once again, this is a hack to get around deficiencies in pre-2.8.0 scalac.
The good news is that reasonably fast compilation is still achievable even without worrying about change detection. FSC uses the same technology (ooh, that sounded so "Charlie Eppes") that Eclipse SDT uses to implement fast incremental compilation. In short, it's pretty snappy.
Personally, I use Apache Buildr. Its configuration is significantly cleaner than either Maven's or SBT's and its startup time is orders of magnitude less (when running under MRI). It integrates with FSC and attempts to do some basic change detection on its own (fairly primitive). It also has auto-magical support for the major Scala test frameworks (ScalaTest, ScalaCheck and Specs) as well as support for joint compilation with Java sources and IDE meta generation for IntelliJ and Eclipse. Oh, and it supports all of Maven's features (dependency resolution, etc) and then some. I'm even working on an extension which would allow interactive shell support integrated with JavaRebel and supporting several shell providers (Scala, JIRB, Clojure REPL, etc). It's not ready for the SVN yet, but I'll commit once it's ready (possibly in time for 1.3.5).
As you can see, I'm very firmly of the opinion that Buildr is the best Scala build tool out there. Its documentation is a little spotty where Scala is concerned, but that's because everything is so straightforward that it's hard to document without feeling verbose. You can always check out one of my GitHub repositories for examples. Good luck!
Have you looked at Intellij IDEA and its Scala integration ? Intellij has a loyal (fanatical?) following amongst Java developers, so you may find this is appropriate for your needs.
Am also quite frustrated with the scala plugin on Eclipse and I can add a few more problems to the list:
auto-complete only works some of the time
the debugger doesn't work properly (especially when trying to debug scala xml)
the debugger forgets breakpoints
'go to definition' doesn't work more often than not.
I'm glad to hear that Buildr sounds like a better alternative (on the build front anyhow), I'll give that a try - thanks!
If you use Emacs, I think Ensime is a pretty good IDE. I think at the time writing, Ensime is the only IDE that will give you fast and accurate autocompletion on both Scala and Java objects, including implicit conversions.
There's code browsing support using Speedbar, code templates using the excellent Yasnippet, and code completion menu using Autocomplete. These are all very modern, actively maintained Emacs packages. There's also out of the box incremental building support for Maven and SBT.
There's a lot more in there such as interactive debugging, refactoring, and the Scala interpreter in an inferior process. All the things you want in a modern IDE for Scala is already there in Ensime. Highly recommended for Emacsens.
For the reasons of completeness, I have to say that there is also Pants -- the build tool that in use in Twitter (one of the early scala adopters)
The main difference it that it is intended not only for scala (and written in python, by the way) and is modeled after google build system.
It's not so bloated as sbt, so for the freshmans it's much simplier, but I've never heard about Pants usage outside of twitter and foursquare.
If you scared of SBT, maybe another no-so-popular build tool, ABT, could be an alternative for you?
I went down the same road, and here is where I am at:
- After some initial investigation, I dropped Kate. I love to use it for most things, but when it came to things like defining tab completions, I found it sorely lacking. I would recommend that you look into gedit instead, which is much more robust for Scala development
- With gedit as my editor, I use SBT and have found it to be a great build tool. I can put it into a 'test' mode where when any code changes it recompiles the relevant files and runs my test suite. This has been an extremely effective way to work.
I have not taken a look at Buildr yet. I would like to say that I will, but honestly with SBT at my disposal I don't really have a compelling need to look at another build tool.
If you want to use Eclipse, but build the project using sbt, and still be able to debug, take a look at this post here:
zikaprog.wordpress.com/2010/04/19/scala-eclipse-sbt-and-debugging/
It also can be applied to builders other than sbt.
The latest version of the Maven Scala plugin supports Zinc/Nailgun for faster start times and faster incremental builds. See Zinc and Incremental Compilation.