IPS: um plug-in para templates de códigos associativos
MORAES, Rodrigo Vieira de. IPS: um plug-in para templates de códigos associativos. 2016. Dissertação (Mestrado em Ciência da Computação) – Universidade Federal de São Carlos, Sorocaba, 2016. Disponível em: https://repositorio.ufscar.br/handle/ufscar/8807.
Moraes, Rodrigo Vieira de
The APIs are becoming increasingly more popular and they play a important role in software development. However, many APIs are large and complex that makes them hard to learn. Among avaliable resources to learn to use an API, there are the code samples. A code sample can be used to demonstrate to a programmer how to use API’s components together to attain a specific goal. But, code sample are static and they haven’t information about how to adapt the code snippet shown as example to programmer’s context. Tools have been proposed to assist the programmers in finding and adapting code snippets that may be useful for a programming task. A specific type of these tools are the code template tools. Code templates are code snippets manually registered containing integration directives. The integration directives instruct the code template tool on how to adapt a code snippet to programmer’s context. In this work, code snippet tools are investigated and it is proposed a code template tool called IPS. It presents some novelties in relation to other code template tools. In the IPS, a code template can be associated to a Java class and the IPS has a code template recommender that is automatically updated as the source code is edited by the programmer. Also it is proposed the role parameters, a new concept for the parameters of code templates that extends the concept of the parameters associated to a type which is present in current code template tools. The role parameters has the objective of accepting arguments that would at first be incompatible with a specific type, but that obey a expected pattern.