Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "PTP/photran/code templates"
(New page: = Overview<br> = Code templates allow the user to begin typing a construct and then use content assist to "fill in" the rest of the construct. This will be particularly useful for P...) |
m (→Overview) |
||
Line 1: | Line 1: | ||
− | = Overview<br> = | + | = Overview<br> = |
− | Code templates allow the user to begin typing a construct and then use content assist to "fill in" the rest of the construct. This will be particularly useful for Photran, since Fortran is a verbose language: every "if" is accompanied by "then" and "end if," every "module" by "end module," etc.<br> | + | Code templates allow the user to begin typing a construct and then use content assist to "fill in" the rest of the construct. This will be particularly useful for Photran, since Fortran is a verbose language: every "if" is accompanied by "then" and "end if," every "module" by "end module," etc.<br> |
− | + | [https://bugs.eclipse.org/315666 Bug 315666] has been opened for this contribution. | |
= Links<br> = | = Links<br> = |
Latest revision as of 16:14, 3 June 2010
Overview
Code templates allow the user to begin typing a construct and then use content assist to "fill in" the rest of the construct. This will be particularly useful for Photran, since Fortran is a verbose language: every "if" is accompanied by "then" and "end if," every "module" by "end module," etc.
Bug 315666 has been opened for this contribution.
Links
Kurt Hendle provided the following:
The following 6 links should be a really good foundation on how to enable everything and actually make templates to go along with the Photran editors.
how to actually make it possible to add templates:
http://eclipse.dzone.com/articles/how-enable-template-feature-cu
making effective templates(same website as above):
http://eclipse.dzone.com/news/effective-eclipse-custom-templ
how to make a template:
http://www.java-tips.org/other-api-tips/eclipse/how-to-add-your-own-code-template-in-eclipse.html
IBM tutorial on using templates (requires creating an account):
https://www6.software.ibm.com/developerworks/education/os-eclipse-code-templates/index.html
Eclipse reference on adding templates to a custom editor:
http://help.eclipse.org/help33/ntopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/editors/text/templates/package-summary.html
Good example on enabling templates in a custom editor:
http://is00hcw.spaces.live.com/blog/cns!30EBEBD8BCD440DC!490.entry