|
|
@@ -152,3 +152,77 @@ run the installer; accept all the defaults.
|
|
152
|
152
|
|
|
153
|
153
|
6. Back in the "Default Project Structure" dialog, in the "Project language level:" section,
|
|
154
|
154
|
select "8 - Lambdas, type annotations etc.". Click "OK".
|
|
|
155
|
+
|
|
|
156
|
+## How work with Exercism using Eclipse
|
|
|
157
|
+
|
|
|
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
|
|
|
163
|
+your favorite search engine for that because there are plenty of tutorials
|
|
|
164
|
+already available.
|
|
|
165
|
+
|
|
|
166
|
+Once you've got Eclipse installed and running, there are at least two ways
|
|
|
167
|
+to get exercism tasks into Eclipse: letting gradle build Eclipse workspace
|
|
|
168
|
+for you and using Buildship Gradle plugin for Eclipse.
|
|
|
169
|
+
|
|
|
170
|
+Firstly, a simpler way of doing things.
|
|
|
171
|
+
|
|
|
172
|
+1. Fetch an exercise: `exercism fetch java <exercise>`
|
|
|
173
|
+ (see [the list of available exercises](http://exercism.io/languages/java)).
|
|
|
174
|
+
|
|
|
175
|
+2. Change to the directory containing the exercise: `cd ~/exercism/java/
|
|
|
176
|
+ <exercise>` (by default things will end up in `~/exercism`).
|
|
|
177
|
+
|
|
|
178
|
+3. Let Gradle prepare things for Eclipse: `gradle eclipse`.
|
|
|
179
|
+
|
|
|
180
|
+4. Start Eclipse.
|
|
|
181
|
+
|
|
|
182
|
+5. From the "File" menu select "Import".
|
|
|
183
|
+
|
|
|
184
|
+6. Select "Existing Projects Into Workspace" as import source.
|
|
|
185
|
+
|
|
|
186
|
+7. Browse the directory containing the exercise fetched during the
|
|
|
187
|
+ step 1 to a text field labeled "Select root directory".
|
|
|
188
|
+
|
|
|
189
|
+8. Hit the button labeled "Finish".
|
|
|
190
|
+
|
|
|
191
|
+Secondly, a slightly more complex and more "Eclipseish" way. This is
|
|
|
192
|
+for those who absolutely despise doing anything away from Eclipse.
|
|
|
193
|
+
|
|
|
194
|
+1. Install the Buildship Gradle Integration plugin from Eclipse
|
|
|
195
|
+ Marketplace (accessible from Help-menu, under Eclipse Marketplace).
|
|
|
196
|
+
|
|
|
197
|
+ 
|
|
|
198
|
+
|
|
|
199
|
+ To find the Buildship Gradle Plugin, search for "Buildship Gradle".
|
|
|
200
|
+
|
|
|
201
|
+ 
|
|
|
202
|
+
|
|
|
203
|
+ In case you've been reading about the Gradle STS plugin, note that
|
|
|
204
|
+ the Buildship Gradle Integration plugin replaces the Gradle STS plugin
|
|
|
205
|
+ which is no longer maintained.
|
|
|
206
|
+
|
|
|
207
|
+ Start (or restart) Eclipse after the plugin has been installed.
|
|
|
208
|
+
|
|
|
209
|
+2. Fetch an exercise: `exercism fetch java <exercise>`
|
|
|
210
|
+ (see [the list of available exercises](http://exercism.io/languages/java)).
|
|
|
211
|
+
|
|
|
212
|
+3. From the "File" menu select "Import".
|
|
|
213
|
+
|
|
|
214
|
+5. Select "Gradle" > "Gradle Project" as your import source.
|
|
|
215
|
+
|
|
|
216
|
+6. Browse to the directory containing the exercise fetched during
|
|
|
217
|
+ the step 1 to a text field labeled "Project root directory".
|
|
|
218
|
+
|
|
|
219
|
+7. Hit the button labeled "Finish".
|
|
|
220
|
+
|
|
|
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.
|
|
|
224
|
+
|
|
|
225
|
+For most exercises there is no need to ever touch build.gradle or anything
|
|
|
226
|
+else besides the source files; so, there is no need to constantly run
|
|
|
227
|
+`gradle eclipse`.
|
|
|
228
|
+
|