Archive | Delphi XE2 RSS feed for this section

Castalia 2012.1 is making Delphi even better!

Castalia 2012.1 is now available, which means Delphi just got better!

This is a very exciting release. First, it includes the beta of my brand new scripting engine for Delphi. There will be a lot more blogging about this scripting engine coming up, but you early-adopter types will want to just jump in and see what you can do.

The scripting engine runs right in the Delphi IDE, and lets you write code to manipulate the contents of your Delphi editor.

It’s just a beta, and there are big plans for the future – this scripting engine is going to revolutionize the way you customize your IDE!

Castalia 2012.1 also includes several bug fixes:

  • Fixed: Delphi XE2 split editor doesn’t load color settings correctly
  • Fixed: Split editor in Delphi 2009 and later doesn’t copy text to the clipboard correctly
  • Fixed: Access Violation in the precompiler if certain registry values are blank or don’t exist
  • Fixed: “Raise” keyword not treated properly by the internal code formatter
  • Fixed: Parser doesn’t allow “Object” types to have class methods or properties (Thanks to “Thaddy,” for this fix contributed to the open source Castalia Delphi Parser).
  • Fixed: Navigation toolbar doesn’t recognize project namespace prefixes when opening external units
  • Fixed: Syntax error with a class helper for a class identified with a fully qualified name
Castalia users with a current subscription can get Castalia at Everyone else can download a free trial at
(Note: The scripting engine beta is available to current Castalia Suite subscribers, and is not included in the “Essentials” edition or the free trial).
Read full story · Comments { 0 }

Rethinking the Delphi code editor

When you chose to use Delphi, you picked a great language with an absolutely perfect, flawless, IDE that couldn’t possibly be improved.


Wait, what’s that you’re saying?

It’s NOT perfect? It CAN be improved?

Ok, I admit, that was a lousy attention-getter to open with, but the fact is, I love Delphi, but I think the IDE can be improved to save you time and effort, and I’ve set out to improve it with Castalia for Delphi.

For example, Castalia adds some awesome advanced syntax highlighting that helps you understand code faster, whether it’s your own code, someone else’s code, or even your own code that you wrote a while ago and now it looks like someone else’s (we’ve all been there).

There’s also some great code navigation tools that let you find your way around that code super fast, without having to hunt for things.

<BillyMays>Plus, there’s more!</BillyMays>

In this video, I show a few ways that Castalia improves the Delphi code editor to save you time. It barely scratches the surface of what Castalia can do, but if you’re writing Delphi code, you WILL be able to do it faster after you watch this 8-and-a-half minute video:

This video requires Flash.

Give it a try. Download a free trial at

Read full story · Comments { 1 }

Better Parenthesis Matching in Delphi

Yesterday I wrote about configuring Structural Highlighting, one of Castalia’s advanced syntax highlighting features. Today, I want to talk about Parenthesis Matching, another bit of smart syntax highlighting.

First, I’d like to explain why Castalia has parenthesis matching at all, since the Delphi code editor has had parenthesis matching built in for several versions now. The simplest reason is that it’s historical: I created parenthesis matching for Delphi 5, 6, and 7 (which don’t do it natively), and have kept it as Delphi has evolved. But then, why keep it around if Delphi does it natively now?

The second (and more important) reason is that Delphi’s built-in parenthesis matching is broken and, in my opinion, flawed. Consider this example screenshot (the screenshot is from Delphi XE, but the newer Delphi XE2 has the same broken behavior):

As you can see, Delphi’s built-in parenthesis matching doesn’t work correctly! It matches parenthesis that are not a syntactic match, instead matching a parenthesis that’s encapsulated in a string, which has no syntactic significance. Castalia’s parenthesis matching does not suffer from this problem.

The other major difference is the way closing parenthesis are handled. Castalia’s parenthesis matching is activated when the cursor is to the RIGHT of a closing parenthesis, so that when typing new code, you can see which parenthesis pair you just closed. Delphi’s native parenthesis matching only works when the cursor is to the left of a parenthesis, so it offers no benefit when writing new code.

Like Structural Highlighting, Parenthesis Matching is configurable. To configure, choose Castalia Options… from the Castalia menu, and drill down to Castalia Options | Editor | Smart Highlighting | Parenthesis Matching. You’ll see the Parenthesis Matching Options Pane.

Parenthesis Matching Options

The first two checkboxes toggle the feature on or off. Parenthesis matching also matches square brackets [ and ]. Both are controlled separately with these two checkboxes. If, for some reason, you want to turn Castalia’s parenthesis matching off, here is where you would do it.

The rest of the options control the appearance of the highlighting. There are color options for the foreground and background (so, for example, if you want the parenthesis matching blocks to appear as a green block with a red parenthesis, you can do that here). Finally, the “Bold Characters” checkbox controls whether the parenthesis are drawn bold or regular weight. For most color combinations, keeping the bold option turned on makes the matching parenthesis stand out even more, and I recommend keeping it turned on.

The last of Castalia’s three advanced syntax highlighting features is Flow Control Highlighting. I’ll write more about that later this week. For now, have fun playing with parenthesis matching, and if you don’t already have Castalia installed, download a free trial at

Read full story · Comments { 0 }

Castalia 2011.3 is available now

A new release of Castalia, version 2011.3, is now available. This version adds support for Delphi XE2 as well as several fixes and enhancements. Here’s what’s new:

  • Support for Delphi XE2
  • Enhanced: Rewritten “Eliminate With” refactoring is more reliable
  • Enhanced: Inline Variable Declaration supports generic types
  • Fixed: “Eliminate unused variables” mangles the var section when preceded by “high order” unicode characters
  • Fixed: Regenerating the precompiled library does not delete old files no longer in use
  • Fixed: “Used Units” menu on navigation toolbar throws an Access Violation when opening a standard VCL unit.
  • Fixed: Parser incorrectly handles nested expressions that begin with two parenthesis
  • Fixed: Parser fails on generics with multiple type parameters
  • Fixed: Anonymous methods as parameters cause problems with structural highlighting

Users with current subscriptions can download Castalia 2011.3 at Everyone else can try it free for 30-days at

Castalia is the “number one productivity add-in for Delphi developers,” providing cutting edge tools to write better code faster, understand code more accurately, and improve code you’ve already written.

Read full story · Comments { 2 }

RAD Studio XE2 is available, Castalia coming soon

RAD Studio XE2 is now publicly available for purchase. Castalia 2011.3, which will support Delphi XE2, is coming very soon.

Read full story · Comments { 0 }

For programmers, by a programmer

Hi. My name is Jacob, and I'm the creator of Castalia.

I starting programming in 1986, learning Lightspeed Pascal on a Mac Classic. Today, I'm a professional programmer, teacher, and entrepreneur.

I have a Master's Degree in Computer Science, and I still love Pascal and Delphi.

I believe that writing code is the heart and soul of software development, and I love helping programmers write code more effectively.