ANTLR and Eclipse (or any decent IDE) - eclipse

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.

Related

Netbeans 7.3 annoyances

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).

Task focused interface for Netbeans (or something similar)

When you come from the Eclipse world you surely miss Mylyn (a task focused interface). As I have to use Netbeans at the moment I am looking for something similiar. I would even be satisfied with some little helper to associate some files to a task, so that I can switch my working files at once to work on another project.
I know of Cubeon, but it doesn't seem to work with files that are not Java (like Ruby files in my case). It also doesn't seem to be worked on anymore.
Is there another little plugin that will do the job?
Task focused features like Mylyn are not available for NetBeans IDE as of version 6.9.1. They may become available after some time due to some community contributions. Cubeon used to work for NetBeans IDE 6.5.1 but I have not tested it on NetBeans IDE 6.9.1 yet, it may work.
Cubeon have initial task focused way of working but need many more features to be compared with Mylyn. So the answer for you is there is no plugin available for NetBeans IDE yet to match Mylyn like features in Eclipse.
UPDATE (11 Oct 2011): There is a NetBeans module for Task Focused Interface in NetBeans IDE hosted at java.net named NBTaskFocus. This module will work for NetBeans IDE version 7.0.x and onwards.

what is the correct version of Eclipse for Coldfusion?

Usually when one wants to create a new file in the Eclipse IDE , Java, Javascript, Colsdfusion PHP etc are provided as the options for the new files.
I recently downloaded Eclipse for Coldfusion 8 and excecuted the file "software/dw/java/europa/J2EE-SDK-Europa-33-win32.zip" .
Now when I want to create a New File "only JAVA " option is available. There is no coldfusion or HTML!
So can any one provide me the Exact/correct link for Codfusion related Eclipse?
(On the Eclipse website there are many Eclipse related downloads but I am not sure which one is specific for Coldfusion.)
There's CFEclipse, a free, open-source Eclipse plug-in for working with CFML. And of course there's Adobe's ColdFusion Builder, a commercial product that works as either a plug-in for an existing Eclipse installation, or as a full stand-alone product (with Eclipse already baked in).
CFEclipse 1.3.6, the current stable version, works with Eclipse 3.4.x or 3.5.x. Here's the CFEclipse wiki.
The stated Eclipse versions required for ColdFusion Builder are 3.4.2 or 3.5. Here's Adobe's requirements page.
If you're using one of these as a plug-in and you don't need a lot of the other Eclipse features, the J2EE version of Eclipse is probably overkill (it's the biggest package). You can try out a more minimal Eclipse install, then update and add plug-ins as you need them. Try the Eclipse Platform Binary, for example.
There's also Adobe's ColdFusion Builder IDE specially created for this purpose. It proposes some features not available in CFEclipse, but not free (though there's a trial version available).
In addition to Ken's answer please note that you can already use preview builds of CFEclipse with latest Eclipse 3.6 Helios. I am using this configuration on daily basis and it is pretty stable and more efficient than previous version for me.
If you will expierience problems with preview builds, feel free to post them into the CFEclipse groups, developers usually react pretty quickly.
One more hint for you. Sometimes after installing the plugin via Add Sofware further updates do not work correcly. I've experienced this issue few times so it can be useful to know the solution.
To fix this check the Preferences > Install/Update > Available Software Sites. If needed entry missing -- create it manually using the same update URL as for installation.
Also there's an Eclipse-based version of Adobe CF manual available, see this help page for details.
Hope this helps.

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).

Drools with Netbeans 6.1

I've downloaded and started to use Drools on a pilot project via it's "default" platform Eclipse. However, I would like to use it in Netbeans just the way plug-in works in Eclipse.
Any ideas/shot-cuts to do that?
There are quite a lot of features in the eclipse plugin, but there is (as yet) no plugin for eclipse.
You can of course use drools with netbeans just fine - just means that the IDE features that are rule specific won't be available, but it will work, its Just Another Library then !
(I use drools with intelliJ IDEA and I just created a little syntax definition to give me basic highlighting etc... but no other features. If I want them, I jump into eclipse).