浏览代码

Merge pull request #122 from samilaine/master

A (partial) fix for the issue #2670
John Ryan 10 年前
父节点
当前提交
0895b1187b
共有 3 个文件被更改,包括 74 次插入0 次删除
  1. 74
    0
      docs/INSTALLATION.md
  2. 二进制
      docs/img/eclipse-help-dropdown.png
  3. 二进制
      docs/img/eclipse-mp-search-buildship-gradle.png

+ 74
- 0
docs/INSTALLATION.md 查看文件

@@ -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
+   ![Eclipse Help Menu](/docs/img/eclipse-help-dropdown.png)
198
+
199
+   To find the Buildship Gradle Plugin, search for "Buildship Gradle".
200
+
201
+   ![Buildship Gradle Plugin](/docs/img/eclipse-mp-search-buildship-gradle.png)
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
+

二进制
docs/img/eclipse-help-dropdown.png 查看文件


二进制
docs/img/eclipse-mp-search-buildship-gradle.png 查看文件