Skip to content

Commit

Permalink
Merge pull request #12 from Quodatum/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
apb2006 authored Aug 31, 2023
2 parents 8ed2445 + d6e3600 commit 8b6e826
Show file tree
Hide file tree
Showing 76 changed files with 5,579 additions and 3,875 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/doc-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Generate Github pages with mkdocs."

on:
workflow_dispatch:
push:
tags:
- "v*"

permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
out
site
node_modules
.vscode-test/
/*.vsix
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"recommendations": [

]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
"yaml.schemas": {
"https://json.schemastore.org/mkdocs-1.0.json": "file:///c%3A/Users/mrwhe/git/vscode-basex/mkdocs.yml"
}
}
97 changes: 77 additions & 20 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,54 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
],
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "basex server",
"type": "shell",
"command": "%USERPROFILE%/Desktop/basex.home/basex10.7b/bin/basexserver.bat",
"isBackground": true,
"group": "test",
"presentation": {
"revealProblems": "onProblem",
"panel": "new"
},
"runOptions": {
"runOn": "default"
}
},
{
"label": "mkdocs server",
"type": "shell",
"command": "docker",
"args": [
"run",
"--rm",
"-it",
"-p8000:8000",
"-v%cd%:/docs",
"squidfunk/mkdocs-material:9",
"serve",
"--dev-addr",
"0.0.0.0:8000"
],
"isBackground": true,
"problemMatcher": []
}
],
"inputs": [
/*
1. the specialist 'pickFile' command equivalents for the inputs defined here are:
Expand All @@ -35,7 +67,14 @@
"id": "xmlFile",
"type": "command",
"command": "xslt-xpath.pickFile",
"args": {"label": "Select XML File", "extensions": ["xml", "xhtml", "svg"] }
"args": {
"label": "Select XML File",
"extensions": [
"xml",
"xhtml",
"svg"
]
}
},
{
/* --- Usage: ---
Expand All @@ -44,7 +83,16 @@
"id": "xmlFile2",
"type": "command",
"command": "xslt-xpath.pickFile",
"args": {"label": "Select Stage1 XML File", "extensions": ["xml", "xhtml", "svg"], "prevStageLabel": "Select Result File", "prevStageGroup": "recent files from previous stage" }
"args": {
"label": "Select Stage1 XML File",
"extensions": [
"xml",
"xhtml",
"svg"
],
"prevStageLabel": "Select Result File",
"prevStageGroup": "recent files from previous stage"
}
},
{
/* --- Usage: ---
Expand All @@ -53,7 +101,13 @@
"id": "xsltFile",
"type": "command",
"command": "xslt-xpath.pickFile",
"args": {"label": "Select XSLT Stylesheet", "extensions": ["xsl", "xslt"] }
"args": {
"label": "Select XSLT Stylesheet",
"extensions": [
"xsl",
"xslt"
]
}
},
{
/* --- Usage: ---
Expand All @@ -62,7 +116,10 @@
"id": "resultFile",
"type": "command",
"command": "xslt-xpath.pickFile",
"args": {"label": "Select Result File", "isResult": true }
"args": {
"label": "Select Result File",
"isResult": true
}
}
]
}
9 changes: 8 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
node_modules
#out/
!node_modules/@quodatum/xq-catalogs/**/*
out
!out/extension.js
site/
src/
docs/
tsconfig.json
.github
.gitignore
.vscode
mkdocs.yml
tslint.json
notes.md

14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@

# 0.1.14 (2023-08-26)
* [mod] Use xqlint 0.3.3
* [mod] rewrite event subscriptions

# 0.1.8 (2023-05-26)
* extract namespace library data to `xq-catalogs` component
* update to `xqlint` [v0.2.6](https://github.com/Quodatum/xqlint/releases/tag/v0.2.6)
* rewrite XQuery execute to better fit running standalone BaseX query
* Add language type "bxs" for BaseX scripts, minimal functionality currently.
* Documentation moved from wiki to gh-pages and mkdocs
* Add "command": "basexTools.clearDiagnostics"

# 0.1.7 (2023-05-15)

* Use xqlint 0.2.3
* Add documentlinkprovider
* Change XQuery Icon
Expand Down
39 changes: 23 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
[![License](https://img.shields.io/github/license/quodatum/vscode-basex?style=for-the-badge)](https://github.com/quodatum/vscode-basex/blob/master/LICENSE)
[![Visual Studio Marketplace](https://img.shields.io/visual-studio-marketplace/v/quodatum.vscode-basex?style=for-the-badge&label=VS%20Marketplace&logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=quodatum.vscode-basex)
[![Installs](https://img.shields.io/visual-studio-marketplace/i/quodatum.vscode-basex?style=for-the-badge&logo=microsoft)](https://marketplace.visualstudio.com/items?itemName=quodatum.vscode-basex)
[![OpenVSX Registry](https://img.shields.io/open-vsx/dt/quodatum/vscode-basex?color=purple&label=OpenVSX%20Downloads&style=for-the-badge)](https://open-vsx.org/extension/quodatum/vscode-basex)
[![Build Status](https://img.shields.io/github/actions/workflow/status/quodatum/vscode-basex/CI.yaml?branch=main&style=for-the-badge&logo=github)](https://github.com/quodatum/vscode-basex/actions?query=workflow:CI)



# BaseX Tools for Visual Studio Code

The `vscode-basex` extension adds features to support [BaseX](https://basex.org/) development on VSCode.
A key feature is a parser for [XQuery](https://quodatum.github.io/basex-xqparse/) sources that supports all BaseX features, including XQuery Update and the Full text search syntax.
# Status
__Work in progress. Errors and changes to be expected.__
# Installation
[![Release to Marketplace](https://github.com/Quodatum/vscode-basex/actions/workflows/release.yml/badge.svg)](https://github.com/Quodatum/vscode-basex/actions/workflows/release.yml)

Published on [VSCode marketplace](https://marketplace.visualstudio.com/items?itemName=quodatum.vscode-basex)
and [open-vsx](https://open-vsx.org/extension/quodatum/vscode-basex)

# Features
See the [documentation](https://quodatum.github.io/vscode-basex/) for more detail
## XQuery
* [Linting](https://github.com/Quodatum/vscode-basex/wiki/xquery-linting)
* [Code Completion](https://github.com/Quodatum/vscode-basex/wiki/xquery-code-completion)
* [Execution](https://github.com/Quodatum/vscode-basex/wiki/xquery-script-execution)
* [source formating](https://github.com/Quodatum/vscode-basex/wiki/xquery-source-formating)
* [Symbols](https://github.com/Quodatum/vscode-basex/wiki/xquery-symbols)
* [Snippets](https://github.com/Quodatum/vscode-basex/wiki/xquery-snippets)
* [Linting]
* [Code Completion]
* [Execution]
* [source formating]
* [Symbols]
* [Snippets]
## XPath
* [XPath Evaluation](https://github.com/Quodatum/vscode-basex/wiki/xpath-evaluation)
* [XPath Evaluation]
## XML
* [XML Formatting](https://github.com/Quodatum/vscode-basex/wiki/xml-formatting)
* [XML Tree View](https://github.com/Quodatum/vscode-basex/wiki/xml-tree-view)
* [XML Formatting]
* [XML Tree View]



Expand All @@ -40,13 +44,16 @@ Run into a bug? Report it [here](https://github.com/Quodatum/vscode-basex/issues

```
npm install
npm install -g typescript #maybe
npm install -g typescript #once
npm install --global @vscode/vsce
#
npm run compile
vsce package
```

## Documentation
Uses https://github.com/squidfunk/mkdocs-material
https://quodatum.github.io/basex-xqparse/i-BaseX.xhtml#ArrowFunctionSpecifier

# Inspiration
## VSCode
This project was created from a fork of [DotJoshJohnson/vscode-xml](https://github.com/DotJoshJohnson/vscode-xml). Some of the `DotJoshJohnson` code dealing with XML has been removed and additional XQuery features added.
Expand Down
Binary file added docs/basex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions docs/commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: Commands
summary: The commands of the vscode-basex extension
authors:
- Andy Bunce
date: 2023-07-23
---

# Commands
Commands can be invoked from the `command palette` using `F1` or `Ctrl+Shift+P`.
The command title are all prefixed with 'BaseX Tools'.


## basexTools.xqParse
BaseX Tools: Parse of XQuery source (xml) editor/title
## basexTools.xqDoc
BaseX Tools: XQdoc of XQuery source (json) editor/title
## basexTools.evaluateXPath
BaseX Tools: Evaluate XPath long title Ctrl+Shift+Alt+X commandPalette
## basexTools.executeXQuery

BaseX Tools: Execute XQuery using standalone BaseX commandPalette
see [Run XQuery code](xquery/xquery-script-execution.md)

## basexTools.formatAsXml
BaseX Tools: Format as XML Ctrl+Shift+Alt+B
## basexTools.textToXml
BaseX Tools: Convert text to XML (&lt;&gt; -> <>)
##basexTools.xmlToText
BaseX Tools: Convert XML to text (<> -> &lt;&gt;)
## basexTools.getCurrentXPath
BaseX Tools: Get Current XPath commandPalette
## basexTools.minifyXml
BaseX Tools: Minify XML commandPaletteeditor/context
## basexTools.xqLintReport
BaseX Tools: Analysis of current location in Xquery source commandPalette
## basexTools.clearDiagnostics
BaseX Tools: Clear the XQuery Diagnostics collection
8 changes: 8 additions & 0 deletions docs/diagnostics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Diagnostics
summary: Debug information
authors:
- Andy Bunce
date: 2023-07-23
---
todo
25 changes: 25 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: The VScode BaseX extension
summary: Describes features of the vscode-basex extension
authors:
- Andy Bunce
date: 2023-07-05
---
# Welcome to vscode-basex (v0.1)
`vscode-basex` is a [vscode](https://en.wikipedia.org/wiki/Visual_Studio_Code) extension providing support for development using `BaseX`.
[BaseX](https://basex.org) is a Java based XQuery processor.

!!! warning Status
This extension is "Work in progress". Errors and changes to be expected.

For information about installing this extension see [here](installation.md).

## Working with XQuery sources
* [XQuery coding](xquery/)

## Working with XML sources
* [Formating](xml/xml-formatting.md)
* [Tree view](xml/xml-tree-view.md)
* [XPath evaluation](xml/xpath-evaluation.md)


17 changes: 17 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Installation guide
summary: How to install vscode-basex.
authors:
- Andy Bunce
date: 2023-05-27
some_url: https://example.com
---

`vscode-basex` is published on [vscode marketplace](https://marketplace.visualstudio.com/items?itemName=quodatum.vscode-basex)
and [open-vsx](https://open-vsx.org/extension/quodatum/vscode-basex).

Alternatively the `vsix` file can be downloaded from the latest [release](https://github.com/Quodatum/vscode-basex/releases) and manually installed.

![image](installation.png)


Binary file added docs/installation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8b6e826

Please sign in to comment.