Skip to content

Commit 70a590b

Browse files
[3rd-party IDE] Add Eclipse IDE to Copilot custom instructions documentation (#57007)
1 parent c1577ff commit 70a590b

File tree

3 files changed

+88
-1
lines changed

3 files changed

+88
-1
lines changed

content/copilot/concepts/response-customization.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ contentType: concepts
4040
> [!NOTE] This version of this article is about custom instructions in Xcode. Click the tabs above for other environments. <!-- markdownlint-disable-line MD027 -->
4141
{% endxcode %}
4242

43+
{% eclipse %}
44+
45+
> [!NOTE] This version of this article is about custom instructions in Eclipse. Click the tabs above for other environments. <!-- markdownlint-disable-line MD027 -->
46+
{% endeclipse %}
47+
4348
## About customizing {% data variables.copilot.copilot_chat %} responses
4449

4550
{% webui %}
@@ -95,6 +100,17 @@ While custom instructions help to add codebase-wide context to each AI workflow,
95100

96101
{% endxcode %}
97102

103+
{% eclipse %}
104+
105+
{% data variables.product.prodname_copilot %} can provide chat responses that are tailored to the way your team works, the tools you use, or the specifics of your project, if you provide it with enough context to do so. Instead of repeatedly adding this contextual detail to your chat questions, you can create a custom instructions file in your repository that automatically adds this information for you. The additional information is not displayed in the chat, but is available to {% data variables.product.prodname_copilot_short %} to allow it to generate higher quality responses.
106+
107+
There are two types of repository custom instructions you can use to provide context and instructions to {% data variables.copilot.copilot_chat_short %} in Eclipse:
108+
109+
* **Workspace custom instructions** which apply to all projects in a workspace, and allow you to specify workspace-wide instructions and preferences, in a single file.
110+
* **Project custom instructions** which apply to a specific project.
111+
112+
{% endeclipse %}
113+
98114
{% webui %}
99115

100116
## Using custom instructions
@@ -243,6 +259,26 @@ Common use cases include:
243259

244260
{% endxcode %}
245261

262+
{% eclipse %}
263+
264+
## About repository custom instructions
265+
266+
**Workspace custom instructions** apply to all projects in a workspace, and allow you to specify workspace-wide instructions and preferences. You can use workspace custom instructions to provide context and instructions to {% data variables.copilot.copilot_chat_short %} in Eclipse.
267+
268+
**Project custom instructions** consist of a single file, `.github/copilot-instructions.md`, that you create in a project. The instructions you add to the file should be short, self-contained statements that add context or relevant information to supplement chat questions.
269+
270+
Common use cases include:
271+
272+
* **Test generation.** Create instructions for test generation, such as specifying the use of a certain test framework.
273+
* **Code review.** Specify instructions for reviewing code, such as telling a reviewer to look for a specific error in the code.
274+
* **Commit message generation.** Write instructions for generating commit messages, such as format or the type of information to include.
275+
276+
### Example
277+
278+
{% data reusables.copilot.repository-custom-instructions-example %}
279+
280+
{% endeclipse %}
281+
246282
## Writing effective custom instructions
247283

248284
The instructions you add should ideally be short, self-contained statements provide {% data variables.product.prodname_copilot_short %} with relevant information to help it work.
@@ -292,3 +328,15 @@ Answer all questions in less than 1000 characters, and words of no more than 12
292328
* [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot)
293329

294330
{% endjetbrains %}
331+
332+
{% xcode %}
333+
334+
* [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot)
335+
336+
{% endxcode %}
337+
338+
{% eclipse %}
339+
340+
* [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot)
341+
342+
{% endeclipse %}

content/copilot/how-tos/configure-custom-instructions/add-repository-instructions.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ This version of this article is for using repository custom instructions in Xcod
4444

4545
{% endxcode %}
4646

47+
{% eclipse %}
48+
49+
> [!NOTE] This feature is currently in {% data variables.release-phases.public_preview %} and is subject to change.
50+
51+
This version of this article is for using repository custom instructions in Eclipse. Click the tabs above for instructions on using custom instructions in other environments.
52+
53+
{% endeclipse %}
54+
4755
## About repository custom instructions for {% data variables.product.prodname_copilot_short %}
4856

4957
Repository custom instructions let you provide {% data variables.product.prodname_copilot_short %} with repository-specific guidance and preferences.
@@ -84,6 +92,12 @@ Repository custom instructions let you provide {% data variables.product.prodnam
8492

8593
{% endxcode %}
8694

95+
{% eclipse %}
96+
97+
* The latest version of the {% data variables.product.prodname_copilot_short %} extension must be installed in Eclipse.
98+
99+
{% endeclipse %}
100+
87101
## Creating a repository custom instructions file
88102

89103
{% jetbrains %}
@@ -143,6 +157,31 @@ Whitespace between instructions is ignored, so the instructions can be written a
143157

144158
{% endxcode %}
145159

160+
{% eclipse %}
161+
162+
Eclipse supports two types of repository custom instructions: workspace and project custom instructions.
163+
164+
To create a workspace custom instructions file, you can use the {% data variables.product.prodname_copilot_short %} settings page. To create a project custom instructions file, you can create the file manually in the project directory.
165+
166+
Whitespace between instructions is ignored, so the instructions can be written as a single paragraph, each on a new line, or separated by blank lines for legibility.
167+
168+
### Creating a workspace custom instructions file
169+
170+
1. To open the {% data variables.copilot.copilot_chat_short %} panel, click the {% data variables.product.prodname_copilot_short %} icon ({% octicon "copilot" aria-hidden="true" aria-label="copilot" %}) in the status bar at the bottom of Eclipse.
171+
1. From the menu, select "Edit preferences".
172+
1. In the left pane, expand {% data variables.product.prodname_copilot %} and click **Custom Instructions**.
173+
1. Select **Enable workspace instructions**.
174+
1. In the "Workspace" section, under "Set custom instructions to guide {% data variables.product.prodname_copilot_short %}'s code suggestions in this workspace", add natural language instructions to the file, in Markdown format.
175+
176+
### Creating a project custom instructions file
177+
178+
1. In the root of your project directory, create a file named `.github/copilot-instructions.md`.
179+
1. Add your custom instructions in natural language, using Markdown format.
180+
181+
Once saved, these instructions will apply to the current project in Eclipse that you open with {% data variables.product.prodname_copilot_short %} enabled.
182+
183+
{% endeclipse %}
184+
146185
{% vscode %}
147186

148187
{% data variables.product.prodname_vscode_shortname %} supports either:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Repository custom instructions are currently supported for:
22
* **{% data variables.copilot.copilot_chat_short %}** in {% data variables.product.prodname_vscode_shortname %}
33
* **{% data variables.copilot.copilot_coding_agent %}**
4-
* **{% data variables.copilot.copilot_chat_short %}** in {% data variables.product.prodname_vs %}, JetBrains IDEs, Xcode, and on the {% data variables.product.github %} website (`copilot-instructions.md` file only)
4+
* **{% data variables.copilot.copilot_chat_short %}** in {% data variables.product.prodname_vs %}, JetBrains IDEs, Xcode, Eclipse, and on the {% data variables.product.github %} website (`copilot-instructions.md` file only)
55
* **{% data variables.copilot.copilot_code-review_short %}** (`copilot-instructions.md` file only)

0 commit comments

Comments
 (0)