Java coded templates ( or code snippets )

Add this URL to your Eclipse Installation to reach this solution's update site.

Oxygen (4.7), Neon (4.6), Mars (4.5), Photon (4.8), 2018-09 (4.9), 2018-12 (4.10), 2019-03 (4.11), 2019-06 (4.12), 2019-09 (4.13), 2019-12 (4.14), 2020-03 (4.15), 2020-06 (4.16), 2020-09 (4.17), 2020-12 (4.18), 2021-03 (4.19)

https://github.com/florianingerl/com.florianingerl.javacodedcompletionproposals/raw/master/releng/com.florianingerl.javacodedtemplates.updatesite/target/repository

Learn more...
Solution Description

This is an Eclipse plugin that allows the user to write code templates (or code snippets) for the Java editor where some template variables are computed from other template variables.

You can manage your Java-coded templates via the menu Window -> Preferences -> Java -> Editor -> Java-coded templates. Hit the New-button to start coding a new template.

E.g. the following would be code for a template for a private field with a getter-method

private ${type} ${field_name};
public ${type} ${getter: (String type, String field_name) ->
{
String s = Character.toUpperCase( field_name.charAt(0) ) + field_name.substring(1);
if(type.equals("boolean") )
return "is" + s;
else
return "get" + s;

}
}(){
return ${field_name};
}

After having successfully written your template, just type the first letters of the template's name into a Java editor and invoke content assist via Ctrl + Space.

Categories: Editor

Additional Details

Eclipse Versions: Oxygen (4.7), Neon (4.6), Mars (4.5), Photon (4.8), 2018-09 (4.9), 2018-12 (4.10), 2019-03 (4.11), 2019-06 (4.12), 2019-09 (4.13), 2019-12 (4.14), 2020-03 (4.15), 2020-06 (4.16), 2020-09 (4.17), 2020-12 (4.18), 2021-03 (4.19)

Platform Support: Windows, Mac, Linux/GTK

Organization Name: Florian Ingerl

Development Status: Mature

Date Created: Monday, May 22, 2017 - 16:19

License: EPL

Date Updated: Friday, January 15, 2021 - 10:10

Submitted by: Florian Ingerl

Screenshot
Date Ranking Installs Clickthroughs
February 2025 388/609 9 13
January 2025 416/654 12 14
December 2024 431/654 10 8
November 2024 432/658 12 2
October 2024 358/663 22 8
September 2024 476/642 8 7
August 2024 362/641 18 11
July 2024 452/663 10 12
June 2024 416/681 14 12
May 2024 413/682 16 9
April 2024 401/687 18 11
March 2024 357/694 31 6
View Data for all Listings

Unsuccessful Installs

Unsuccessful Installs in the last 7 Days: 0

Download last 500 errors (CSV)

Marketplace Drag to Install Button

By adding the following code below to your website you will be able to add an install button for Java coded templates ( or code snippets ).

HTML Code:

Markdown Syntax:

Output:

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client

Reviews Add new review