Skip to content

Commit

Permalink
v0.0.35
Browse files Browse the repository at this point in the history
  • Loading branch information
Hofstetter Benjamin (extern) committed Mar 27, 2024
1 parent 3e75d2d commit d44676d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to the "vscode-sparql-notebook" extension will be documented in this33 file.

## 0.0.35
Feature: The connection error show now a connect button.

## 0.0.34
Fix: Change query kind detection to be more accurate.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"repository": {
"url": "https://github.com/zazuko/vscode-sparql-notebook.git"
},
"version": "0.0.34",
"version": "0.0.35",
"engines": {
"vscode": "^1.77.0"
},
Expand Down
12 changes: 10 additions & 2 deletions src/extension/notebook/sparql-notebook-controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NotebookCell, NotebookCellOutput, NotebookCellOutputItem, NotebookController, NotebookDocument, Uri, notebooks, window, workspace } from 'vscode';
import { NotebookCell, NotebookCellOutput, NotebookCellOutputItem, NotebookController, NotebookDocument, Uri, commands, notebooks, window, workspace } from 'vscode';
import { extensionId } from "../extension";
import { Endpoint, FileEndpoint, HttpEndpoint, } from "../endpoint";
import { PrefixMap } from '../model/prefix-map';
Expand Down Expand Up @@ -63,7 +63,15 @@ export class SparqlNotebookController {

if (!sparqlEndpoint) {
const errorMessage = "Not connected to a SPARQL Endpoint";
window.showErrorMessage(errorMessage);
const actionButton = "Connect to SPARQL Endpoint";

window.showErrorMessage(errorMessage, actionButton).then((action) => {
if (action === actionButton) {
commands.executeCommand('sparql-notebook.connect');

}
}
);
execution.replaceOutput([
this._writeError(errorMessage)
]);
Expand Down

0 comments on commit d44676d

Please sign in to comment.