169 | | You can open a view containing the list of files, called the //Database view//, by clicking **!RefactorErl > Database > Show Database** in the top menu. |
170 | | |
171 | | {{{ |
172 | | #!comment |
173 | | KÉP |
174 | | }}} |
175 | | |
176 | | When you click in the //Database view// with the right mouse button, a context menu will appear, containing all database management features. Some of them, like the //drop// and //show// features, are dependent on the files or directories selected in the view. |
| 173 | You can open a view containing the list of files, called the //Database// view, by clicking **!RefactorErl > Database > Show Database** in the top menu. |
| 174 | |
| 175 | {{{ |
| 176 | #!comment |
| 177 | KÉP |
| 178 | }}} |
| 179 | |
| 180 | When you click in the //Database// view with the right mouse button, a context menu will appear, containing all database management features. Some of them, like the //drop// and //show// features, are dependent on the files or directories selected in the view. |
207 | | After a successful query execution a view, called //Query result view// will appear with the results of your query. You can double click on a line of the result, and if it's possible, an editor tab will open with the file containing the content of that line, highlighting the content in question. |
208 | | |
209 | | The **!RefactorErl > Queries > Show query history** button will open the //Query history view//. Double clicking on a query in the //Query history view// will show a results of this query in a //Query result view//. Please note, that these are historical results, it may or may not be consistent with the current content of the database. |
| 211 | After a successful query execution a view, called //Query result// view will appear with the results of your query. You can double click on a line of the result, and if it's possible, an editor tab will open with the file containing the content of that line, highlighting the content in question. |
| 212 | |
| 213 | The **!RefactorErl > Queries > Show query history** button will open the //Query history// view. Double clicking on a query in the //Query history// view will show a results of this query in a //Query result// view. Please note, that these are historical results, it may or may not be consistent with the current content of the database. |
214 | | See the [wiki:RefactoringSteps wiki page about the available refactorings] for a detailed description of this feature. |
| 218 | Beyond source analysis, !RefactorErl is also capable of performing code transformations, commonly known as code refactorings. |
| 219 | |
| 220 | See the [wiki:RefactoringSteps wiki page about the available refactorings] for a detailed description of this feature and a complete list of available refactorings. |
| 221 | |
| 222 | Refactoring code with the Eclipse interface is easy. Just right click in an Erlang source code editor on the element you want to refactor, click on the **!Refactoring** menu and select the desired refactoring. |
| 223 | |
| 224 | {{{ |
| 225 | #!comment |
| 226 | KÉP |
| 227 | }}} |
| 228 | |
| 229 | Entries on top of the **Refactoring** menu are specific to the element you clicked. For example, **Rename function** appears (among others) when you right click on a function name, and **Rename variable** appears, when you right click on a variable. |
| 230 | Entries on the bottom of the menu are always visible irrespectively of the element you clicked. They are not always valid refactorings however. |
| 231 | |
| 232 | Note that while refactoring can affect more than one files (e.g. renaming a function will also change the references to this function in all files), !RefactorErl can only work on files added to the database. For this reason it's always recommended to upload the whole codebase you work with to the database, before you do any refactoring operation. |
| 233 | |
217 | | See the [wiki:Dependency wiki page about dependency analysis] for a detailed description of this feature. |
| 236 | !RefactorErl can create graphical graph representations of dependencies between modules, functions or groups of modules (called module blocks or function blocks). This feature is also called dependency analysis. The Eclipse interface provides means of supplying initial parameters to the analysis and also capable of showing the results inside Eclipse in various formats. |
| 237 | |
| 238 | See the [wiki:Dependency wiki page about dependency analysis] for a detailed description of the available initial parameters and result formats. |
| 239 | |
| 240 | To draw a dependency graph, select the **!RefactorErl > Draw dependency graph** button in the menu to open the //Dependency analysis// view tab. |
| 241 | |
| 242 | {{{ |
| 243 | #!comment |
| 244 | KÉP |
| 245 | }}} |
| 246 | |
| 247 | In this view, you can provide the parameters for the analysis, select output format and choose a directory to store the results for future use. Hit the **Draw dependency graph** button on top of the view tab to start the analysis. Note that this may take for a while, depending on how much data is stored in the database. |
| 248 | |
| 249 | {{{ |
| 250 | #!comment |
| 251 | KÉP mindháromról |
| 252 | }}} |
| 253 | |
220 | | See the [wiki:CloneIdentifiErl wiki page about duplicated code analysis] for a detailed description of this feature. |
| 256 | !RefactorErl provides a feature to search for code duplicates, i.e. sections of code whose syntactic and semantic structure are similar in some way or another. |
| 257 | This search can be conducted using different algorithms and parameterizations. See the [wiki:CloneIdentifiErl wiki page about duplicated code analysis] for the complete list of these algorithms and parameterizations. |
| 258 | |
| 259 | To use this feature, click **!RefactorErl > Clone !IdentifiErl** in the top menu to open the //Clone !IdentifiErl //view. You can select an algorithm from the box on the tip part of the view, and fill in the parameters in the bottom part. To start the search, click on the **Run analysis** button. Note that this may take a long time, depending on how much data is stored in the database. |
| 260 | |
| 261 | {{{ |
| 262 | #!comment |
| 263 | KÉP mindháromról |
| 264 | }}} |
| 265 | |
| 266 | The results will be presented as a list of pairs of file positions in a view called //Duplicated code analysis results//. Double clicking on an item of that list will show the duplicated code sections side by side in a dual-pane editor. |
| 267 | |