diff --git a/CHANGELOG.md b/CHANGELOG.md index a8fb312..f706302 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to `Tools for Apache Kafka®` are documented in this file. ## [0.12.0] ### Added - Extension API to contribute clusters. See [#123](https://github.com/jlandersen/vscode-kafka/issues/123) and [#160](https://github.com/jlandersen/vscode-kafka/pull/160). +- New `Discover Cluster Providers` command to search for extensions contributing cluster providers. See [#165](https://github.com/jlandersen/vscode-kafka/pull/165). - Declare key/value formats for CONSUMER in kafka file. See [#112](https://github.com/jlandersen/vscode-kafka/issues/112). - Declare key/value formats for PRODUCER in kafka file. See [#113](https://github.com/jlandersen/vscode-kafka/issues/113). - Completion support for property names and values of CONSUMER and PRODUCER blocks. See [#146](https://github.com/jlandersen/vscode-kafka/issues/146). diff --git a/docs/Explorer.md b/docs/Explorer.md index 2dc3a10..880637c 100644 --- a/docs/Explorer.md +++ b/docs/Explorer.md @@ -32,6 +32,14 @@ Multiple delete is not supported for the moment. See [issue 107](https://github. To delete a consumer group, it first must be stopped, else the `Delete` action will report an error. +## Discover new cluster providers + +You can search for extensions contributing cluster providers in the extension gallery, by clicking on the `Discover Cluster Providers` button (also available via the command palette): + +![Discover Cluster Providers](assets/kafka-explorer-discover-providers.png) + +Those extensions must be labeled `kafka-provider`. + ## Preferences ### `kafka.explorer.topics.sort` diff --git a/docs/assets/kafka-explorer-discover-providers.png b/docs/assets/kafka-explorer-discover-providers.png new file mode 100644 index 0000000..f4c6b62 Binary files /dev/null and b/docs/assets/kafka-explorer-discover-providers.png differ diff --git a/package.json b/package.json index 96e045a..6afe198 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "onCommand:vscode-kafka.consumer.toggle", "onCommand:vscode-kafka.consumer.clear", "onCommand:vscode-kafa.consumer.deletegroup", + "onCommand:vscode-kafka.discover.clusterproviders", "onView:kafkaExplorer", "onLanguage:kafka", "onDebug" @@ -311,6 +312,12 @@ "command": "vscode-kafka.consumer.deletegroup", "title": "Delete Consumer Group", "category": "Kafka" + }, + { + "command": "vscode-kafka.discover.clusterproviders", + "title": "Discover Cluster Providers", + "category": "Kafka", + "icon":"$(extensions)" } ], "menus": { @@ -324,6 +331,11 @@ "command": "vscode-kafka.explorer.addcluster", "when": "view == kafkaExplorer", "group": "navigation" + }, + { + "command": "vscode-kafka.discover.clusterproviders", + "when": "view == kafkaExplorer", + "group": "navigation" } ], "view/item/context": [ diff --git a/src/extension.ts b/src/extension.ts index f775d19..326ccf5 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -133,6 +133,11 @@ export function activate(context: vscode.ExtensionContext): KafkaExtensionPartic handleErrors((command: DeleteConsumerGroupCommand) => deleteConsumerGroupCommandHandler.execute(command)))); context.subscriptions.push(vscode.commands.registerCommand(ProduceRecordCommandHandler.commandId, handleErrors((command: ProduceRecordCommand, times: number) => produceRecordCommandHandler.execute(command, times)))); + context.subscriptions.push(vscode.commands.registerCommand( + "vscode-kafka.discover.clusterproviders", () => { + return vscode.commands.executeCommand("workbench.extensions.search", "@tag:kafka-provider"); + } + )); registerVSCodeKafkaDocumentationCommands(context);