|
|
|
|
|
|
155
|
|
155
|
|
|
156
|
## How work with Exercism using Eclipse
|
156
|
## How work with Exercism using Eclipse
|
|
157
|
|
157
|
|
|
158
|
-This is not a guide about how to learn to use Eclipse. Please, consult
|
|
|
|
|
|
158
|
+This section is about Eclipse, and it is assumed that you already have
|
|
|
|
159
|
+Java development kit for your computing environment installed. If that
|
|
|
|
160
|
+is not the case, see the instructions above.
|
|
|
|
161
|
+
|
|
|
|
162
|
+Additionally, this is not a guide about how to use Eclipse. Please, consult
|
|
159
|
your favorite search engine for that because there are plenty of tutorials
|
163
|
your favorite search engine for that because there are plenty of tutorials
|
|
160
|
already available.
|
164
|
already available.
|
|
161
|
|
165
|
|
|
162
|
Once you've got Eclipse installed and running, there are at least two ways
|
166
|
Once you've got Eclipse installed and running, there are at least two ways
|
|
163
|
-to get exercism tasks into Eclipse: Letting gradle build Eclipse workspace
|
|
|
|
|
|
167
|
+to get exercism tasks into Eclipse: letting gradle build Eclipse workspace
|
|
164
|
for you and using Buildship Gradle plugin for Eclipse.
|
168
|
for you and using Buildship Gradle plugin for Eclipse.
|
|
165
|
|
169
|
|
|
166
|
Firstly, a simpler way of doing things.
|
170
|
Firstly, a simpler way of doing things.
|
|
|
|
|
|
|
171
|
2. Change to the directory containing the exercise: `cd ~/exercism/java/
|
175
|
2. Change to the directory containing the exercise: `cd ~/exercism/java/
|
|
172
|
<exercise>` (by default things will end up in `~/exercism`).
|
176
|
<exercise>` (by default things will end up in `~/exercism`).
|
|
173
|
|
177
|
|
|
174
|
-3. Let Gradle prepare things for Eclipse: gradle eclipse.
|
|
|
|
|
|
178
|
+3. Let Gradle prepare things for Eclipse: `gradle eclipse`.
|
|
175
|
|
179
|
|
|
176
|
4. Start Eclipse.
|
180
|
4. Start Eclipse.
|
|
177
|
|
181
|
|
|
|
|
|
|
|
180
|
6. Select "Existing Projects Into Workspace" as import source.
|
184
|
6. Select "Existing Projects Into Workspace" as import source.
|
|
181
|
|
185
|
|
|
182
|
7. Browse the directory containing the exercise fetched during the
|
186
|
7. Browse the directory containing the exercise fetched during the
|
|
183
|
- step 1 to "Select root directory:".
|
|
|
|
|
|
187
|
+ step 1 to a text field labeled "Select root directory".
|
|
184
|
|
188
|
|
|
185
|
8. Hit the button labeled "Finish".
|
189
|
8. Hit the button labeled "Finish".
|
|
186
|
|
190
|
|
|
187
|
-Secondly, a slightly more difficult, but more "Eclipseish" way of
|
|
|
|
188
|
-doing things. This is for those who absolutely despise doing anything
|
|
|
|
189
|
-away from Eclipse.
|
|
|
|
|
|
191
|
+Secondly, a slightly more complex and more "Eclipseish" way. This is
|
|
|
|
192
|
+for those who absolutely despise doing anything away from Eclipse.
|
|
190
|
|
193
|
|
|
191
|
-1. Install "Buildship Gradle Integration plugin from Eclipse
|
|
|
|
|
|
194
|
+1. Install the Buildship Gradle Integration plugin from Eclipse
|
|
192
|
Marketplace (accessible from Help-menu, under Eclipse Marketplace).
|
195
|
Marketplace (accessible from Help-menu, under Eclipse Marketplace).
|
|
193
|
|
196
|
|
|
|
|
197
|
+ 
|
|
|
|
198
|
+
|
|
|
|
199
|
+ To find the Buildship Gradle Plugin, search for "Buildship Gradle".
|
|
|
|
200
|
+
|
|
|
|
201
|
+ 
|
|
|
|
202
|
+
|
|
194
|
In case you've been reading about the Gradle STS plugin, note that
|
203
|
In case you've been reading about the Gradle STS plugin, note that
|
|
195
|
- The Buildship Gradle Integration plugin replaces the Gradle STS plugin
|
|
|
|
|
|
204
|
+ the Buildship Gradle Integration plugin replaces the Gradle STS plugin
|
|
196
|
which is no longer maintained.
|
205
|
which is no longer maintained.
|
|
197
|
|
206
|
|
|
198
|
Start (or restart) Eclipse after the plugin has been installed.
|
207
|
Start (or restart) Eclipse after the plugin has been installed.
|
|
|
|
|
|
|
204
|
|
213
|
|
|
205
|
5. Select "Gradle" > "Gradle Project" as your import source.
|
214
|
5. Select "Gradle" > "Gradle Project" as your import source.
|
|
206
|
|
215
|
|
|
207
|
-6. Browse the directory containing the exercise fetched during
|
|
|
|
208
|
- the step 1 to the "Project root directory:".
|
|
|
|
|
|
216
|
+6. Browse to the directory containing the exercise fetched during
|
|
|
|
217
|
+ the step 1 to a text field labeled "Project root directory".
|
|
209
|
|
218
|
|
|
210
|
7. Hit the button labeled "Finish".
|
219
|
7. Hit the button labeled "Finish".
|
|
211
|
|
220
|
|
|
212
|
-To me it seems that the simple way of doing things is, as usual, the better
|
|
|
|
213
|
-way of doing things. The only caveat I've found this far is that you have
|
|
|
|
214
|
-to run `gradle eclipse` every time you change something affecting Eclipse.
|
|
|
|
|
|
221
|
+It seems that the simple way of doing things is, as usual, the better
|
|
|
|
222
|
+way of doing things. The only caveat is that you have to run `gradle eclipse`
|
|
|
|
223
|
+every time you change something affecting Eclipse.
|
|
215
|
|
224
|
|
|
216
|
For most exercises there is no need to ever touch build.gradle or anything
|
225
|
For most exercises there is no need to ever touch build.gradle or anything
|
|
217
|
-else besides the source files, so this looks like a minor hassle not often
|
|
|
|
218
|
-encountered.
|
|
|
|
|
|
226
|
+else besides the source files; so, there is no need to constantly run
|
|
|
|
227
|
+`gradle eclipse`.
|
|
|
|
228
|
+
|