Spring Tool Suite 3.8.1/3.8.0: New and Noteworthy

Updates and Fixes in 3.8.1

Pivotal tc Server updated to 3.1.5

The latest Pivotal tc Server release 3.1.5 is now included in the STS distribution bundle.

Important Changes and Fixes



Spring Tool Suite 3.8.0: New and Noteworthy

Table of Contents

General Updates

Requirements

STS 3.8.0 requires a JDK 8 to run properly.

Eclipse Neon (4.6.0)

The default STS distribution is now based on the recently released Eclipse Neon (4.6) release.

Highlights from this Eclipse Neon release include substring code completion for Java content assist, word-wrap in text editors, commands/shortcuts/pinch gestures to zoom into text editors (especially useful when giving presentations), and more. Please find additional details in the Eclipse Neon New and Noteworthy.

Pivotal tc Server updated to 3.1.4

The latest Pivotal tc Server release 3.1.4 is now included in the STS distribution bundle.

Support for Spring Insight removed

The support for Spring Insight that was part of the tc-server support got removed.

Buildship notification

We added a plugin from Eclipse Buildship to notify our users of using Eclipse Buildship instead of the legacy STS support for Gradle in the future.

Spring Tooling

Spring Boot Dashboard: customizable labels for CF targets

You can now change the labels for CF target nodes in the Boot Dashboard. To do so, right-click a node and select "Customize... -> Customize Label...":


You can type in any name you like. In addition to plain text you can also use a few placeholders in there:


In case you don't remember those placeholders, don't worry. You can hover over the text field for some help.


Spring Boot Dashboard: advanced support for multi-app manifest files

A single manifest.yml may specify deployment properties for multiple applications. When deploying an app, the Deployment Properties dialog's YAML Content section highlights application names and allows the user to choose one, by clicking on the visual annotations in the vertical ruler.


Spring Boot Dashboard: choose to remember password or not

The Cloud Foundry Target creation wizard and login dialog now have a "Remember Password" check-box. If you choose not to remember the password then you will be prompted to enter Cloud Foundry login credentials when connecting to the Cloud Foundry target or after restarting STS. Otherwise, the password will be stored in Secure Storage and you will not be prompted to enter the password again. Note that on Linux, you will still be prompted for the Secure Storage master password.


Spring Boot Dashboard: Skip SSL validation for Cloud Foundry targets

Skipping SSL validation is now supported when creating Cloud Foundry targets in the Spring Boot Dashboard.


Spring Boot Dashboard: customizable apps manager URL

The boot dashboard allows you to quickly jump to the web console of the apps manager of a Cloud Foundry target that you confgured in the boot dashboard. However, the URL of the apps manager can vary, depending on the version and configuration of your PCF installation. Therefore the boot dashboard allows you to customize the URL it uses to jump to that web console (via "Customize... -> Customize Cloud Admin Console URL"):


Spring Boot Dashboard: filter apps by project name

The filter in the boot dashboard is now also aware of project names. No need to organize your projects into working sets anymore, just type in a part of the project name and see the filtered list of projects in the boot dashboard.


Spring Boot: Additional code templates

Based on input from Spring Boot Core developers we have created some code templates useful in developing Spring/Spring Boot apps.

The templates are invoked through Eclipse's content-assist (i.e. you press CTRL-SPACE) and shown as completions when you type the template's name (or even just a part of the name).

Some templates are context-sensitive. This means that there are multiple versions of the template that expand into a different pattern depending on the context you are in. For example the notnull template expands to something that uses JUnit's assert in test code; it expands into something that uses Spring's assert anywhere else.

Below is a table showing all the templates we have added in this release:

Name[context] Screenshot
main
notnull[spring]
notnull[test]
jumockmvcwac
logger
logi
loge
logw
rtex

Spring Boot: JAR type search now asks for confirmation

"Jar Type Search" is a feature that was introduced in STS 3.5.0. It provides content-assist proposals in Spring Boot projects, for types that are not (yet) on the classpath. When selecting such a proposal the required dependency is automatically added to the project's maven pom.

Some people liked this, but others found it confusing or annoying rather than helpful because it was too easy to add undesirable elements to a pom accidentally.

STS 3.8.0 addresses this by asking for explicit confirmation before making changes to your pom. The confirmation dialog also has a "Disable" button, which you can click to disable it completely.


Spring Boot: trigger devtools restart manually

Spring Boot applications that have the boot devtools included in their classpath can quickly be restarted (without shutting down the JVM completely). This can now be triggered manually from the console:


Improvements to the Spring Boot YML and Properties Editors


Validation of comma-separated lists in the .properties editor

The Spring Boot Properties editor now knows how to check the validity of a list of comma-separated values. For example:

Content-assist in comma-separated lists in the .properties editor

Quickfix for deprecated properties in yml and properties editor

Both the yml and properties editor now provide a quickfix for deprecated property names (if the property defines a replacement in its metadata).

Note: The yml quickfix is smart enough to move a renamed property to a different place in the yml structure as needed:

Basic content-assist for 'Resource' type in yml/props editor

Both the yml and properties editor now provide some basic content assist for configuration properties of type org.springframework.core.io.Resource. Content assist suggestions are generated by scanning your project's source-folders for 'resources'. In a future release we may extend this to do a broader scan to look also for 'resources' in the project's dependencies.

Support for 'class-reference' value provider

Configuration properties with 'value provider' metadata of type 'class-reference' now are handled by both the yml and properties editor. For example property spring.data.mongodb.field-naming-strategy comes with the following metadata attached:

The editor now understands what this means and will suggest names of classes that implement the FieldNamingStrategy interface from the project's classpath.

Support for handle-as value-provider

Handle-as value provider can be used in spring-boot configuration property metadata to designate that a property ostensibly declared as a vanilla type such as String should be treated as something more specific (e.g. org.springframework.core.io.Resource). Both yml and properties editor now understand this metadata.

Check for duplicate keys in yml and properties editor

Both the yml and properties editor now check for duplicate keys and flag them with an error marker:

Better handling of enum values in yml and properties editor

Both yml and properties editor now are able to show the JavaDoc for enum values when hovering over them or in the side-panel of a content-assist suggestion. For example:

Note 1: Hyperlink navigation with 'CTRL-Click' now also works for enum values, taking you to the source-code of the corresponding enum constant.

Note 2:JavaDoc in Eclipse in general, is only available when source-jars have been downloaded and associated with the binary jars. If you do not get JavaDoc hovers where you expect them, verify that source code for the enum in question is attached before reporting this as a bug.

Note 3:There are still cases, especially in the properties editor, where hover-info and/or CTRL-click does not yet work, in particular when the enum-value occurs on the left-hand-side of the '=' of a property-assignment. We plan to resolve these issues in a future release.

Cloud Foundry Manifest YML Editor

Content Assist for Cloud Foundry Buildpacks

Content assist for buildpacks now proposes buildpacks dynamically from Cloud Foundry targets in the Spring Boot Dashboard. It will list buildpacks from any Cloud Foundry target, not just Pivotal Web Services.



Developer Productivity Bits

We implemented a number of little things to improve the general developer productivity when working with the Spring Tool Suite and Eclipse. Here are the little improvements in detail.


Additional code templates

Based on input from Spring Boot Core developers we have created some code templates useful in Java apps in general. Below is a list of the templates that where added as a result:

Name[context] Screenshot
asl
jumock
eerule[test-member]
eerule[test-statement]
formatter-off

Note: The "formatter-off" template is special and can be applied from the "Surround With..." menu:


Toggle Line Number Visibility Action:



Want to rename tests, too?

After you rename a class, STS will check if there is a test class with a similar name. If it finds one, it will ask you if you want to rename that too.

More Defaults for Static Imports in Favorites

Additional default types containing static members have been added to Content Assist for imports, including some from springframework libraries. Users can customize the list through "Favorites" preferences, as well as restore the default list.




Improved Quickfix for Unresolved Types in Assignments

Quickfix on unresolved Java types now matches the return type of an assignment statement.



Java quickfix improvements in STS can be disabled, and the original Eclipse JDT quickfix feature restored, by adding the following VM arg to the STS.ini file and restarting STS:

-Denable.sts.quickfix.imports=false


Miscellaneous

Issues resolved in this release

Here is a full list of resolved bugs and enhancement requests for 3.8.0:

STS issue tracker

Spring IDE issue tracker


Useful Links

Download STS: https://spring.io/tools/sts/all

STS Issue tracker: https://issuetracker.springsource.com/browse/STS


Known issues in this release

Spring Boot dashboard ngrok tunneling feature doesn't support Spring Cloud Services yet

The Spring Boot Dashboards ngrok tunnel feature doesn't work yet with remote service registries from Spring Cloud Services. Instead it works with self-deployed Eureka service registry apps on CF only (as described here). We are working on enhancing the ngrok tunnel feature to directly support Spring Cloud Services in the near future. In the meantime we published a tech note that describes how to setup ngrok tunneling in combination with SCS manually.


Conflicting duplicate lifecycle mapping errors in Maven projects upgrading from STS 3.6.x

Sometimes Maven projects show up with a red error (talking about a duplicate lifecycle mapping conflict) after upgrading STS from 3.6.x to the latest 3.7.2 version. In this case, please update the Maven support for Eclipse/STS to the latest version, as described here: STS-4236.


Error after updating from STS 3.7.0

Sometimes after updating an existing STS 3.7.0 installation to 3.7.1 an error dialog pops up and STS doesn't start. This is a known but not yet solved problem. If you come across this issue, please press "OK" on the dialog and restart STS. It will open up fine, including all the updated components.


No repository available when checking for updates

If you have used a pre-release version of Eclipse Mars or STS, the embedded Eclipse Oomph technology created a cache of p2 repositores in your home directory. This cached p2 data can cause issues when using STS 3.7.0 or Eclipse Mars. The error message looks like STS/Eclipse fails to read information from the main Eclipse Mars p2 repository.

In case you encounter this error, please stop Eclipse/STS, go to your home directory, delete "~/.eclipse/org.eclipse.oomph.p2", and restart Eclipse/STS. The related Eclipse bug is: Bug 470912.


Live configuration-metadata generation requires Spring Boot 1.2.2

Spring Boot 1.2.1 configuration processor does not work correctly when executed from Eclipse's incremental build. This issue is fixed in Spring Boot 1.2.2. This only affects 'live' metadata generated from your own source code, not the metadata that is packaged inside spring-boot jars themselves. So you can still use older versions of Boot, but the 'live metadata' updates will not be accurate. See Spring Boot issue GH-2313 for details.


Dashboard and Retina Displays

When running STS on top of a JDK7, the new dashboard looks a bit blurry when using a HiRes (Retina) display, for example on a Retina MacBook Pro. This is due to the underlying browser technology that is used to display the dashboard content and that is coming from JavaFX. The JavaFX version that ships with JDK7 doesn't support retina displays. The solution for this is to run STS on top of a JDK8 build. The JavaFX version that comes with JDK8 supports retina displays.


Dashboard on JDK9

The JavaFX-based main STS dashboard doesn't work when running STS on top of an early-access version of JDK9. As a workaround run STS on a JDK8 or switch the dashboard back to the old (non-JavaFX-based) version via the preferences.


Silent loss of Functionality on Java 7 or earlier

STS 3.8.0 requires a JDK 8 to run on top of. If you are running it with an older JDK this may not be immediatlely apparant, but some of STS functionality will simply be 'absent' because the corresponding plugins are automatically disabled by OSGI because their requirements are not satisfied at runtime. See also below 'Setting the JDK'.


Setting the JDK

STS 3.8.0 requires a JDK 8 to run on top of. Nevertheless the native Eclipse launcher component might pick up a JRE or an older JDK automatically if you don't specify which JDK to run STS on top of. To avoid this, you can specify the JDK in the sts.ini file that comes with your STS installation. Add a line at the beginning "-vm" and an additional line below that which points to the "javaw" executable of the JDK on your machine.


Issues on Linux (GTK3)

Eclipse 4.5, upon which STS and GGTS are based, is the first Eclipse release where GTK3 is the default for the SWT widget library. There are some issues with this still:

You may also experience other UI rendering glitches. If you exprience any of these problems you can avoid them by forcing SWT to switch back to using GTK2. Just set the environment variable "SWT_GTK3=0" before launching STS or GGTS.


New and Noteworthy for previous releases

STS/GGTS 3.7.3

STS/GGTS 3.7.2

STS/GGTS 3.7.1

STS/GGTS 3.7.0

STS/GGTS 3.6.4

STS/GGTS 3.6.3.SR1

STS/GGTS 3.6.3

STS/GGTS 3.6.2

STS/GGTS 3.6.1

STS/GGTS 3.6.0

STS/GGTS 3.5.1

STS/GGTS 3.4.0

STS/GGTS 3.3.0

STS/GGTS 3.2.0

STS/GGTS 3.1.0

STS/GGTS 3.0.0

STS 2.9.2

STS 2.8.1

STS 2.7.2

STS 2.6.1.SR1

STS 2.5.2.SR1