• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

Eclipse 2024-03 now available - STRING TEMPLATES !!

 
Bartender
Posts: 11188
89
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows ChatGPT
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The new Eclipse has been release. Expect the JDK-22 to follow any day now.

FINALLY this Eclipse supports String templates as a "preview feature" which you have to enable in the preferences if you want to use. Templates was originally released in JDK-21 as a preview but Eclipse didn't support it until now.
 
Ranch Hand
Posts: 49
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I took a quick look online, is the main goal of string templates to provide an alternative to String concatenation using the + sign?
 
Bartender
Posts: 15743
368
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out the Motivation on the related JEP.
 
Marshal
Posts: 28486
113
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Interestingly, it let me use Structured Concurrency classes without checking the "Enable Preview Features" box in the project's properties. Not even a warning. Although it might have been different if I'd tried running the compiled code outside Eclipse, I suppose.
 
Chris Smithtopher
Ranch Hand
Posts: 49
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:Check out the Motivation on the related JEP.



Good stuff. Seems like it should make for some streamlined code where applicable
 
Master Rancher
Posts: 5250
85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I feel compelled to observe that IntelliJ has been supporting string templates for a while now.  And it correctly errors out if you use preview features without having the appropriate flags set, with a helpful message for how to set them.
 
Sheriff
Posts: 22895
132
Eclipse IDE Spring TypeScript Quarkus Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:Interestingly, it let me use Structured Concurrency classes without checking the "Enable Preview Features" box in the project's properties. Not even a warning. Although it might have been different if I'd tried running the compiled code outside Eclipse, I suppose.


Perhaps because that's not a language feature but an API feature?
 
Mike Simmons
Master Rancher
Posts: 5250
85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perhaps - but from the command line, I get an error like this:

 
We should throw him a surprise party. It will cheer him up. We can use this tiny ad:
Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders
https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing
reply
    Bookmark Topic Watch Topic
  • New Topic