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
March 2024 0/0 0 0
February 2024 428/687 15 6
January 2024 384/691 22 8
December 2023 450/671 12 8
November 2023 421/686 17 3
October 2023 377/673 25 9
September 2023 379/663 22 3
August 2023 352/673 25 6
July 2023 395/668 19 4
June 2023 405/669 19 5
May 2023 348/671 32 4
April 2023 355/667 29 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