Adding a DRL FileType with Syntax Highlighting to IntelliJ

IntelliJ’s support of JBoss-rules in no way compares to Eclipse, but even that isn’t enough to get me off my butt and move from my fave. That said, I created a semi-literate FileType for the drl files so that IntelliJ will recognize them and you will get a decent amount of syntax highlighting. Is it perfect?

No.

But it will probably get you home. Here’s what you do. Create a new filetype and make sure that it includes ?*.drl files. Once that is created, it makes a filetype with the name you gave it in the

%User%/Library/Preferences/IntellijIDEA%your-release-version-here%/filetypes/%name_of_file.xml%

directory (at least that’s what it looks like on my Mac – I haven’t touched a windows box in years, but it should have some parallels.

Open the XML file and replace anything between the <filetype> nodes with:

Continue reading

Passion towards an IDE?

I have to admit that I don’t write as much Java as I used to. I spend a ton of time in design, using UML tools (Visual Paradigm is my favorite). Lately, I’ve spent some time digging into the JBoss-rules framework – really getting to understand it and draw comparisons between it and JESS, CLIPS and other rule engines. So I’ve had the joy of coming back to my IDE of choice for the last 6 years – IntelliJ – now about to release its 7th incarnation.

I have to admit a serious bias, but I don’t get all hung up on the “my tool is better than yours” debate. I’ve used the others, and I have a lot of smart friends that love Eclipse and NetBeans as well. I even have some very smart friends that prefer tabs to spaces, but frankly, why go down the path of flames? It’s important to talk about what works for me, and if you’ve never used IntelliJ, maybe it’s worth the effort. Yeah, it costs money, but frankly if you’re in the business of making money with your code, it’s trivial, especially when you start looking at the features that come “free” with it, and start looking at the extra cost of plugins for some of the competitors.

Why do I like it? Probably familiarity, definitely because it allows me to effortlessly get what’s in my head onto the screen in a seamless manner. I also credit this IDE for making me a better code-writer and giving me the confidence in my abilities to make the next steps in my career, challenge myself with new libraries and frameworks, and make my code professional and complete with documentation and unit tests.

Is it for everyone? Frankly, I don’t care if it is or isn’t. If you’re new to Java, or have no particular fondness for your IDE, I would heartily recommend IntelliJ immediately, and encourage complete understanding of its capabilities. If you are fine with your IDE but don’t particularly like Java, I would also recommend IntelliJ, as I found a fondness for the language and what I can accomplish with it all over again. Also if I quality, ease of use and completeness of the product are key considerations, you get what you pay for with IntelliJ and their plugins. Eclipse, in my opinion, tends to have a little “anarchy” associated with it and it’s overall “finish”.

If you love your IDE, well, tools that feel comfortable in your hand make you productive, so have fun with that.

I like the fact that there is Eclipse, NetBeans and IntelliJ to play back and forth with. They end up making each other better, and since there is enough of a user-base for them to stay around for awhile, this will continue.

BTW, if you are a Ruby on Rails supporter, the latest versions of IntelliJ support it out of the box, and they do it VERY WELL. I just wished that they had a JBoss-rules plugin like Eclipse does, because it has chapped me to no end…

As a Post-Script, Bob Congdon writes back in 2004: “Personally I think it’s healthy that there are a number of Java IDE alternatives. But you have to wonder how long IDE vendors will be able to survive against Eclipse.” Asked and answered?