104 | | After clicking **Next** on this window, Eclipse will lead you through a series of simple steps before the installation. After the installation is finished, you will need to restart Eclipse. |
| 110 | After clicking **Next** on this window, Eclipse will lead you through a series of simple steps before the installation. After the installation is finished, you will need to restart Eclipse. |
| 111 | |
| 112 | To start using !RefactorErl, open the **!RefactorErl Perspective** by clicking **Window > Open Perspective > Other > !RefactorErl** in the top menu. |
| 113 | |
| 114 | [=#firsttime] |
| 115 | == First time launch |
| 116 | If the plugin installation was successful in the last step, an error message will appear the first time the **!RefactorErl Perspective** is opened. This happens because we didn't set the path to !RefactorErl yet. |
| 117 | {{{ |
| 118 | #!comment |
| 119 | KÉP |
| 120 | }}} |
| 121 | |
| 122 | The !RefactorErl plugin can automatically start a local !RefactorErl application and connect to it. Please, see the corresponding section of this guide, if !RefactorErl is not yet installed on your system. |
| 123 | It is also possible to connect to a !RefactorErl application running on a remote server. You do not need to install !RefactorErl on your local system to do this. |
| 124 | |
| 125 | Navigate to the preference pages by clicking **Window > Preferences > !RefactorErl**. |
| 126 | |
| 127 | [[Image(prefs.png, align=center)]] |
| 128 | |
| 129 | In case you would like to connect to a local !RefactorErl application, fill in the **!RefactorErl Base Directory** field with the path to the base directory of a locally installed !RefactorErl application. |
| 130 | |
| 131 | In case you would like to connect to a remotely located !RefactorErl node instead, fill in the node address of this node in the **Server address** field. |
| 132 | |
| 133 | Click **OK**. Click **Yes** on the dialog inquiring wheter you want to reconnect to !RefactorErl. If the connection was successful, a `Connected to RefactorErl` message will appear in the left side of the status bar at the bottom of the Eclipse window. |
| 134 | |
| 135 | Congratulations, now you can start using !RefactorErl with the Eclipse interface! |
| 136 | |
| 137 | = Using the !RefactorErl Eclipse interface |
| 138 | This section will guide you through the most important interface features. While we include a basic description for each feature group, it may be neccessary for you to read the corresponding wiki pages for an in-depth understanding of the feature group in question. |
| 139 | |
| 140 | If you open the !RefactorErl perspective or the Erlang perspective (if Erlide is installed) inside Eclipse, a new menu button, with the text **!RefactorErl** on it, will appear in the Eclipse top menu. Much of the features are accessible through the **!RefactorErl** menu, and some features can be accessed in more than one way. |
| 141 | |
| 142 | For the rest of this guide we will assume that you have the !RefactorErl or the Erlang perspective opened and one of these is the active perspective. As a reminder, perspectives can be opened via the **Window > Open Perspective > Other** button in the Eclipse top menu. |
111 | | |
112 | | [=#firsttime] |
113 | | == First time launch |
114 | | If the plugin installation was successful in the last step, an error message will appear the first time Eclipse is launched. This happens because we didn't set the path to !RefactorErl yet. |
115 | | {{{ |
116 | | #!comment |
117 | | KÉP |
118 | | }}} |
119 | | |
120 | | The !RefactorErl plugin can automatically start a local !RefactorErl application and connect to it. Please, see the corresponding section of this guide, if !RefactorErl is not yet installed on your system. |
121 | | It is also possible to connect to a !RefactorErl application running on a remote server. You do not need to install !RefactorErl on your local system to do this. |
122 | | |
123 | | Navigate to the preference pages by clicking **Window > Preferences > !RefactorErl**. |
124 | | |
125 | | [[Image(prefs.png, align=center)]] |
126 | | |
127 | | In case you would like to connect to a local !RefactorErl application, fill in the **!RefactorErl Base Directory** field with the path to the base directory of a locally installed !RefactorErl application. |
128 | | |
129 | | In case you would like to connect to a remotely located !RefactorErl node instead, fill in the node address of this node in the **Server address** field. |
130 | | |
131 | | Click **OK**. Click **Yes** on the dialog inquiring wheter you want to reconnect to !RefactorErl. If the connection was successful, a `Connected to RefactorErl` message will appear in the left side of the status bar at the bottom of the Eclipse window. |
132 | | |
133 | | Congratulations, now you can start using !RefactorErl with the Eclipse interface! |
134 | | |
135 | | = Using the !RefactorErl Eclipse interface |
136 | | This section will guide you through the most important interface features. While we include a basic description for each feature group, it may be neccessary for you to read the corresponding wiki pages for an in-depth understanding of the feature group in question. |
137 | | |
138 | | If you open the !RefactorErl perspective or the Erlang perspective (if Erlide is installed) inside Eclipse, a new menu button, with the text **!RefactorErl** on it, will appear in the Eclipse top menu. Much of the features are accessible through the **!RefactorErl** menu, and some features can be accessed in more than one way. |
139 | | |
140 | | For the rest of this guide we will assume that you have the !RefactorErl or the Erlang perspective opened and one of these is the active perspective. As a reminder, perspectives can be opened via the **Window > Open Perspective > Other** button in the Eclipse top menu. |
241 | | 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. |
| 249 | The results will be presented as a list of records 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 multi-pane editor. |
| 250 | |
| 251 | === Duplicate code elimination |
| 252 | This feature only works with duplicate searches launched with `Suffix tree (providing only relevant results)` algorithm. |
| 253 | |
| 254 | By right clicking on a record in the results view and selecting **Eliminate Group** in the context menu, you can introduce a new function in place of the duplicate group represented by the selected record. Since duplicate code elimination (and more generally, any refactoring or other kind of modifying operation) invalidates the results of former duplicate searches, all views and editors related to previous searches will be closed after a successful operation. |