Eclipse Postfix Code Completion

Tulus Tobing
2 min readApr 21, 2019

--

Code Completion yang akan di bahas pada bagian ini adalah code completion yang akan dihasilkan lewat penggunaan sebuah postfix didalam potongan code. Code completion ini akan menggunakan potongan code sebelumnya untuk mengakses code template yang sudah ada tersimpan didalam eclipse. Mekanisme ini tentunya akan sangat membantu para developer pada saat melakukan coding.

Instalation

Untuk menggunakan feature ini, silahkan tambahkan feature berikut.
Help -> Install New Software -> Add.

Lalu tambahkan :

https://raw.githubusercontent.com/trylimits/Eclipse-Postfix-Code-Completion/master/org.eclipse.jdt.postfixcompletion.updateSite/target/site/

Click add lalu install Postfix Code Completion. Selesaikan proses instalasi lalu restart eclipse;

Berikut beberapa postfix yang bisa digunakan menggunakan plugin ini.

.var template

Similar to the .var template, the .field template allows to assign an expression to a newly defined field.

.field template

Similar to the .var template, the .field template allows to assign an expression to a newly defined field.

.for template

The .for template shows up in the content assist if and only if an expression resolves to a java.lang.Iterable or array and allows to create a for-loop out of the expression.

.const template

Postfix Code Completion templates also allow to directly extract constants while coding, without using your mouse or scroll up to the member declaration area of the class. The templates .constpub and .constpriv extract a public, respectively a private constant.

Selain postfix tersebut, plugin ini juga akan menginstall beberapa code completion secara default :

Sumber :
https://github.com/trylimits/Eclipse-Postfix-Code-Completion#var-template

--

--