A JBoss Project
Red Hat
This is a summary page of all New & Noteworthy for 4.2.0.CR1, 4.2.0.Beta3, 4.2.0.Beta2, 4.2.0.Beta1, 4.2.0.Alpha2 and 4.2.0.Alpha1

What's New in 4.2.0.Final

General

General for JBoss Tools 4.2.0.Alpha1

JBoss Tools is now targeting Eclipse Luna.

In Luna M4 there currently are known issues with Eclipse SWT and GTK3 on various Linux distribution like Fedora 20.

You can try run with EXPORT SWT_GTK3=0 which make SWT used GTK2 which might will reduce some crashes.


Arquillian

Arquillian XML Editor

The Arquillian XML Editor makes Arquillian tests easier to configure.

arquillianxmleditor

The editor has been created using the Sapphire framework (http://www.eclipse.org/sapphire). It includes the following features:

  • editing arquillian artifacts (containers, groups, extensions, protocols and engines)

  • proposing possible values of containers and protocols

  • adding the required dependencies for containers and protocols

Related JIRA: JBIDE-16791

Arquillian Dependencies

The Create Arquillian Deployment Method action scans for all, direct and indirect dependencies. Those dependencies can be automatically added to the deployment using the Create Arquillian Deployment Method wizard.

dependentClasses

Related JIRAs: JBIDE-14525, JBIDE-14518

Refactor Arquillian validator

Now, the Arquillian validator uses AST to search for dependencies. This way, performance are significantly improved because we don’t have to create Arquillian archive(s) anymore. Likewise, the Arquillian validator is implemented as an Eclipse builder instead of JDT compiler participant which improves its stability.

Related JIRAs: JBIDE-16324, JBIDE-16331

ShrinkWrap Archive name/type validation

The Arquillian validator checks if an archive name extension matches an archive type.

validateArchiveName
validateArchiveName1

Related JIRAs: JBIDE-14780, JBIDE-14781, JBIDE-15657

Add Arquillian support

The Add Arquillian Support dialog is significantly improved. A user can decide if he wants to change the pom.xml file, which sections to change as well as which arquillian version to use. There is also the pom.xml preview page.

addArquillianSupport
addArquillianSupport1

Related JIRAs: JBIDE-14426, JBIDE-14428

Add missing type to deployment Quick Fix

Arquillian includes a new Quick Fix.

addMissingType

related_jiras::JBIDE-14528[]

Arquillia Cruiser View filtering

Arquillia Cruiser View contains a filter to filter active projects.

arquilliaViewFilter

Related JIRA: JBIDE-14524

Arquillia Cruiser View linking

Double-clicking an archive resource in the Arquillia Cruiser view opens the resource in the associatted Eclipse editor.

Related JIRA: JBIDE-14522


Aerogear

Hybrid Mobile (Cordova) Tools

Search and use Cordova engines from local file system

Hybrid Mobile tools can search and use Cordova engines from local directories. This permits custom Cordova engines to be used together with the tools. At this time only custom engines that adhere to the file and naming structure of Apache Cordova distributions will be recognized by the tools.

EnginePreferences

Related JIRA: JBIDE-16408

Preferences for default engine

A preference is added for selecting a default engine. Default engines are used when a configured engine for a project is removed and on the new project wizard to pre-select the engine. See above for a screen shot for the new preference node.

Related JIRA: JBIDE-16550

Plug-in registry is now cached

The registry information is now cached. This causes significantly less network calls when using Cordova Plug-in Discovery wizard.

Related JIRA: JBIDE-16692

Support for XCode 5.1

XCode simulator integration has been updated to support XCode 5.1 version.

Related JIRA: JBIDE-16744

Cordova Plug-in Discovery wizard has an option to show already installed plug-ins

There is a new "Show Installed" check box to show already installed Cordova plug-ins on a project.

showinstalled

Related JIRA: JBIDE-16257

Hybrid Mobile (Cordova) Tools

Restore Cordova plugins during import

On importing Cordova projects to the IDE, registry plug-ins referenced in the project config.xml files are automatically restored. This makes sharing Cordova projects within teams possible without adding plug-ins to a source control system. Additionally, project config.xml files are updated when plug-ins are added or removed from projects using the IDE Install and Remove Cordova Plug-in tools so you can be confident that the config.xml files contains up to date plug-in information.

See Gorkem’s post for a demo of the feature.

Related JIRA: JBIDE-17301

Hybrid Mobile (Cordova) Tools

Improved layout Cordova config.xml editor

Config.xml editor now provides quick access to actions common development actions.

RenewedConfigXML

Adjusted Run on Server support to XCode 6

Run on Server uses the XCode 6 features and has a new simplified UI

XCode6RoS

Related JIRA: JBIDE-18410

Restore for local and git plug-ins

In addition to plug-in registry, Cordova plugins that are installed from directories and git repositories can now be restored.

Related JIRA: JBIDE-18360

Hybrid Mobile (Cordova) Tools

Import Cordova projects

It is now possible to import Cordova projects and start using them as Hybrid Mobile projects, with the new import wizard. This feature can import projects that are created by Cordova CLI

importWizard

Related JIRA: JBIDE-13649

Add Cordova plug-ins when creating Hybrid Mobile Projects

The New Hybrid Mobile(Cordova) project wizard now provides plug-in selection pages. You can now select an initial set of Cordova plug-ins to be installed to a new Hybrid Mobile project. Starting with org.apache.cordova.console is highly recommended.

selectPlugin

Related JIRA: JBIDE-16728

64 bit iOS simulators are now supported

You can select to run 64 bit iOS simulators.

iOS64

Related JIRA: JBIDE-17099

CordovaJS library provider improvments

It is possible to get Content Assistant on 'cordova' Object as well as on its Properties and Methods in JavaScript.

ca cordovajs 1
ca cordovajs 2

Related JIRA: JBIDE-15837

Hybrid Mobile (Cordova) Tools

Multiple Hybrid Mobile Engine support

You can now download and select the Cordova engines and versions to use with your projects.

engineSelect

Related JIRA: JBIDE-14407


BrowserSim

Improving the way of handling unsupported plug-ins in CordovaSim

Now every time when CordovaSim can’t handle a plug-in, the following prompt is displayed:

Error message with unsupported plug-in info

Notifications can also be disabled in the Settings tab of CordovaSim’s preferences :

Unsupported plug-ins option

Related JIRA: JBIDE-17588

JavaFx web engine and debugger support on Linux

Now there is a Linux specific option (enabled by default) to enable GTK2 for the process launched by BrowserSim / Cordovasim. It allows using javaFx web engine and debugger on Linux:

GTK selection option

Related JIRA: JBIDE-16732

Multiple version support for Cordovasim

Now Cordovasim uses the same engine (cordova.js) as HMT (Hybrid Mobile Tools) and handles it in an appropriate way:

CordovaSim multiple version support

Related JIRA: JBIDE-16390

Eclipse logging for JavaFx web engine

Now the output of the main javascript console functions (console.log, console.info, console.warn, console.error) is displayed in the Eclipse console. The option is now available for both SWT WebKit and JavaFx web engines:

JavaFx Eclipse console logging

Related JIRA: JBIDE-16587

Battery Status support

Now CordovaSim has Battery Status support. It gives the ability to simulate batterystatus, batterylow and batterycritical events.

Battery Status support

Related JIRA: JBDS-2858

BrowserSim

JavaFx Web Engine

BrowserSim and CordovaSim have a new JavaFx web engine as an alternative to SWT WebKit engine. Web engine can be changed in Menu > Preferences > Browser Engine. This option is available for Windows and Mac OS users. Linux is currently not supported.

New JavaFx Web Engine

Related JIRA: JBIDE-15640

Chrome Debugger

Chrome Dev Tools Debugger is now available for BrowserSim / CordovaSim. This option is enabled only for JavaFx Web Engine and can be treated as a replacement of the Firebug Lite. Dev Tools Debugger can be enabled via Menu > Debug > Dev Tools…​

Chrome Debugger

Related JIRA: JBDS-2866

Eclipse Console Logging

Now the output of the main javascript console functions (console.log, console.info, console.warn, console.error) is displayed in the Eclipse console. This option is available only for SWT.WEBKIT for now.

Eclipse Console Logging

Related JIRAs: JBIDE-16485, JBIDE-16587

Easier usage of JavaFx web engine and debugger support on Microsoft Windows 64-bit

JavaFx is an alternative to SWT WebKit and enables Windows users to run BrowserSim and CordovaSim without having to install Safari and run these features with a 32-bit Java developer kit.

In past 32-bit was assumed/forced giving problems for users on 64-bit Windows. Now the BrowserSim and CordovaSim will be launched with the appropriate version without the user to start.

If you are on 32-bit Windows you can still install Safari to use SWT WebKit if preferred.

Related JIRA: JBIDE-17258

Process launch console output for BrowserSim / CordovaSim

Process launch console output is implemented for both SWT WebKit and JavaFx web engines. Not only the output of the main javascript console functions (console.log, console.info, console.warn, console.error) is displayed in the Eclipse console, but also logs and errors of the process. Also user can manipulate console (Pin Console, Scroll Lock, etc.) and close BrowserSim / CordovaSim via Terminate button.

Process launch console output

Related JIRA: JBIDE-16661

Linked folders support for CordovaSim

Linked folders are honored when project is run on CordovaSim.

Related JIRA: JBIDE-16931

Query parameters support for CordovaSim

CordovaSim now supports query parameters for the start page in launch configuration and via content tag in the config.xml.

Query parameters support

Related JIRAs: JBIDE-16388, JBIDE-16389


CDI Tools

Apache DeltaSpike Partial Beans

CDI tools recognize now DeltaSpike partial beans which are taken into account by the related tools features such as validation, code completion, hyperlinks, refactoring, etc.

Related JIRA: JBIDE-13419

CDI 1.1

CDI Tools now support CDI 1.1 projects. If your CDI project (with enabled CDI support) has CDI 1.1 jars in its classpath, CDI Tools will recognize it as CDI 1.1 project automatically. There is no need to use any special settings to distinguish CDI 1.0 from CDI 1.1 in CDI Tools.

Related JIRA: JBIDE-13228


Forge Tools

Connection Profiles

We provided deep integration between the Forge 2 database add-on and the Eclipse DTP project. Connection profiles created with Forge 2 can be used in DTP and the other way around.

Bring up the connection profile wizard as illustrated below.

connection

Fill out the fields to create the desired connection profile and push Finish.

wizard

Et voila, you can see the newly created profile in the DTP Data Source Explorer. Moreover you can connect to the data source and view the contents of the tables as illustrated below.

explorer

Embedded Forge Console

The embedded Forge console can now also be used with the included Forge 2 runtime.

forge230

You can switch between both consoles using a drop down menu in the Forge console toolbar.

dropdown

Forge 2 Runtime

Very good news for Forge 2 users! Forge 2 went final in the meantime and we included runtime version 2.3.0.Final.

f2startup

Lots of useful new commands have been implemented in the meantime. Bring up the list of available commands using the Ctrl+5 (or Cmd+5) keystroke.

f2commands

Forge 1 Runtime

The embedded Forge 1 runtime is now Forge 1.4.4.Final!

forge144

Forge 2 Runtime

The included Forge 2 runtime is 2.10.1.Final. See the release notes here

f2runtime

"Add Forge Runtime" feature removed for Forge 1.x runtimes

Given that Forge 1.x is feature-frozen for some months now, we decided to remove the "Add Forge Runtime" button in the Forge preferences and keep Forge 1.4.4.Final embedded as the only choice for Forge 1.x users.

addforgeruntime

Support for "cd #" and "cd #/PROJECT_NAME"

Now it’s possible to use "cd #" to navigate to the workspace location or "cd #/PROJECT_NAME" (where PROJECT_NAME is the name of the target project) to navigate to an existing project inside the current workspace.

Performance Improvements in "JPA: Generate Entities from Tables" command

A lot of performance improvements were made in the "JPA: Generate Entities from Tables" command.

Forge Console view is now available in the JBoss perspective

You can find the Forge Console view in the JBoss perspective by default.

Added "Clear Console" button to Forge Console

The Forge Console view now features a "Clear Console" button to clear the current output of the console.

clearconsole

We have added support for the "Go To Selection" (change the current resource in the console to be the selected resource in Eclipse) and "Link with Editor" (change the current resource in the console to be the selected resource in Eclipse when a file is open in the editor) console actions

gotoselection
linkwitheditor

Support for executing Forge 2 commands in Eclipse cheatsheet files

We have introduced a command to allow execution of Forge 2 commands (as Eclipse Wizards) given its name. The command also allows to pass pre-populated values for the chosen Wizard.

<command serialization="org.jboss.tools.forge.ui.runForgeCommand(org.jboss.tools.forge.ui.runForgeCommand.commandName=REST: Generate Endpoints From Entities)"/>

Forge 2 Runtime

The included Forge 2 runtime is 2.7.2.Final.

f2runtime

Previous Choices

The popup dialog containing the available Forge commands now shows the most recent choices at the top.

previous

Current Selection

As shown in the previous image, the popup dialog with the available Forge commands now shows the current selection from where the popup was opened. Also the wizards that are launched show this current selection in the title bar.

current

Forge 2 Runtime

The included Forge 2 runtime is 2.6.0.Final.

f2startup

Starting the Forge 2 runtime is now achieved using the Ctrl+4 (or Cmd+4) key combination, the same as for Forge 1 runtimes. When multiple Forge runtimes are installed this key combination starts the default Forge runtime, which is specified and changeable in the Forge preferences.

Forge 2 Wizards

As well as starting the Forge runtime, pressing Ctrl+4 (or Cmd+4) opens a window listing available Forge wizards. The list of wizards is responsive, changing based on the currently selected workspace object. The image below illustrates the available wizards when nothing in particular was selected.

noselection

As you can see, there are wizards for creating database connection profiles, for managing Forge addons and for creating a new project.

When a project is selected while pressing the magic key combination, more wizards become available as illustrated in the image below.

projectselection

Forge 2 Command Line Interface

The wizards above are also available as commands on the Forge command line. Open the Forge Console by navigating through the Eclipse menu (Window→Show View→Other…​→Forge→Forge Console) or by typing in the Quick Access text field.

The image below illustrates the available commands in the workspace root.

commandline

Hibernate Tools

Hibernate 4.3 and JPA 2.1

Hibernate Tools now supports JPA 2.1 and can now work with Hibernate 4.3 (while still continuing to work with Hibernate 3.x and previous 4.x).

Due to API changes in Hibernate 4.3, the Hibernate tools API is rewired to reduce classloader issues but some issues may occur despite the implemented fixes. In the future (possibly in the next major release), Hibernate Tools will be fully decouples from the underlying Hibernate Core to continue supporting multiple versions.


JBoss Central

New Hybrid Mobile project wizard

JBoss Central now features the Hybrid Mobile Project wizard to let you kickstart new Cordova-based mobile applications.

new hmt wizard

If the Hybrid Mobile Toolkit is not installed, you’ll be asked to install it, as well as a few useful companion features (CordovaSim, BrowserSim). When using JBoss Tools you’ll also be offered to add LiveReload and the Visual Plugin Editor, if these features are not already installed.

The Spring Project wizard, that was previously featured on JBoss Central, is still available in the File > New > Project…​ menu.

Related JIRA: JBIDE-16837

Early Access

We have introduced the concept of 'Early Access' features that can be installed from the Software/Updates tab of JBoss Central. These features are experimental or still being developed, so they may contain bugs and may not yet behave correctly.

To support these new incubating features, we’ve updated the JBoss Central view.

UI changes

On the Software/Updates tab of JBoss Central, you can now see a Show Early Access checkbox. Once selected, a disclaimer on the unsupported nature of the features you’re about to access will pop up. If you agree to it, the 'Early Access' features will be added to the list of available features. You can easily differentiate them thanks to their yellow background and the Early Access label at the right of the description, which provides a link to more information about how these features are (or are not) supported.

Early Access features can be installed and uninstalled just like regular features. Doing so will enable an additional software site from which these incubating components can be installed. Be aware that when updating Eclipse, this may cause some features to be updated unexpectedly.

central earlyaccess

Related JIRA: JBIDE-16375

Available features

The following features are included in the new 'Early Access' site within JBoss Central

  • Eclipse VJET: includes a JavaScript IDE, Java to Javascript Code Generation + Java Based DOM Kit

  • Arquillian Tools: Create, manage and run integration tests with Arquillian

  • AngularJS Eclipse: see below

Related JIRA: JBIDE-17318

AngularJS Eclipse

AngularJS Eclipse Plugin extends Eclipse WTP to provide:

  • an HTML editor which supports AngularJS expression and directive. See HTML features for more informations.

  • an Angular Explorer view which displays modules, controllers of your project in a tree.

  • a Javascript editor which supports AngularJS features (modules, etc). See Javascript features for more informations.

HTMLAngularEditorOverview

AngularJS Eclipse relies on the tern.java plugin to manage powerful completion on HTML files (AngularsJS Expression, directives, modules) and Javascripts files (see Tern Eclipse IDE).

If you are new to AngularJS Eclipse, please read this AngularJS Eclipse Getting Started.

Related JIRA: JBIDE-17278

Update and uninstall software from JBoss Central

From the same JBoss Central Software/Updates page used to install additional features, you can now update features (if a newer version is available), or uninstall them.

central update remove

Related JIRA: JBIDE-16592

New AngularJS with Forge project wizard

JBoss Central now features a new AngularJS with Forge project wizard to let you kickstart new JavaEE based applications with HTML5 and AngularJS for the front-end, while using the powerful JBoss Forge scaffolding capabilities.

new forge wizard

If the Forge Tool is not installed, you’ll be asked to install it. The wizard will also recommend you to install the AngularJS tooling.

Once you create the project skeleton from the new wizard, a cheatsheet will open and guide you through through the different steps necessary to use JBoss Forge and scaffold a UI layer based on AngularJS.

The Richfaces Project wizard, that was previously featured on JBoss Central, is still available in the File > New > Project…​ menu.

Related JIRA: JBIDE-16837


JST / JSF / HTML Editor

Ionic

Palette

We continue to add new widget wizards to Ionic Palette for HTML5 files.

palette

The following widgets are now available in this release:

  • list

  • side menu

  • refresher

  • button

  • text input

  • radio

  • toggle

  • checkbox

  • slidebox

  • tab

  • navigation

side menu

When a ionic widget is added to an HTML file the links to ionic JS/CSS CDN resources may also be created. These JS/CSS links can be edited in JBoss Tools Preferences.

ionic js

Related JIRAs: JBIDE-17728, JBIDE-18077

Content assist

Content assist (Ctrl+Space) for <ion-*> tags and their attributes is now supported by JBoss Tools HTML editor.

ionic ca

Related JIRA: JBIDE-17981

AngularJS support improvements

Target Platform is updated with the Tern.java v.0.6.0.201409041810 and JBoss Central Early Access is updated with AngularJS IDE v.0.5.0.201408281218 in order to bring the latest improvements and fixes of JavaScript and AngularJS support into JBoss Tools. AngularJS content assist and code highlighting now work in JBoss Tools HTML Editor.

angular

Related JIRAs: JBIDE-18273, JBIDE-17995, JBIDE-17979

JavaScript Editing improvments

Content Assistant in JavaScript is extended with the proposals on Objects, Properties and Functions of ECMA5 JavaScript Specification

js ecma5 1
js ecma5 2

Related JIRA: JBIDE-17159

AngularJS Eclipse Plugin integration

If you have AngularJS Eclipse Plugin installed in your Eclipse then JBoss Tools will enable AngularJS support in JavaScript projects automatically. For such projects, JBoss Tools HTML editor now provides AngularJS specific code assist, navigation, etc.

angular

AngularJS Eclipse Plugin is available for installation in the Software/Update tab of JBoss Central (you need to enable Early Access features first).

Related JIRA: JBIDE-17217

Multiple versions of jQuery in jQuery Mobile Palette

Since JBoss Tools 4.2.0.Beta2, jQuery Mobile Palette supports multiple versions of jQuery and jQuery Mobile JS/CSS files in the New Widget dialog.

If there are no jQuery files references in the HTML page when inserting a jQuery Mobile widget from the Palette, then the corresponding JS and CSS links are added to the header element of the page automatically by default (can be disabled).

page1
page2

Related JIRA: JBIDE-17032

Drag and Drop improvements

Drag and Drop from jQuery Mobile Palette was improved and inserts widgets in proper places on the page, not just wherever the cursor/mouse happens to be. For example if you trying to drop a new page into another page then the page will be inserted right after or before the existing page element. If there is no proper place for the widget then a warning message will be shown:

Related JIRA: JBIDE-16321

Palette entries via content assist

There is now one more way to insert an HTML5 widget from the Palette view. All palette entries are available via content assist (Ctrl+Space) as templates.

ca

Related JIRA: JBIDE-16687

HTML 5

jQuery Mobile

The palette view now supports jQuery Mobile 1.4. The palette detects the jQuery Mobile JS file version used in the HTML file and switches to the corresponding version: 1.3 or 14. It also can be switched manually. jQuery Mobile Palette v1.4 has its own set of wizards.

jqmPalette14

Related JIRA: JBIDE-16271

Content assist for data-* attributes supports JQM 1.4 too…​

Related JIRA: JBIDE-16294

  1. and for style classes (even if they defined in remote files):

jqmCA

Related JIRA: JBIDE-16294

New Form Button wizard is now available in jQuery Mobile (1.3 and 1.4) Palette:

formButton

Related JIRA: JBIDE-15659

There is a new option to generate a menu in New Panel wizard:

menu

Related JIRA: JBIDE-16322

Drag and Drop from Palette was improved. It now insert tags only in text nodes and don’t break any existing tags/attributes:

See screencast.

Related JIRA: JBIDE-16345

AngularJS

Attribute Content Assist

Content assist for AngularJS ng-* attributes is available in JBoss HTML Editor:

ng ca
ng class ca

Related JIRA: JBIDE-15378

Filename Content Assist

A new content assist works for full path and for file names in the following HTML tags:

  • <script src="*.js">

  • <link rel="stylesheet" href="*.css">

  • <img src="image files">

  • <video src="video files">

  • <audio src="audio filse">

  • <source src="video or audio depending on the parent element">

  • <a href="html files">

See screencast.

Related JIRA: JBIDE-15349

Creating a new file via Ctrl+Click

When Ctrl+clicking on the file name in any HTML link, for example on js/app.js in this snippet: <script type="text/javascript" src="js/app.js"></script> and the file does not exist JBoss Tools HTML Editor offers creating the file.

newFile

Related JIRA: JBIDE-15348

HTML5 Properties view

Properties view for HTML5 files was improved. It now provides an advanced look and feel for basic HTML5, jQuery Mobile and AngularJS components and attributes.

jqm

Related JIRA: JBIDE-15713

JSF

Servlet version 3.1

New JSF project wizard now supports servlets 3.1.

jsf

Related JIRA: JBIDE-15604

Non-standard HTML attribute validation (e.g. ng-*)

It’s now possible to ignore non-standard HTML attributes. We contributed that feature to Eclipse Luna (Milestone 6). This is typically needed when developing Angular JS applications as the HTML validator considers Angular JS ng-* attributes as invalid html (which is actually correct since the proper syntax to be 100% compatible with the html5 spec is to use data-ng-*).

ng

With this change we hope to now strike the right balance between those liking strict and those preferring relaxed validation.

Related JIRA: JBIDE-16622

Drop without dialog from Palette

When a widget from Palette view is dragged and dropped the corresponding New Widget wizard is opened to let you fine tune the content. This is great for beginners and complex tags but if you just want the default text you can now hold down Ctrl (for Linux and Windows) or Alt/Option (for Mac) and now when the widget is dropped to the HTML Editor the code snippet is inserted without any dialog.

Faster and more efficient.

Related JIRA: JBIDE-16636

New Heading wizard for jQuery Mobile Palette 1.4

New Heading widget (introduced in jQuery Mobile 1.4) is now available in HTML5 Palette view.

heading

Related JIRA: JBIDE-16486

JavaScript Editing improvements

Target Platform is updated with the Tern.java v.0.4.0.201407030911 in order to bring the latest improvements and fixes of JavaScript Content Assistant into JBoss Tools:

  • Embedded Node.js distribution provided for Windows x86/x86_64, Mac OS X, Linux x86/x86_64

  • Embedded Node.js is used by default, so tern works right out-of-the-box

  • ECMA5 and Browser Tern Modules are turned on by default for JavaScript projects

  • Cordova Tern Module is turned on by default for HMT projects

Related JIRA: JBIDE-17673

Ionic

In this release we introduce an initial support for Ionic widgets in the HTML5 palette view.

palette

Content

content

Related JIRA: JBIDE-17851

Header bar

header

Related JIRA: JBIDE-17728

footer

Related JIRA: JBIDE-17874

Tabs

tabs

Related JIRA: JBIDE-17912

Scroll

scroll

Related JIRA: JBIDE-17850

Content assist

All these widgets are also available as templates in code assist.

ca

Related JIRA: JBIDE-17852

We continue to work on this palette and more widgets are coming with the next release.


LiveReload

General

Optional Reload Delay

The LiveReload Server Configuration Editor now provides a "Reload Delay" option to set the number of seconds to wait before "reload" messages are sent to browsers.

This delay allows the application server to take the changes fully into account before the browsers send their request. According to some reports, in some cases the server returned an error because of resources or libraries still being reloaded when the requests arrived. This fix addresses this problem.

LiveReload Server Configuration Editor with Reload Delay option

By default, the reload delay is set to '0'. Once the configuration is saved, the LiveRoad server does not need to be restarted to use the new value.

The delay appears as a job running in the Progress View and it can be canceled if the wait period was set too high (in which case the "reload" messages are immediately sent to the browsers).

Related JIRA: JBIDE-14999


Maven

JBoss Maven Integration

Advanced options for maven repositories

The Configure Maven Repositories wizard, available under Preferences > Jboss Tools > JBoss Maven Integration, now allows you to choose the repository layout, enable/disable snapshots or releases, and change the update policy. These options can be found under the advanced section.

maven repository advanced

Related JIRA: JBIDE-14553

Pom properties-controlled project configurators

JBoss project configurators for m2e now support an activation property in the <properties> section of pom.xml. Expected values are true/false and override the workspace-wide preferences found under Preferences > JBoss Tools > JBoss Maven Integration.

Available properties are :

  • <m2e.cdi.activation>true</m2e.cdi.activation> for the CDI Project configurator,

  • <m2e.seam.activation>true</m2e.seam.activation> for the Seam Project configurator,

  • <m2e.hibernate.activation>true</m2e.hibernate.activation> for the Hibernate Project configurator,

  • <m2e.portlet.activation>true</m2e.portlet.activation> for the Portlet Project configurator.

The pom.xml editor also provides matching XML templates for these properties, when doing ctrl+space in the <properties> section.

Related JIRA: JBIDE-17884

JBoss Maven Integration

m2eclipse-egit integration

The Import > Checkout Maven Projects from SCM wizard doesn’t have any SCM provider by default, which can be pretty frustrating at times. With Git becoming the new de facto source control system, it only made sense to make m2eclipse-egit the sensible default SCM provider for m2e.

m2eclipse-egit will now be automatically installed when a JBoss Maven integration feature is installed from the JBoss Tools update site.

It will be installed by default with JBoss Developer Studio 8.0.0 as well.

Related JIRA: JBIDE-16574

JBoss Maven Integration

Automatically identify local Maven repositories

In the Configure Maven Repositories wizard, available under Preferences > Jboss Tools > JBoss Maven Integration > Add Repository, you can scan for JBoss Maven repositories unzipped locally, with the Recognize JBoss Maven Enterprise Repositories…​ button, in order to automatically add it to your .m2/settings.xml.

recognize maven repo

The identification process now looks for a .maven-repository file at the root of the folder you selected. This file follows the .properties file format and is expected to contain up to 3 attributes :

  • repository-id : the repository id

  • name : a (descriptive) repository name. Optional, defaults to repository-id

  • profile-id : the profile id the repository will be activated from. Optional, defaults to repository-id

As a concrete example, the JBoss Mobile repository .maven-reppsitory file would contain :

repository-id=local-jboss-mobile
name=JBoss Mobile Maven Repository
profile-id=local-jboss-mobile

Related JIRA: JBIDE-14553

JBoss Maven Integration

Maven Central Archetype catalog

Since m2e 1.5.0 no longer downloads Nexus Indexes by default, a very small, outdated subset of Maven Archetypes is available out of the box.

To mitigate that, the JBoss Tools Maven integration feature now registers by default the Maven Central Archetype catalog, providing more than 9600 archetypes to chose from, when creating a new Maven project. Accessing the complete list of archetypes is even way, way faster (a few seconds) than relying on the old Nexus index download.

maven central catalog

Related JIRA: JBDS-3033

JBoss Maven Integration

Maven Profile Management UI

We contributed the Maven Profile Management UI to the m2e project. You get the same features, the Ctrl+Alt+P shortcut still works but all that is now part of m2e itself (starting from m2e 1.5 Luna M6).

The Maven Profile Management feature was removed from the JBoss Tools update site and the Red Hat Developer Studio installer.

Related JIRA: JBIDE-15836


OpenShift

OpenShift Server Adapter now supports JEE7

Prior to JBoss Tools 4.2.0.CR2 one could not deploy JEE 7 projects to OpenShift. The OpenShift server adapter complained that it was not supporting version 3.1 of the J2EE Web module specification. In this new milestone we now fixed this.

Related JIRA: JBIDE-18365

Disable bad SSL Ciphers

JBoss Tools could not connect to OpenShift when run on openjdk 1.7/Linux while the server was running on Red Hat Enterprise 6.6. OpenJDK 1.8, Oracle JDKs, Windows and MacOS machines were not affected. This was caused by the server offering DHE cipher keys larger than 1024 bits. The cipher provider in openjdk 1.7/linux were not able to handle these and failed handshaking (see https://bugzilla.redhat.com/show_bug.cgi?id=1131221). OpenJDK fixed this bug with openjdk-1.7.0.71 (see https://rhn.redhat.com/errata/RHSA-2014-1633.html). For our users that are stuck with the failing combination we offer the following system property that disabels the faulty DHE ciphers: We now allow you to disable the causing cipher with the following system property (the flag is off by default):

-Ddisable_bad_sslciphers=yes

You can add this to your eclipse.ini and avoid the problem.
We also provide an automatic mode where we test the jdk for it’s ability to handle DHE cipher keys > 1024 bits and disable the DHE ciphers accordingly:

-Ddisable_bad_sslciphers=auto

Related JIRA: JBIDE-18454

Incorrect output directory for Wildfly (Quickstart)

When you try to deploy an existing project to OpenShift the tooling gladly assists you and adds the OpenShift maven profile to the pom.xml in your project. When using a Wilfly 8.1 Quickstart the tooling created an incorrect outputDirectory in the OpenShift profile causing the deployment to fail. We fixed this for CR2.

Related JIRA: JBIDE-18397

SSL Certificates

Untrusted SSL Certificates

In case the server sends an SSL certificate that we cannot verify, we’ll now present it to you. Allowing you to accept or refuse it.

certificate dialog

Related JIRA: JBIDE-14768

Existing Projects

Show All Projects

When creating a new OpenShift application you can choose to merge it with your existing workspace project. By default, the selection dialog will filter out projects that are shared with a non-git source control and internal Remote System Explorer projects. Nevertheless We’ll show all projects if you check Show all projects.

show all projects

Related JIRA: JBIDE-16357

Configure an OpenShift Application for your project

JBoss Tools 4.2.0.Beta adds New/Import OpenShift Application to the configure context menu of your workspace project in the package explorer and navigator. This allows you to create a new OpenShift application for your project via its the context menu. Simply pick Configure → New/Import OpenShift application and we’ll present you the application wizard.

Once the OpenShift application is created, we’ll merge it into your project. Pushing it back via our server adapter or via (E)git will deploy your project to OpenShift.

package explorer configure

Related JIRA: JBIDE-10546

Start an Application from Quickstarts

In JBoss Tools 4.2.0 Beta2 you will be able to start new applications from the promoted OpenShift quickstarts. A quickstart will configure the appication-, add-on cartridge(s) and the application template code for you.

new quickstart

The quickstarts comes with predefined list of cartridges for setup. If that list allows you to choose between versions you can Edit them.

pick alterntive addons

Related JIRA: JBIDE-14744

Snapshot and Restore/Deploy

Snapshots allow you to backup and restore your OpenShift application to and from a .tar.gz archive. Full snapshots contain all local files of your application, including the logs.

context menu snapshot

There is more than just backup and restore in snapshots: Binary deployments are also possible via Deployment snapshots. Deployment Snapshots allow you to deploy to OpenShift without using git.

save deployment snapshot

JBoss Tools allows you both full and deployment snapshot via radio buttons in the snapshot wizard.
You can read all the details about (deployment) snaphots in the OpenShift user guide

Related JIRA: JBIDE-10456

Fully fledged Server Adapter context menu

We geared towards making your life easier and added all application related actions to the OpenShift server context menu (Servers view). We also reorganized the context menu of the OpenShift Explorer to better match the defaults used in Eclipse.

server adapter context menu

Related JIRA: JBIDE-15897

Edit domain members

OpenShift allows you to add and remove other users to your domain and grant them view or write permissions. In JBoss Tools 4.2.0.Beta3 we added a link to the domain wizard. Hitting this link points your browser to the webpage in the OpenShift where you can manage your domain members.

edit domain members

Related JIRA: JBDS-2777

Choose the local changes that you want to publishing to OpenShift

JBoss Tools 4.2.0.Beta3 now allows you to pick the files that you want to publish. Once you tell the OpenShift server adapter to publish, it checks the pending changes and lists them in a dialog. You may then stage the ones you want to push and provide a commit message.
The very same is true for the inital import of your OpenShift application: The application-/import-wizard lists the files it changed and allows you to commit and push them back to OpenShift.

commit and push dialog

Related JIRA: JBIDE-10541

Save and restore Snapshots to/from your workspace

You can now save and restore your OpenShift application snapshots to and from your Eclipse workspace:

save snapshot to workspace

Related JIRA: JBIDE-17413

Application wizard

Downloadable Cartridges and all new UX

We overhauled the application wizard that was becoming pretty crowded.

We also introduced support for downloadable cartridges. Downloadable cartridges in OpenShift allow you to pass a git repository url which contains your custom cartridge.

Your cartridge code may run as web- (standalone) or add-on-cartridge (embedded cartridge). JBoss Tools supports both breeds.

New Application wizard

When you launch the OpenShift application wizard you will get to chose whether you want to use your existing application or create a new one.

create new or import existing

Use an Existing Application

Using your existing application is as easy as picking it from the list of all your OpenShift applications. You may freely type it’s name and get content assisted when typing. Alternatively you may hit browse and choose among your applications across all your domains.

select existing application

Code Anything custom cartridge

When creating a new application you will have to choose the application type (cartridge) up-front. You may choose among the predefined cartridges that are shipped with your OpenShift server. Alternatively you may also decide to provide your own framework code via the url of your git repository ("Code Anything").

downloadable cart type

Adding Cartridges

The page for configuring application details such as the name, domain, gear and the add-on (embeddable) cartridges now only shows cartridges you have added. Initially the list will be empty.

application configuration

You now can add embeddable cartridges. Here you can choose among the predefined ones or provide your own cartridge code.

downloadable cart embedded

Related JIRA: JBIDE-15905

New Github page for openshift-java-client

Corey Daley, Ninja Hacker and Stackoverflower for OpenShift, created an extensive project page for the openshift-java-client at http://openshift.github.io/openshift-java-client/. You can get verbose instructions on how get started, sample code and where to get further help. Kudos!

Publish local commits only

Lately we introduced a commit dialog that allows you to take full control of the files being published: you can pick the files, provide the commit message etc. This commit dialog had now been simplified to have just two buttons: One to cancel and another one to commit and publish. If the only thing that you want to do is committing (without pushing), then you should be using git operations directly on the project.

commit and publish

Once you selected files and provided a commit message JBoss Tools will commit and push to OpenShift. If there are no local changes missing in the OpenShift remote the "Commit and Publish"-button turns to "Publish Only". The dialog will then warn you that you are only pushing local commits leaving the dirty files alone.

commit and publish only

Our commit dialog is based on the EGit commit dialog and we thus can take advantage of existing features like the possibility to inspect changes:
Double click on the dirty files and get a visual diff of them.

commit and publish diff

Related JIRA: JBIDE-17905

No automatic Commit nor Publishing upon Import

When you import an OpenShift application to your workspace we add/modify a .gitignore file, possibly add an OpenShift profile to your maven pom, etc. to increase the likelihood of your project working out-of-the-box. In prior releases JBoss Tools committed those changes directly without giving you a chance to review them.

publish committed changes

In CR1 we made publishing more explicit, we do not commit nor publish upon import. We allow you to decide what files you want to commit, what message you want to use and when you want to publish.

With the more flexible commit dialog this gives a more unified and powerful workflow.

Related JIRA: JBIDE-17984

Configure OpenShift Markers now from Server Adapter

You can now access OpenShift markers from the server adapter context menu.

server adapter configure markers

Related JIRA: JBIDE-17977


Project Examples

New Cordova Client + Restful back-end example available

A new mobile application example, contacts-mobile-basic, has been added to the Mobile Applications category of project examples. This example, featured in the Start from a sample section of JBoss Central, combines an Apache Cordova-based front-end client, communicating with an Apache Maven-built, JAX-RS-based back-end service.

Related JIRA: JBIDE-16838


Server Tools

JMX Support

JVM Monitor UI available from Servers View

Previously, the JVM Monitor UI (visible in the properties view) was only available if your selection was in the JMX Navigator. The UI can now be activated by changing selections in the Servers View as well.

JVM Monitor UI visible from Servers View selections

Related JIRA: JBIDE-18064

JBoss Server Adapters

Hot Code Replace ENHANCED!

In the past, deciding when to forcefully restart a module was a tough question, and often led to behavior that upset one group or another of our users. We think the most recent changes strike a great balance between the various usecases.

When your server is run in debug mode, modules will not be restarted by default, and will also not match against the regular expression for restart behavior visible in the server editor. Instead, we will allow hot-code replace to take over the bulk of these changes. If the user wants, though, they can still full-publish their module manually to force a module restart.

In the event that the hot-code replacement fails, due to either obsolete methods on the stack or a changing method signature, the users will now be presented with a dialog that allows them to terminate or restart the server, ignore the changes, or redeploy the modules.

Hot-Code Replace - Dialog

This setting can also be changed or reset in the Server Editor.

Hot-Code Replace - Server Editor

We feel this change will really improve the user experience, and finally unifies the disparate use-cases into a more logical workflow that fits better with the Eclipse development experience.

Related JIRA: JBIDE-18094

JBoss Server Adapters

Deployment over management

AS 7, EAP 6 and WildFly server adapters now support deploying over management as opposed to the file management api.

The advantage of deployment over management is that you can do this with local and remote servers without having direct access to the filesystem (you of course need to have access to the management api).

The disadvantage compared to file based deployment is that you cannot do incremental updates, it has to be full deployments. Thus if you have large deployments or want to update files incrementally the local/file based deployment is to be preffered.

Optional runtimes for remote servers

Servers configured as remote no longer require a runtime locally installed. Allowing you to do deployments/queries remotely.

Remote servers allow optional runtime

Adding a local runtime to your server helps with finding things like default ports, and may be required for proper functioning of some lesser-used functionality like the JMX explorer, but for most operations, a remote server no longer requires a local runtime to be present.

Whether or not a profile requires a runtime is determined by how that profile functions. Servers configured for local use always (currently) require a local runtime, while remote servers don’t anymore.

Related JIRA: JBIDE-15162

Profiles

All the server adapters for JBoss AS, WildFly and EAP now has a notion of profiles.

A profile is a set of functionality and pre-configured options that help you decide how you want to run your server and what types of actions it should take for all the different types of functionality.

While earlier server adapters still only have two such profiles (local and remote servers), any server adapter based on JBoss AS 7 or later will have two additional options, specifically whether or not to prefer using "Management" operations instead of filesystem operations.

A server set in a profile preferring management operations will connect to the server’s management service to perform actions such as shutdown, deployment, and determining the state of the server. A server not preferring management operations will continue to, for example, run a shutdown command over ssh to terminate the server, or send files over ssh to your remote server’s deployment folder.

Selecting the profile for your server

Above, you can see how to select the profile you want to use. When you select a profile you will get another page asking for the details needed for that profile. The image below shows how that looks for a remote server.

Configuring your remote server’s details

Related JIRA: JBIDE-9212

Deploy-Only server

Profiles

Deploy Only server now supports two profiles: local and remote. Local is similar to how it worked before (deploy files locally) and remote is adding support for deploying via Eclipse RSE system (such as secure copy over SSH).

The first step of the New Server wizard is to select either one or the other of these profiles.

Selecting the profile for your Deploy-Only Server

When configuring the server for local use, a deploy folder and a temporary deploy folder are required.

Configuring the Deploy-Only Server for local use

When configuring the server for remote use, you’ll be asked to also provide a hostname for the server.

Configuring the Deploy-Only Server for remote use

Start and Stop Scripts

The Deploy-Only server now allow optional start and stop scripts which are used when launching and stopping the server.

Previously Deploy-Only just assumed the server was started, now you can tell it to actually do a start and stop command.

Toggling whether to take launch or shutdown actions

By default there are no start and stop commands available.

Viewing the launch configuration for a server that will not launch

If you toggle the "Server is externally managed" you will be able to specify commands for start and stop.

Viewing the launch configuration for a server that will launch

When attempting to shut down your server, the command you’ve entered will be executed on the local or remote system. If the shutdown command fails, though, the Deploy-Only server will attempt to kill the process that was used to launch the server. Users configuring the Deploy-Only server to run the launch or shutdown scripts that wrap a java command (such as JBoss AS, EAP and WildFly) terminating these scripts may not actually terminate the backing java command.

Related JIRA: JBIDE-7515

JBoss Server Adapters

JBoss and Wildfly Runtime classpath containers now honor JBoss Module system

Previously, JBoss and Wildfly runtimes in your eclipse workbench would provide classpath containers that consisted of a set of jars found by filesets. If you wanted to update, change, or remove entries, you’d need to customize the list of entries in a preference page, where your only options were to add or remove filesets with includes and excludes patterns.

This "worked", but it really wasn’t good enough. It became downright wrong, though, once the Wildfly servers gained a patching ability to upgrade servers. Finding the proper jar was no longer as simple as using a fileset with an easily located base directory, but instead became dependent upon the actual details of your installation.

Now, that same preference page allows you to add a custom classpath entry for a JBoss module identifier. The classpath containers will search all appropriate directories based on the current state of the installation to locate the correct versions of the jars to be added to your eclipse project’s classpath.

If you already customized the list and want the new classpath resolution you need to reset the settings. You do this at Window → Preferences → Server → Runtime Environment → Default Classpath Entries and select "Restore Defaults".

JBoss module classpath entries

Related JIRA: JBIDE-9479

Classpath containers will also support jboss-modules dependencies!

Those same classpath containers mentioned above will also be able to customize the container results if your project’s manifest.mf includes a "Dependencies" attribute as specified by https://docs.jboss.org/author/display/MODULES/Manifest+module+information [Wildfly’s documentation].

In general, this feature is most useful if your project is making use of the application server’s lower level functionality, or if your deployment is intended as, or has dependencies on, a JBoss Module.

Related JIRA: JBIDE-17236

JMX enhanced with JVM Monitor

JVM Monitor

The MBean Explorer, currently renamed to the JMX Navigator, has an exciting new addition. After connecting to a given JMX Connection, the properties view will now fill up with an expansive UI for profiling many aspects of your running server. The functionality itself is a fork of JVM Monitor, and most of the documentation of that project still applies, though there are some changes.

JVM Monitor is essentially a profiling agent, which will attach its library to your running java application in order to capture profiling data. The profiling data is polled repeatedly, allowing charts, call-trees, thread states, and many other utilities that you’ll find useful in debugging all sorts of problems on your running server.

Also, the JMX Navigator can automatically detect java processes running on your machine, and expose them for both JMX browsing and profiling. This profiling ability is available not just for servers but for all java launches, if you choose to make use of it.

For Beta2, only the automatically detected processes will have this integration with the properties view, but we expect to expand the integration efforts substantially in the upcoming releases.

JVMMonitor Integration

Most of the documentation for this expansive new functionality can be found at http://www.jvmmonitor.org/doc/index.html. Be aware, though, that not all of the documentation applies currently. Most notable is the absence of a JVM Explorer view. While no complete list of differences is available at the moment, we expect to make one available for our GA release.

Related JIRA: JBIDE-17309

JMX Support

Grouping of connections

The JMX Navigator now has three groupings: User-defined connections, Server connections, and Local Processes. This categorization makes it clearer where the connection comes from. As connections are added to or removed from the view, the overall ordering will no longer be disturbed, which could otherwise be distracting.

JMX Navigator Categories

Related JIRA: JBIDE-17639

JBoss Server Adapters

Servers and Execution Environments

Servers can now specify either an execution environment or specific JRE to be used for its launch. The list of available environments or JREs are based on the server type.

Servers and JREs

Related JIRA: JBIDE-17646

Modifying server profile

Modifying a server profile often requires some changes to various settings. Without these changes, the resultant server adapter may be in a inconsistent state. For example, a remote server that does not expose its management port should not be using the management API to determine if the remote server has started successfully.

Until Beta3 you could not change this via the UI, now you can. There is now a "Behavior Profile" hyperlink in the server editor to change the used profile via a wizard.

Once the wizard is complete, the server editor will save, close, and re-open to pickup the latest changes.

Changing Server Profile

Related JIRA: JBIDE-17636

Servers

Extensive Rewrite

JBoss AS Server Tools has had an extensive rewrite for the Alpha2 release. The goals of this refactor were to more easily support an expanding set of usecases and options for servers. With these changes, we will be able to add support for several new features, such as launching your server in domain mode, publishing over the JBoss Management API, server adapters not requiring a local runtime installation, as well as a smoother workflow for creating your server adapters.

While we believe all existing features are still functioning normally, there may, as always, be bugs or errors that we didn’t catch. Please open a JIRA, or post on our forums, if you catch anything that seems strange, misleading, or incorrect. While the Alpha2 release should look pretty much identical to what you’re used to, you’ll see at some of these changes in our next milestone.

Related JIRA: JBIDE-15915


Usage

JVM name usage

JVM name and architecture (32/64 bit) are now collected for usage statistics to help JBoss Tools team to learn more about how our users are using the tooling. JBoss Tools also tracks events when the runtime detection mechanism creates a new server.

All information which is going to be collected is reflected in Preferences > JBoss Tools > Usage Reporting for you to review.

As always JBoss Tools will not send any information before a user have opted in, nor is there any personal information sent.

Related JIRAs: JBIDE-15596, JBIDE-17520

Usage tracking for installs and server creation

Usage reporting is now able to track individual events besides just pure startups. In this beta we activated two kinds of event tracking.

  • Installs from JBoos Tools Central

  • New server creation

ga

These we will use to learn more about how our users are using the tooling and improve tooling going forward.

All information which is going to be collected is reflected in Preferences for you to review:

preferences

As always JBoss Tools will not send any information before a user have opted in, nor is there any personal information sent.

Related JIRAs: JBIDE-16800, JBIDE-16424

Usage tracking for wizards, Forge Tools, HTML Editor, Cordovasim, Browsersim

A few new usage events have been added to this milestone release:

  • Number of times JBoss Tools HTML/JSP Editor (Source/Visual tab) and HTML5 Preview are activated

  • Class name of completed IDE wizards

  • BrowserSim and CordovaSim engine names (JavaFx or Webkit) and number of times started

  • Forge Tools runtime version and number of times started

These will be used to learn more about how our users are using the tooling and improve it going forward.

All information which is going to be collected is reflected in Preferences > JBoss Tools > Usage Reporting for you to review.

As always JBoss Tools will not send any information before a user have opted in, nor is there any personal information sent.

Related JIRAs: JBIDE-17320, JBIDE-17305, JBIDE-17232, JBIDE-17458

Web Services Tester Usage Tracking

The Web Services Tester is a view that helps users submit SOAP-style or plain HTTP requests on an endpoint to see how it responds.

From the "JAX-RS Web Services" node in the Project Explorer, users can select an endpoint and click on Run As>Run on Server or Debug As>Debug on Server to automatically deploy the project on an application server, have the view opened and submit a request. A dialog window will ask for values to set in the URI template if necessary.

ws tester kitchensink

As from JBoss Tools 4.2.0.CR1, we are starting to track usage for the Web Services Tester. In particular, we will collect the number of requests submitted with the WS Tester, per type of requests. This data will be aggregated by the Usage plugin and submitted once a day, on the following day, in order to keep the impact on the users’machines as low as possible.

Please remember that all the collected statistics are anonymous and that users can always choose to NOT send any data if they don’t want to. For more information about usage tracking, please read the documentation.

Related JIRA: JBIDE-17233


Visual Editor

HTML Preview as a separate plugin

HTML Preview is a WYSIWYG plugin for HTML pages. Preview is not coupled with a particular editor, but editor must have DOM model support. HTML Preview has several cool features like:

  • automatic refresh (enabled by default)

  • refresh on save

  • navigation from source to view and vice versa

html preview

HTML Preview can be enabled via Quick Access > HTML Preview. More info about HTML Preview can be found in our blog.

Related JIRAs: JBIDE-16908, JBIDE-16919, JBIDE-16920

HTML Preview as a part of VPE

HTML Preview could also be treated as a possible XULRunner substitution for plain HTML pages (JSF/xhtml still requires XULRunner). The point is that, when XULRunner is unavailable, HTML Preview will be used in "Visual/Source" and "Preview" tabs of the VPE.

html preview vpe

Related JIRAs: JBIDE-16414, JBIDE-16925, JBIDE-16926, JBIDE-16927


Web Services Tools

As-you-type Validation

As-you-type validation occurs in the scope of the java element (type declaration or method) that is being edited. If the java element corresponds to a JAX-RS element, this later is validated. Note that as opposed to "cascade validation" (see below) that occurs when the underlying file is saved, the related JAX-RS elements are not validated "as-you-type", in order to keep the process as fast as possible.

Related JIRA: JBIDE-17308

When fixing problems in a class, all related JAX-RS elements are included in the set of classes of to be validated, which means that related problems can end up being resolved too.

For example, let’s assume that a user has the following classes:

public class Car {

	public Car fromString(String value) {
		return ...;
	}

}

and

@Path("/cars")
public class CarResource

  @POST
  public Response createCar(Car car) {
    ...
  }
}

In this example, the JAX-RS validator will report a problem on the CarResource#createCar(Car) method because the Car class is not a valid parameter: the Car#fromString(String) method should actually be static. When the user adds the missing static modifier on the Car#fromString(String) method and saves the file, not only the Car class will be validated, but also the CarResource, and at the end of the day, the problem reported earlier will be resolved.

Related JIRA: JBIDE-17368

Support for Resource Fields, Resource Properties and Parameter Aggregators

JAX-RS Resource Fields and Properties (ie, fields or setter methods annotated with @PathParam, @QueryParam, @MatrixParam), as well as the JAX-RS 2.0 Parameter Aggregators (ie, method parameters, fields or setter methods annotated with @BeanParam) are recognized.

These elements are taken into account when validating the project and when displaying the Endpoints URI templates in the Project explorer.

For example, let’s assume that a user has the following class:

@Path("/cars")
public class CarResource {

	@MatrixParam("year")
	private String year;

	@QueryParam("color")
	private String color;

	@GET
	@Path("{id}")
	public Response getCar(@PathParam("id") String id) {
		return ...;
	}
}

In that case, the Endpoint URI template associated with the Resource Method and displayed in the Project Explorer will be /{id:String};year={String}?color={String}

Now, if the user has the following classes:

@Path("/cars")
public class CarResource {

	@GET
	@Path("/{id}")
	public Response getCar(@PathParam("id") String id, @BeanParam OptionalParams options) {
		return null;
	}
}

and

public class OptionalParams {

	@QueryParam("color")
	public String color;

	private String year;

	public String getYear() {
		return year;
	}

	@MatrixParam("year")
	public void setYear(String year) {
		this.year = year;
	}

}

then the Endpoint URI template associated with the Resource Method (and its associated Parameter Aggregator) and displayed in the Project Explorer will also be /cars/{id:String};year={String}?color={String}

In this second example, it is the @BeanParam annotation on the method parameter that is used to link to the Parameter Aggregator.

New JAX-RS Wizard for Resource and Application creation

Two new JAX-RS wizards now replace the former "Create Sample RESTFul Web Services" wizard:

  • a wizard to create a new JAX-RS Application. This wizard lets the user choose between creating a subclass of javax.ws.rs.core.Application or defining a <servlet-mapping> element in the project’s web deployment descriptor.

JAX-RS Application Creation Wizard
  • a wizard to create a new JAX-RS Resource. This wizard provides the user with default settings for the class name, the @Path value at the type level and the supported media-types (by default, application/json and application/xml). The wizard also provides with code skeleton generation for CRUD methods.

JAX-RS Resource Creation Wizard

The JAX-RS Resource creation wizard also allows for JAX-RS Application creation if none already exists in the project. This step can be skipped if the user plans to deploy her project on a non-Java EE platform. A third option, labelled "Skip the JAX-RS Application creation", is displayed on the "JAX-RS Application" dialog page shown above.

The JAX-RS Resource wizard can be invoked from "File>New" in the menu bar and in the project’s menu. It also appears in the Servlet group in the toolbar, both in the Java EE and JBoss perspectives.

Both JAX-RS Resource and Application wizards can be invoked from a selected element in the Project Explorer, including classes, packages, source folders and the "JAX-RS Web Services" node. The default values will depend on the current selection.

Related JIRA: JBIDE-17151

JAX-RS parameters validation and support for ParamConverterProviders

The JAX-RS tooling now validates the parameter types in the Resource Methods. In particular, it verifies that the parameter types meet one of the following requirements:

  1. Primitive types.

  2. Types that have a constructor that accepts a single String argument.

  3. Types that have a static method named valueOf or fromString, with a single String argument that return an instance of the type.

  4. List<T>, Set<T>, or SortedSet<T>, where T satisfies #2 or #3 above.

  5. Types for which a ParamConverter is available via a registered ParamConverterProvider (new addition in JAX-RS 2.0).

Related JIRAs: JBIDE-15592, JBIDE-16763

Quickfixes

When defining custom NameBinding and HttpMethod annotations, the @Target and @Retention meta-annotations must be set with appropriate values. Not only the JAX-RS Tooling has been recognizing those custom annotations and validating the values of the aforementioned meta-annotations for a while, but it also now provides users with quickfixes to set the expected values from the error marker in the Java editor (and not only from the Markers view).

java annotation value quickfix

Related JIRA: JBIDE-17177

JAX-RS 2.0 Support

Tooling for server-side JAX-RS 2.0 development is almost complete (see New and Noteworthy of JBoss Tools 4.2.0.Beta1). The 2 remaining features to implement are:

  • Support for @BeanParam annotation on Resource Methods parameters and Resource fields. This annotation allows for injection user-defined beans whose fields and properties may be annotated with JAX-RS param annotations.

  • Provide JAX-RS Fields type validation. This is a similar feature to what’s been implemented in this release with regards to Resource Method parameter validation, but applied on Resource fields.

Related JIRA: JBIDE-16329

Server-side JAX-RS 2.0 Support

JAX-RS 2.0 is part of JavaEE7 and JBoss Tools now provides you with support for this update of the specification.

JAX-RS Filters and Interceptors

The JAX-RS tooling now detects server-side JAX-RS Interceptors and Filters, i.e., implementations of javax.ws.rs.ext.ReaderInterceptor, javax.ws.rs.ext.ResponseInterceptor, javax.ws.rs.container.ContainerRequestFilter and javax.ws.rs.container.ContainerResponseFilter.

Such implementations are included into the JAX-RS Metamodel associated with the parent Eclipse project, and the JAX-RS validation does not complain anymore when they are annotated with @Provider.

Related JIRA: JBIDE-16753

Custom Name Binding annotation

The new @NameBinding meta-annotation is detected when found on a user-defined annotation. This user-defined annotation can be used to bind specific Filters and Interceptors to a Resource Method or a Resource (and hence, all methods of this resource) or to the whole Application.

@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(value = RetentionPolicy.RUNTIME)
@NameBinding
public @interface CustomInterceptorBinding {}

Related JIRA: JBIDE-16824

Validation

The JAX-RS validator reports a problem if the user-defined @NameBinding annotation(s) on a Filter or Interceptor is(are) not bound to a Resource, a Resource Method or the Application (and vice-versa), as the JAX-RS Specification states:

A filter or interceptor class can be decorated with multiple binding annotations. In this case, in accordance with the semantics described in CDI, all those annotations must be present in the resource class or method for the binding to be established.

Also, the @PreMatching annotation is only allowed on implementations of javax.ws.rs.container.ContainerRequestFilter (in which case, the user-defined Container Request Filters are invoked before the Resource method is matched). The JAX-RS Validator will report a problem if this annotation is used on any other type of JAX-RS element.

Related JIRAs: JBIDE-16752, JBIDE-16754

When a Filter or Interceptor is annotated with a user-defined name binding annotation, then an hyperlink on this annotation provides the user with navigation to the associated resources/resource methods/application that have the same user-defined annotation (and vice-versa).

For example:

@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(value = RetentionPolicy.RUNTIME)
@NameBinding
public @interface CustomInterceptorBinding {

}

with

@ApplicationPath("/app")
@CustomInterceptorBinding
public class RestApplication extends Application {

}

and

@Provider
@CustomInterceptorBinding
public class CustomResponseFilterWithBinding implements ContainerResponseFilter {

	@Override
	public void filter(ContainerRequestContext requestContext,
                     ContainerResponseContext responseContext)
			throws IOException {
		...
	}
}

In that case, ctrl (or cmd) ` click on @CustomInterceptorBinding allow for navigation between all those 3 classes.

jaxrs namebinding navigation

Related JIRA: JBIDE-16829

JAX-RS Endpoint template

The JAX-RS Endpoint templates that are displayed in the Project Explorer have been updated: each parameter name in the @Path, @QueryParam and @MatrixParam annotations is followed by its type as shown below:

  • /rest/customers/{id:Integer} (a @Path named id and of type java.lang.Integer)

  • /rest/customers?start={int}&size={int:20} (two @QueryParam parameters, named start and size, both primitive int, the later one with the optional @DefaultValue set to 20).

Related JIRA: JBIDE-12029


back to top