Netbeans 7.3 annoyances - netbeans

I recently switched from Eclipse to Netbeans 7.3 and experiencing a lot of quirks and i'm wondering if anyone else experienced them and/or got a solution. Because of these 'problems' i'm considering switching back to Eclipse again but i'm in doubt because NB has a lot of good things too !
These are the quirks:
when creating a new Java class, and make some typo's e.g. somewhere in a method, NB does not recognize / display the errors directly, but after a very long wait or a restart of NB.
This also happens to existing classes.
background scanning tasks is sometimes stuck at 100%
code completion does take forever. Don't even think about refactoring or renaming a class because it takes >3 minutes to scan the classpath (why, it's a new class for crying out load)
hot-deployment: changes are not always synchronized correctly with the (Glassfish) server.
Sometimes a complete undeploy and deploy is needed to reflect the changes made in the source.
NB manipules my pom.xml and glassfish-web.xml: it adds a deploy hint to the pom.xml and also changes or removes the context-root in the glassfish-web.xml. Please stop doing this!
Why o why can't i do a 'Fix imports' on my entire project. You can do a 'organize import' on the entire project, but this won't add the missing imports. See http://netbeans.org/bugzilla/show_bug.cgi?id=167031#c2
Running NB 7.3 on Windows XP, 3GB RAM, 2+GHz cpu
The project is a Java 7 maven project containing 12 modules / sub projects

I strongly recommend that you DO NOT attempt to install the ScanOnDemand plugin. It completely trashed my Netbeans, forcing me to use the Task Manager to kill the process. No existing projects were found; they were all listed as "unrecognized project; missing plug-in?". I had to re-install Netbeans.

One thing to look for is max heap allowed. Try adding "-J-Xmx2000M" to the Netbeans startup.
ref: Setting Heap Size

I suggest stick to your favourite IDE. Eclipse is still popular and Juno packages are doing good and Kepler is already available. You can try around latest packages.
IntelliJ IDEA looks better than other Java IDEs (light weight, faster, nice integration with SCM(source configuration) tools, possibility of easy cloud deployment, except that if you have freedom to choose your IDE whether you are part of a big/small teams, Otherwise there is no need to shift from one to other.
IntelliJ is the first IDE to give nice in-built support to Play framework
Google Android ADT is completely moving towards AndroidStudio based on community version of IntelliJ IDEA for faster and better GUI and app development.
As a Java developer it is not bad to try the other IDE to do some experiments or for any reason it strikes your mind.
Eg: Netbeans comes with sample apps in Java EE,Java7/Java2EE which looks better, nice examples for websockets, Servlet3.0, NIO examples etc,...but just try it or just ignore if it does not work. It is very easy to generate Entities from Database Tables, creating REST Endpoints in NetBeansIt may come with lot of in-built plugin-support for various java frameworks like RESTful webservice frameworks, JSF2.x, Primefaces3.x, SpringMVC, Struts but you may not sure to use the same version of framework. Some plugins may not work sufficient according to your business needs. Even if you okay with existing version it is not very friendly to develop Rich real-time UI development because Netbeans with Primefaces, instead you need to manually create XHTML templates.
Netbeans comes with nice support for Glassfish and tomcat, (other servers I am not sure but support is in-built). You can remote deployment with ease. Netbeans learning tutorials on JavaEE nice for beginners in the subject.
Netbeans also available as zipped bundle, hence no need to install even on Windows machines.
Eclipse has got better support with Java RoboCode learning tool (initiated by developed by IBM long ago.).
Also Netbeans comes with nice support for HTML5, Groovy, PHP, C++ as well (according to posts by users community, because I did not use them).

Related

ANTLR and Eclipse (or any decent IDE)

I have been using ANTLR with Eclipse for some time using the ANTLRv3IDE plugin. While it is not perfect, and a bit outdated, it does its job reasonably well.
Now I am looking to switch to ANTLRv4 for another DSL that I am creating. However, Eclipse support seems to be extremely thin. I decided to try out ANTLRWorks, which is a NetBeans plugin, but I could not get it to install (it seems to be locked to specific dated versions (201302132200 while I have something newer, still 7.3 as docs say) of dependencies).
So, the question: Has anyone set up any Java IDE (preferably Eclipse, but I could be persuaded to switch if support is good for something else) to integrate with ANTLR? With integrate, I mean: code generate on save/keyboard shortcut and syntax coloring (at the very least). Code completion and other features are of course nice to have, but I could live without them for now.
I am well aware of Xtext and I have had great success using it for some projects, but unfortunately it does not fit the needs here (need no IDE support, need my own DSL model not based on ECore, etc).
I know ANTLRWorks can be run as a standalone application without a Java IDE, but that I consider to be a last-resort solution as it is extremely cumbersome to work this way (switch between application, files out of sync, no VCS support etc). I tried the other way around: to install the Java parts into ANTLRworks (which itself is a NetBeans distro), but it did not end well (it seems basic project support etc was stripped out of ANTLRworks).
Antlr4 plugin for Eclipse is here:
https://github.com/jknack/antlr4ide
ANTLRWorks 2 uses many non-public interfaces from NetBeans, which means it will always be bound to a particular version. The standalone download will always work because it bundles the dependencies itself.
The standalone build of ANTLRWorks 2.1 is available. This build includes support for ANTLR 4.1.
A new plugin build of ANTLRWorks 2.1 will be available once NetBeans 7.4 is released.
Moving forward, the code for ANTLRWorks post-2.1 is open-source under an LGPL license.
I think you have downloaded Netbeans 7.3.1.
Try download 7.3 from https://netbeans.org/downloads/7.3/ and install the ANTLRworks plugin there. (Link to the ANTLRworks Update Center: http://tunnelvisionlabs.com/downloads/nbupdates/nb73/aw2/updates.xml ).
Note that ANTLRworks v2 contains ANTLR v4.0, which is not the current version of ANTLR (4.1). So also download ANTLR v4.0 from the ANTLR download folder (The antlr-4.0-complete.jar file) and use it as library for compilation.
Now you can use nearly all things you wanted.
ANTLRv3IDE was opensourced. It should be compile-able for Juno. For stringtemplate (ST4) look at the Hastee plugin. It supports some of ST4 constructs.

ColdFusion dev in Eclipse vs Intellij

Getting thrown into ColdFusion dev at work and just starting out, I wonder if there are any advantages (or disadvantages) of using Eclipse vs Intellij. I'm used to working in Intellij on Groovy/Grails and have close to zero hands-on time with Eclipse. The shop I'm in mostly uses Eclipse (I think because it's free and not much else), some use Dreamweaver (1 person me thinks).
Thanks in advance.
I'm a CF Developer that has been playing with intelliJ of late! I must say I do love the smoothness of intelliJ. IntelliJ does has have a CF code library ( http://plugins.intellij.net/plugin/?id=3571 ).
I don't use Eclipse for CF Development, but do use CFBuilder, which is based on Eclipse.
I personally prefer intelliJ as an IDE, but prefer CF Builder when working with CF.
There are two options for working with Eclipse for ColdFusion Development:
cfeclipse - an open source, free plugin for Eclipse
cfBuilder - the 'official' IDE, sold and distributed by Adobe.
There is also a plugin for IntelliJ which I have no personal experience using however I note that some highly respected CF devs are using it and preferring it to the Eclipse-based options.
My team and I currently use CFBuilder 2 and find that to be good enough for our needs. The biggest criticism I see about CFBuilder/Eclipse is that it can perform poorly on older PCs and the common solution is to increase the RAM available to it.
The benefit my team finds with CFBuilder is that the full Eclipse plug-in ecosystem is available giving us bundled options for source control and other development tools. (The same may exist for IntelliJ but I have no personal experience with it.)
Dreamweaver, especially a recent version, is an option and many CF devs swear by ColdFusion Studio which is a very old program and might be hard to get your hands on. Finally, there is also a plugin for Notepad++ for the times where you need to make a quick edit to a file and don't require a full IDE.
The editor that a lot of people have been using for ColdFusion lately is SublimeText 2 (http://www.sublimetext.com/2) with the official ColdFusion Package (https://github.com/SublimeText/ColdFusion). The link I posted below from Nettuts will help you get up and running with the PackageControl package that makes installing the ColdFusion package very easy.
Sublime is lightweight, powerful, and a pleasure to code in. It has small animations that make it feel responsive, and the birds eye map view of the code can be very useful. It even has some code insite that I find really helpful.
Heres a great post on Nettuts to get you started: http://net.tutsplus.com/tutorials/tools-and-tips/sublime-text-2-tips-and-tricks/

IntelliJ vs STS (SpringSource Tool Suite), what am I missing by using one or the other and can I make them feature equivalent for comparsion?

I've been using STS (just started to use and learn it slowly) but some users here where I work use IntelliJ. I was wondering what exactly STS comes with that can make it better/easier to use vs. IntelliJ and vice versa. Also I was wondering if there are any plugins or ways to make IntelliJ feature equivalent to whatever could be possibly missing vs STS and vice versa so I can do an equal and fair comparison.
Thanks!
Edit,
I will say that STS takes AGES to load vs IntelliJ for some reason so if someone knows how to tweak STS to open faster I'd love to know. Even on this new MBP 15" with i7 and 4GB of ram it feels way too slow opening up and is excruciatingly frustrating when it hangs.
It's 2016 and STS has come a long way. I favor it over IntelliJ for many reasons. Some are Eclipse specific and others are pre-packaged with STS (but can be installed into an Eclipse distro).
The most valuable is the Quick Text Search. STS will index all the text in all files in your project. Ctrl+Shift+L opens the dialog and you can type any text in the bar. All occurences of the string instantly appear across all files.
I like the ability to organize imports in over IntelliJ and greatly favor the look and feel of the IDE. I've used Eclipse/STS for much longer than I have IntelliJ so I am a bit biased here.
The ability to natively handle different file types and frameworks is IntelliJ's greatest strength. I work on Grails projects from time to time and support for the latest and greatest with Grails is non-existent anymore within the Eclipse/STS family, whereas IntelliJ provides good support.
BTW: STS is free(!) whereas you can't even buy IntelliJ anymore. You merely lease the software for a year under their new subscription model.
Go to Window->Preferences->Validation
Uncheck what you don't need. That will speed up the loading a bit.
Modify eclipse.ini to set the Xmn(new generation size), Xms and Xmx, enable parallel GC
-Xmn128m
-Xms1024m
-Xmx1024m
-Xss2m
-XX:PermSize=128m
-XX:MaxPermSize=128m
-XX:+UseParallelGC
I used STS for around 2 years, and recently tried Intelij [Community] for spring web development.
I found IntelliJ much better in
performance
usability
features
Keyboard shortcuts save a lot of time (No need to use a mouse at all)
File formats supported
Debugging window
But web development and spring development is not supported in community version of Intelij, so you need enterprise version, which costs a lot [At least for Indian customers]
So, for spring development I always prefer STS and for other development (I work on Vertx as well) I prefer Intelij
I have used both STS and Intellij community edition.Here is my personal experience.
Intellij has more handy shortcuts than STS
Auto completion feature of intellij is awersome (not my priority)
Itellij has caching issues.(Major and critical). You may need to restart the IDE by clearing the cache. I have never faced such issues in STS.
Some provided plugins does not work at all (e.g Smart Tomcat).Where as STS never fails here.
I felt intellij slower than STS.
Every time I restart intellij it starts indexing which I really dont like.
When I try to import multiple projects each opens in separate windows.When you try to import as module certain configuration does not work.
All the above listed points are from my personal experince. One may disagree with this. As of now I would choose STS over intellij.

Boostrapping new Eclipse machines with all the Plugins

Bootstrapping Eclipse on new machines is such a time consuming process, you wind up asking yourself whether you really need each plugin. But there all handy, and help develop consistent habits.
Eclipse bootstrapping problems include:
Explaining / documenting what needs to happen
The actual time pasting in the right URLs and downloading
Version compatibility and dependencies
Eclipse likes to restart after each one
The changeover to the Eclipse Marketplace means that some plugins and instructions you find on the web tend to be inconsistent, depending on when they were written.
The Licenses... over and over and over... yes, yes, yes... I understand that the person installing needs to be aware of it, and have a chance to review them, but there's got to be a better way.
It'd be nice to have "patch file" (either binary or meta) that spells out what I want to add on top of stock Eclipse installation. I'd really like to find (or create) a 1 or 2 step process that sets up Eclipse, plus a favorite batch of plugins:
subclipse
m2eclipse
jetty support like runjettyrun
android sdk and plugin (or at least just the plugin)
aspectj
Web Objects / WOLiops
python, other langs
JVM Monitor, maybe EclEmma
probably a git plugin pretty soon.
Does command line maven help with any of this? It seems like its repository management would fit at least part of the functionality.
On a machine with an Eclipse installation matching your needs use File -> Export -> Install -> Installed software items to file. Import the generated file using the same menu on all other machines.
As Scott says, a good approach is to simply package a fully prepared Eclipse installation once all the plugins you need are installed. The downside is that you have to update most plugins afterwards.
Another option is to use Yoxos. With it, you can create a profile and configure it with all the plugins you need (and apparently Yoxos can do more than that).
Finally, this page might interest you concerning the configuration side of things.
Solution 1 is too search for more advanced Eclipse distributions.
For example, STS (Spring Tool Suite) comes with
AspectJ
EGit
m2e
(and of course) Spring IDE
One small trick can be done with m2e-android - Android Configurator for M2E Maven Integration. If installing it on clean Eclipse, it will also automatically resolve to install :
m2e
Android Developer Tools (ADT)

How do I create an automated task in Eclipse? Maybe a plugin?

Using Eclipse 3.5 (FlashBuilder), I'm doing a bit of AS3 work.
With the in-house MVC framework I'm using, When I create a view - I need to make a change to quite a few files.
Its a simple process but its tedious and would work absolutely fine using some sort of automation.
Is there a plugin that allows me to do this? Monkey doesn't want to work anymore.
There doesn't seem to be any macro plugin out there. There wasn't in late 2008.
And the Practically macro may not be fully compatible with Galileo or Helios (3.5 or 3.6 Eclipse).
That leaves you only with some process which could involve external tools (Emacs), or Emacs-Eclipse integration, like a emacsplus (not tested, may also not be compatible with recent Eclipse edition).