A JBoss Project
Red Hat

Posts tagged with 'javaee'

The JavaEE part of the Tools now contains support for JSR-352 batch files. I’d like to show you the main features of the new visual editor available in JBoss Tools 4.3 and Developer Studio 9.

It extends the tree-form editor previously developed by the JBoss Tools team. There are now 3 ways to edit the batch XML files, represented by the 3 editor tabs:

  • Source (XML text editor)

  • Design (tree-form editor)

  • Diagram (visual editor)

Visual Editor for JEE Batch

Focus on Structure

The goal of the Diagram tab is to visualize the flowchart-like structure of batch jobs. Don’t bother editing the XML by hand and tracking down paths in your batch’s workflow. Instead, you can manipulate batch elements directly with your mouse.

Just select the proper objects from the palette, place them in the diagram and draw transitions among them. The editor visualizes all step, flow, split and decision elements, transitions using next attribute and next on elements and also terminating elements (fail, stop, end). If you need to edit elements nested inside a flow, just double-click its icon to switch the contents of the editor to the flow internals.

You also don’t need to reorder XML elements to set an element as a start. Just use Set as Start action.

Properties View

The diagram is useful for displaying structures but sometimes we would like to different things like to assign a Java bean to a batchlet. That’s when the Properties View comes in handy. Its content is changed according the current selection in the diagram and it serves for filling in various form data.

Properties View

Tip: Use Ctrl+Space to get content proposal.

Edit Anywhere

The diagram editor is integrated with the tree-form editor and the XML text editor in the way that all changes are propagated immediately between these three views. Use any of the editor tabs and you’ll see the changes reflected in the other tabs.

Content Assist

The editor is aware of the batch nature of your project and provides content proposal. It helps to fill in names batch artifacts such as jobs or flows, specific Java classes (your subclasses of ItemReader ItemWriter etc.) or exception classes. You may refer to your beans also by their name defined by the @Named annotation.

Get It Now

Just download the latest 9 release of JBoss Developer Studio or 4.3 version of JBoss Tools to get started. To quickly create a new file, try e.g. the wizard for creating batch files by selecting File  New  Other  Batch  Batch Job XML File.

Enjoy using the editor and give us some feedback!

Tomáš Milata
@tomas_milata

While JBoss Forge has been included in JBoss Tools and Developer Studio for a while now, the recent JBoss Tools 4.2 and Devloper Studio 8.0 releases contain support for Forge 2.12.1. Forge has now become a mature component inside JBoss Tools and Developer Studio with a plethora of available commands that can be executed either using the convenient wizard style or using the integrated Forge console.

Wise Wizards

To use the wizards, you need to issue the Ctrl+4 key combination (or Cmd+4 on a Mac). It will bring up a popup containing all the commands that are available in the currently selected context.

forge command popup

If this key combination does not work, chances are high that you are using a keyboard layout such as AZERTY. Don’t panic, in this case it is just a matter of redefining the key combination to something that works on your hardware. Use the Eclipse preferences dialog (Window→Preferences or something similar) to do this.

forge keys prefs

Selecting the 'Project: new' entry of the popup will open the Forge wizard that allows you to create a new project.

forge project new wizard

Core Console

If you are a console afficionado and typing and code completion is more your thing, you can use the integrated Forge console. One way to bring up the console is to type 'Forge Console' in the 'Quick Access' text field in the toolbar of your Eclipse workbench and then select the 'Forge Console' entry that is visible in the popup.

forge quick access

Another way would be to select 'Window→Show View→Forge Console' from the main menu bar. This will only be possible when you are using the 'JBoss' perspective. In another perspective, you can use 'Window→Show View→Other…​' and then navigate to the 'Forge→Forge Console' entry.

forge show view

In the console you can type Forge commands to perform the same tasks as if you were using the wizard-style approach.

forge project new console

Chatty Cheatsheet

If you are new to Forge, this new feature will certainly help you on the way. And as a bonus it will also help you with learning to develop an HTML5 application with REST, CDI and AngularJS. You can open this brand new cheatsheet by importing the 'AngularJS Forge' example from the 'JBoss Central' page.

forge angularjs central

In case the 'JBoss Central' page is not open or you inadvertently closed it, no worries. You can always bring it back by clicking the 'JBoss Central' icon in your Eclipse toolbar.

forge jboss central

After clicking the 'AngularJS Forge' example hyperlink, a wizard will guide you through the import process. Just accept all the defaults. When the wizard is done, a popup will ask you if you want to open the cheatsheet.

forge angularjs import

Make sure you keep the open option checked when you click the 'Finish' button. Now the cheatsheet will reveal itself in all its glory.

forge angularjs cheatsheet

There is no point in repeating here all the information that is available in the cheatsheet but in short, it will provide you with some general information and then guide you through the development, deployment and execution of a HTML5 application. You will see different examples of using Forge commands such as REST endpoint generation and scaffolding an AngularJS user interface. Check it out!

Happy Forging,
Koen Aers
@koentsje

JBoss Tools 4.29.1.Final for Eclipse 2023-09

by Stéphane Bouchet on Jun 13, 2024.

JBoss Tools 4.29.0.Final for Eclipse 2023-09

by Stéphane Bouchet on Nov 02, 2023.

JBoss Tools 4.28.0.Final for Eclipse 2023-06

by Stéphane Bouchet on Jul 03, 2023.

JBoss Tools for Eclipse 2023-06M2

by Stéphane Bouchet on Jun 05, 2023.

JBoss Tools 4.27.0.Final for Eclipse 2023-03

by Stéphane Bouchet on Apr 07, 2023.

Looking for older posts ? See the Archived entries.
back to top