Last updated by 3 years ago

Page: STS 2.6.0 New and Noteworthy, Version:12

STS 2.6.0 includes Groovy-Eclipse 2.1.2. The new and noteworthy for the groovy tools is here (+).

General

  • There are no longer warnings produced in the grails project against source files coming from plugins.
  • Overriding the plugin install location (grails.project.plugins.dir) in a Grails project will now correctly be reflected in any linked source folders created for plugins.
  • There is now support for configuring the 'env' parameter when deploying Grails Apps on Tc server. There is now a property page for Grails App projects allowing the user to set the 'env' parameter used to deploy to the embedded Tc Server instance. Right-click on a Grails project and go to "Properties > Grails > Run On Server".
  • There is now UI support for setting System properties passed to Grails Commands. A preferences page under "Grails > Launch" has been added. It allows defining system properties that will be passed automatically to any Grails command executed from within STS.
  • There is now a 'new Filters' menu entry alongside other Grails specific 'new wizard' menu items.
  • grails-app/util is automatically added as a source folder to the classpath of new Grails projects.
  • Assistance is now provided for reconfiguring projects after changing the default grails install. When the user configures a new default Grails install, STS will now aid the user in deciding whether to modify existing projects that were using that default. If the user declines to upgrade the project, then the project configuration will be changed to explicitly use the non-default install.
  • Code completion for autowired service fields. The types of Grails autowired services are now correctly inferred in the Groovy Editor. You can see an example of this in the screenshot below where the type of urlService is inferred to be UrlService, which is a service class in the same Grails project.
  • Upgrade Grails Projects when project settings changed. If the user changes a Grails Project's project specific settings to use different Grails install, then it is reasonable to assume they will probably also want to upgrade the project contents in accordance with the new Grails version. STS will now popup a dialog offering to run the Grails upgrade command on the user's behalf.
  • Additional Right-click functionality in project explorer. It is now possible to invoke the grails commands "generate-all", "generate-views" and "generate-controller" from the "new" context menu.
  • Context sensitive initialization of Grails Command Wizard. Many Grails related menu items (new controller, new domain class, etc.) open the grails command wizard to execute a specific grails command. The logic for initializing the dialog has been extended. Now STS will try to guess useful values to put into the dialog, based on the element selected in the project explorer. For example, when invoking "generate views" the command expects a domain class as a parameter. So if a controller class was selected, the fully qualified name of the corresponding domain class will be placed into the dialog automatically.
  • Optional non-jar locking behaviour on Windows. On windows there is now an option to try and avoid Groovy-Eclipse locking jars and preventing them from being updated (or removed, in the case of attempting to uninstall a plugin in a grails project). Specify the system property -Dgreclipse.nonlocking=true when starting STS to activate the use of non locking classloaders. If no problems come up over the next few releases this may be made the default mode of operation. Locks should also be released (regardless of that system property setting) if the offending project is closed.

GSP Support

  • Navigation to GSP definition. Pressing F3 or CTRL-Click on a GSP tag will now open the tag's definition. This will work for built-in tags as well as custom tags.
  • Content assist for g:def defined variables. After using the g:def tag to define a variable in your GSP file, this variable will now be available in scriptlets that are in the scope of the tag.
  • 'New Groovy Server Page' wizard now accessible directly from Grails Explorer's 'new' context menu.