Ted’s Rants and Raves by Ted M. Young

March 5, 2008

Thanks, JetBrains!

Filed under: Rave, IntelliJ IDEA

Thanks for the kudos from the IntelliJ IDEA Blog! I enjoy pointing out the little known, but very useful, features that makes IntelliJ IDEA so pleasurable to use (and makes me so much more productive). It’s certainly nice to know that someone besides my dog is reading this blog (no, not even my wife reads this blog). I’m prepping another tip for tomorrow, but if anyone has any plug-ins that they like (especially if you wrote it!), let me know in the comments.

IntelliJ IDEA 7.0.3 EAP Release Candidate Update

All is well, at least on my machine, for build 7744. When I get time, I’m going to take a look at the Flex support, but that probably won’t happen for a few weeks.

March 3, 2008

IntelliJ IDEA: New 7.0.3 EAP Release Candidate 2

Filed under: Rave, IntelliJ IDEA

Another 7.0.3 release candidate (#2) is now available:

Selena, build 7744 (IntelliJ IDEA 7.0.3 Release Candidate 2) is available
at http://www.jetbrains.net/confluence/display/IDEADEV/Selena+EAP

Detailed release notes: http://jetbrains.net/jira/secure/ReleaseNote.jspa?version=11550&styleName=Html&projectId=10132&Create=Create

Looks like mostly new features and fixes for Adobe Flex development, with some other miscellaneous but not earth-shattering fixes. As usual, I’ll download, install and start using it. I enjoy the bleeding edge.

IntelliJ IDEA: Structure101 Companion

Filed under: Java, IntelliJ IDEA

Looks like the Structure101 plugin is now an official IntelliJ IDEA “companion”. At first I thought it was just a superset of IDEA’s DSM (dependency structure matrix), but it appears to have many more features than that, including ways to have your continuous build warn you of architectural violations in a way similar to PMD or Checkstyle, but obviously at a much higher level or different point of view. See the Structure101 features page on JetBrains’ site for more info.

I’ll be taking a look at the plugin soon (there’s a free trial), but I mention it because it’s not been unheard of for IntelliJ IDEA Companion products to be incorporated into IDEA itself. Based on the price of Structure101, I’m not sure that this would happen since it’s normally US$599. For now, there’s a US$100 discount through March 31, 2008 using the coupon LDJNZ-BYG0P-E1I27-OLMI9-L8KY5 at http://companions.jetbrains.com/structure101/license.html.

March 1, 2008

Why I’m Not Using Adobe Flex (yet?)

I was just reading Per Olesen’s blog entry about Adobe Flex and the fact that it’s closed source and proprietary, and it hit me that the reason I haven’t tried Flex is because the source isn’t available. I remember years ago at eBay when we were using C#/ASP.NET 1.1 for internal web app development and it was so frustrating because when an exception was thrown inside the framework, you’d hit the “no source wall”: the place where the stack trace leads you to code that you can’t look at. At least in the Java framework I can trace through the code and even set breakpoints in framework code so I could figure out if it was my code’s fault or a bug in the framework. Usually it was my code, but whereas in Java I could figure out what I was doing wrong by looking at the Java framework code, in ASP.NET I often just gave up and tried a completely different way of solving the problem (usually by tossing out the use of ADO.NET). Sometimes I even went to the Mono source to see what they’re doing and it did help when I was creating ASP widgets, but it’s not the same thing as having all of the source available with the ability to step into it in a debugger.

I haven’t followed .NET development much since I left eBay, but I’ve noticed that Microsoft has opened up some of the .NET framework source, which is definitely a move in the right direction.

So, I guess subconsciously I’ve been staying away from otherwise appealing frameworks if I can’t access the source code. And it doesn’t have to be “open source”, as in GPL, LGPL, etc., but I at least want the option of seeing it if I need to. I don’t mind proprietary, but without the source, I’m going to choose another framework, my time is too valuable to hit my head against the wall otherwise.

February 27, 2008

This Saturday: InstallFest in San Mateo, CA

Filed under: Rave

The Silicon Valley Linux Users Group (SVLUG) is having another InstallFest in San Mateo, CA (2800 Campus Drive), this Saturday (March 1st) as part of the larger Bay Area InstallFest for Schools. Other areas include San Francisco, Berkeley, and Novato. The goal is to donate 500 computers, with Ubuntu pre-installed, to Bay Area schools. Here’s more information: http://www.untangle.com/installfest.

Sounds like fun, especially with free pizza and schwag from the Mozzilla Foundation!

IntelliJ IDEA Tip: Change Background Color for Read-Only Files

Filed under: IntelliJ IDEA

When I’m editing a file, I like to know immediately whether I’ve checked it out for editing, or if it’s in read-only mode. Sure, you can look at the at the editor tab and see if there’s a little tiny lock icon File Lock Icon on the editor tab (when you’re running at 1920x1200 on a laptop screen, tiny is really tiny), or maybe the color of the tab text is black. However, I prefer a much more obvious way: making the background of the editor a color other than the standard white. Note: if you have colors set up such that the background isn’t white, you can still use this tip, just use a different color than in my example.

So, an editable file looks like this (white background):

Editable Background Color

And a read-only file looks like this (a slightly blue-tinted background):

Read-Only Background Color

I find that the slight color change is obvious enough to let me know I’m looking at a read-only file at first glance, yet subtle enough not to get in the way of reading the code.

Changing It

I recommend opening up a read-only file before adjusting the settings so that you can see how it looks while you’re adjusting the colors (see step 6 below).

1. Open up the IDE Settings (Ctrl+Alt+S for me) and select “Colors and Fonts”:

Settings: Colors and Fonts

2. If the General tab isn’t selected, click on it. Underneath you’ll see a list of items: select “Background in readonly files” (pointed to by the green arrow). Don’t confuse this entry with the “Readonly fragment background” (pointed to by the red arrow).

Changing Background Color For Read-Only Files

3. If the Background checkbox Background Color Checkbox isn’t selected, then select it.

Set Background Color

4. Right-click on one of the gray boxes on the right-side to customize the color. You’ll see this dialog show up:

Select Color

5. Adjust the color to something subtle: keep in mind that you want a very light (i.e., low saturation) color. The little swatch that you see in the color selector is misleading: you’ll think the color is light enough, but it’ll end up being darker than you expect when it’s the background color for the whole editor. I suggest using the RGB values above (R=247, G=255, B=255), but feel free to experiment. After you’ve “mixed” your color, click the OK button and you’ll now see your color as one of the “customized colors” on the right side of the pre-selected color palette:

Click the new color

6. After you click on your new color, you can hit the Apply button and, if the current file showing in the editor is read-only, you’ll immediately see the background color change. Click the OK button once you’re done and you’re all set!

February 25, 2008

IntelliJ IDEA Plugin of the Week: Describe Key

Filed under: IntelliJ IDEA

As I mentioned in my first IntelliJ IDEA Tip post, I’ll be talking about the many plugins that I use — I’m something of a plugin maniac. Hopefully you’ll give them a try and find them as useful as I do.

The Describe Key Plugin

Written by Vincent Mallet, today’s plugin is one that does one little thing, but does it extremely well: tell you what a specific keystroke or key sequence does.

You can bring up the Describe Key plugin through the menu:

Tools Menu Describe Key

Or use its default shortcut: Ctrl+Alt+K. When you bring it up, you’ll see the dialog:

Describe Key Dialog

And you can start trying out keystrokes, in this case I hit Ctrl+Shift+S, the default shortcut for Structural Search. This dialog should look familiar, it’s pretty much the same one that’s used in the Keymap settings page. A nice addition is the ability to browse and search all actions that you could attach to a shortcut by clicking on the Browse button:

Describe Key Browse Dialog

While you could do this from IDEA’s built-in Keymaps settings page, using the Describe Key plugin is a much quicker way to do it. Thanks Vince for a nice little plugin!

February 23, 2008

IntelliJ IDEA Tip: Goto Class Coolness

Filed under: IntelliJ IDEA

IntelliJ IDEA continues to surprise me…the other day I was looking for a class in a package, but I wasn’t sure if the package was task, tasks, or something else, but I knew it started with the letter t. Lo and behold, IDEA’s Goto Class (typically the Ctrl+N shortcut) will help you with this problem:

Goto Class dialog

Here you can see that I’ve typed a letter, t, that I know is the start of the package name (which could be the first name, or the fifth dotted name) and then an asterisk (the wildcard) and then Task, because I know the class ends with Task. And IDEA will show you all of the classes that match. You don’t need the wildcard for the package name, the dot makes the wildcard implicit, i.e., if you use t.SomeClass, it knows that you want to find a class named SomeClass that’s in a package where the last part of the package name starts with the letter t.

February 22, 2008

IntelliJ IDEA Tip: Open All Files in a Changelist

Filed under: IntelliJ IDEA

Just a quick tip for today: when using version control, there are times when I want to switch to a set of files that are open in another changelist (what IDEA calls a list of files that would be submitted/checked-in at the same time). However, instead of clicking on each file in the list, you can right-click on the changelist title and then click on Jump to Source:

Open All Files In Changelist

IDEA will then open all of the files at once. If you don’t want all of the files opened, you can multi-select the ones you want and then do the right-click -> Jump to Source (or just hit F4, the default shortcut key).

February 21, 2008

IntelliJ IDEA Tip: Quick Lists

Filed under: Java, IntelliJ IDEA

IntelliJ IDEA 7 (from JetBrains) is my preferred development environment for Java (and Groovy as well). Even though I’ve been using it since it first came out many years ago, I still find features that I hadn’t noticed or different ways of using features that are well-known. There are also a number of high-quality plug-ins that deserve attention as well. This is the first in a series of such tips. I’d certainly welcome any tips that you might have.

Why Quick Lists?

As time goes by, the menus in IDEA get longer, with more nesting, especially if you have plug-ins. For example, the right-click menu on a file — at least in my environment — looks like this (with the Perforce nested menu showing as well):

Long Nested Menu in IDEA

Since Perforce is the version-control system in use at my company (Guidewire Software), I tend to use the Perforce operations quite a bit (no surprise there). However, having to navigate the long menus is annoying and, when my mouse isn’t cooperating, really frustrating. The first thing that I did was to assign keyboard shortcuts to my common actions: add, open for edit, submit file, etc. This works well for the more frequently used functions, but for those that I don’t use often enough to deserve shortcuts (or if they did, I’d forget them when I needed to use them), it’d be nice if there was a way to create a menu that had all of the Perforce functions that I need, without having to traverse down long, nested menus. Enter the Quick Lists.

Perforce Quick List

You can see how this is much better than the long menus, plus it’s easy to tie it to a keyboard shortcut: I use Ctrl+Shift+P (for Perforce).

Creating A Quick List

Go to the menu File -> Settings -> Keymaps

IDE Settings Keymap

You’ll see the Keymaps dialog, so click on the Quick lists tab:

Click Quick List Tab

And then click on the Add button Add Button to add a new Quick List. Enter a short name and a description, though the description is optional.

Defining the Quick List

Once you’ve named it, you can now start adding action items to your Quick List. On the left are all of the available actions and you simply select each one and add it to the right column. Since I’m creating a Perforce Quick List, I’ve navigated to the Perforce part of the tree, under Version Control.

Perforce Quick List Actions

Now that the Quick List has been created, I can assign a shortcut to it. Click on the Keymaps tab and now you’ll see the Perforce Quick List:

Quick List Keymap

Select Perforce, and then define a keyboard (or mouse) shortcut on the right side of the dialog. Click OK and you’re done.

Now whenever you want quick access to the commonly used actions, you can use the QuickList.

Get free blog up and running in minutes with Blogsome
Theme designed by Jay of onefinejay.com