views:

204

answers:

1

People,

My team is just beginning to learn how to use COBOL on Eclipse (as part of the Rational Developer for System Z package) and one of our most desired features are code templates or code snippets.

What we'd like to have is a code completion based on snippets just like we have on Java. For example, when I type try and hit ctrl-space Eclipse shows me a list of completion options, where one of those is create a try/catch block. Well, in COBOL one could leverage this when creating, for example, embedded SQL blocks, like

EXEC SQL
    SELECT field, field, field,
    FROM table
WHERE field = value, 
      field = value
END-EXEC.

However, for some reason, it seems that Eclipse treats COBOL a little differently (no wonder why) from other languages. As such, when looking for the code templates in the preferences menu for COBOL, its appearance is very different from the Java one.

The question is: how does one uses Eclipse's code templates with COBOL?

A: 

Hi Bruno,

[Fair disclosure - I work for the vendor I mention below]

The answer probably depends on what COBOL & plug-in you're using. If you have the Micro Focus Eclipse product (either the one for Net Express or Server Express, or the Server Express Remote Development Option), the code snippets are supported. There's a number built in but you can also build your own.

You can get more details at http://www.microfocus.com/eclipse/

I'm afraid I don't know how/if other Eclipse plug-ins have similar capabilities.

Mark
It's IBM's own plugin, not Micro Focus. However, a curiosity: I've worked with Micro Focus before, but only with NetExpress and Visual Studio integration. Never knew you had eclipse plugins... can you point me to the differences?
Bruno Brant
Mark