From f65056e68ccfe0831fb663cada92bf48649e2440 Mon Sep 17 00:00:00 2001 From: hash-logic Date: Mon, 30 Dec 2024 19:54:09 +0800 Subject: [PATCH 1/2] Adding readme tab for eclipse Added the usage for eclipse --- ...estions-in-your-ide-with-github-copilot.md | 41 +++++++++++++++++++ data/variables/product.yml | 9 ++++ package-lock.json | 5 +++ package.json | 1 + 4 files changed, 56 insertions(+) diff --git a/content/copilot/using-github-copilot/getting-code-suggestions-in-your-ide-with-github-copilot.md b/content/copilot/using-github-copilot/getting-code-suggestions-in-your-ide-with-github-copilot.md index 2a212f61602b..fa834fe12884 100644 --- a/content/copilot/using-github-copilot/getting-code-suggestions-in-your-ide-with-github-copilot.md +++ b/content/copilot/using-github-copilot/getting-code-suggestions-in-your-ide-with-github-copilot.md @@ -424,6 +424,47 @@ If you want to accept the next line of the suggestion, you will need to set a cu {% endazure_data_studio %} +{% eclipse %} + +## About {% data variables.product.prodname_copilot %} and {% data variables.product.prodname_eclipse %} + +This guide demonstrates how to get coding suggestions from {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_eclipse %}. To see instructions for other popular coding environments, use the tool switcher at the top of the page. + +The examples in this guide use Java, however other languages will work similarly. {% data reusables.copilot.supported-languages %} + +## Prerequisites + +* **Subscription to {% data variables.product.prodname_copilot_short %}**. To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}, you must have an active {% data variables.product.prodname_copilot %} subscription. {% data reusables.copilot.subscription-prerequisite %} + +* **{% data variables.product.prodname_eclipse %}**. To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_eclipse %}, you must have {% data variables.product.prodname_eclipse %} installed. For more information, see the [{% data variables.product.prodname_eclipse %} download page](https://www.eclipse.org/downloads/). + +* **{% data variables.product.prodname_copilot_short %} extension for {% data variables.product.prodname_eclipse %}**. To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_eclipse %}, you must install the [{% data variables.product.prodname_copilot %} extension](https://marketplace.eclipse.org/). + +## Getting code suggestions + +{% data variables.product.prodname_copilot %} offers coding suggestions as you type. For example, type this function header in a Java file: + +```java copy +public int getDiff(int a, int b) +``` + +{% data variables.product.prodname_copilot %} will automatically suggest the rest of the function. {% data reusables.copilot.accept-suggestion %} + +You can also describe something you want to do using natural language within a comment, and {% data variables.product.prodname_copilot_short %} will suggest the code to accomplish your goal. For example, type this comment in a JavaScript file: + +```java copy +/* + * Return the diff between two different integers + */ +``` + +{% data variables.product.prodname_copilot %} will automatically suggest code. {% data reusables.copilot.accept-suggestion %} + +> [!TIP] +> If you receive limited or no suggestions from {% data variables.product.prodname_copilot_short %}, you may have duplication detection enabled. For more information about duplication detection, see [AUTOTITLE](/copilot/configuring-github-copilot/configuring-your-personal-github-copilot-settings-on-githubcom#enabling-or-disabling-suggestions-matching-public-code). + +{% endeclipse %} + {% xcode %} {% data reusables.copilot.xcode-beta-note %} diff --git a/data/variables/product.yml b/data/variables/product.yml index 342d77a17312..c0677c62d53b 100644 --- a/data/variables/product.yml +++ b/data/variables/product.yml @@ -253,6 +253,15 @@ prodname_vscode_command_palette: 'Visual Studio Code Command Palette' prodname_vscode_marketplace: 'Visual Studio Code Marketplace' prodname_vs_marketplace_shortname: 'VS Code Marketplace' +# Eclipse +prodname_eclipse_shortname: 'Eclipse' +prodname_eclipse: 'Eclipse IDE' +prodname_eclipse_command_palette_shortname: 'Eclipse Command Palette' +prodname_eclipse_command_palette: 'Eclipse IDE Command Palette' +prodname_eclipse_marketplace: 'Eclipse Marketplace' +prodname_eclipse_marketplace_shortname: 'Eclipse IDE Marketplace' + + # GitHub Dependabot prodname_dependabot: 'Dependabot' prodname_dependabot_alerts: 'Dependabot alerts' diff --git a/package-lock.json b/package-lock.json index aed96f326cb4..010b36468b54 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,6 +33,7 @@ "cookie-parser": "^1.4.7", "cuss": "2.2.0", "dayjs": "^1.11.3", + "docs.github.com": "file:", "dotenv": "^16.4.5", "escape-string-regexp": "5.0.0", "express": "4.21.2", @@ -5373,6 +5374,10 @@ "node": ">=8" } }, + "node_modules/docs.github.com": { + "resolved": "", + "link": true + }, "node_modules/doctrine": { "version": "3.0.0", "dev": true, diff --git a/package.json b/package.json index 104f43d29bce..149dcf480d19 100644 --- a/package.json +++ b/package.json @@ -269,6 +269,7 @@ "cookie-parser": "^1.4.7", "cuss": "2.2.0", "dayjs": "^1.11.3", + "docs.github.com": "file:", "dotenv": "^16.4.5", "escape-string-regexp": "5.0.0", "express": "4.21.2", From 525b2e64cd94fec44939fe27e032a75586d021d9 Mon Sep 17 00:00:00 2001 From: hash-logic Date: Tue, 31 Dec 2024 09:53:43 +0800 Subject: [PATCH 2/2] Reverted files cant be changed --- package-lock.json | 5 ----- package.json | 1 - 2 files changed, 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 010b36468b54..aed96f326cb4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,6 @@ "cookie-parser": "^1.4.7", "cuss": "2.2.0", "dayjs": "^1.11.3", - "docs.github.com": "file:", "dotenv": "^16.4.5", "escape-string-regexp": "5.0.0", "express": "4.21.2", @@ -5374,10 +5373,6 @@ "node": ">=8" } }, - "node_modules/docs.github.com": { - "resolved": "", - "link": true - }, "node_modules/doctrine": { "version": "3.0.0", "dev": true, diff --git a/package.json b/package.json index 149dcf480d19..104f43d29bce 100644 --- a/package.json +++ b/package.json @@ -269,7 +269,6 @@ "cookie-parser": "^1.4.7", "cuss": "2.2.0", "dayjs": "^1.11.3", - "docs.github.com": "file:", "dotenv": "^16.4.5", "escape-string-regexp": "5.0.0", "express": "4.21.2",