Repository navigation
fix: add docs #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
fix: add docs #26
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
59c7d13
fix: add docs
andreas-wirth bf14f20
fix: include anotra.yml in release auto-commit action
andreas-wirth d623c07
fix PR review findings
andreas-wirth 8f73cbe
Update docs to refer to example repository
andreas-wirth 333ee00
Incorporate PR feedback
andreas-wirth 2e9be54
Incorporate PR feedback
andreas-wirth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| name: vs-code-plugin | ||
| title: ESMF VS Code Plugin | ||
| version: master | ||
| start_page: ROOT:index.adoc | ||
| start_page: ROOT:introduction.adoc | ||
| nav: | ||
| - modules/ROOT/nav.adoc |
Binary file added
BIN
+1.12 MB
documentation/vs-code-plugin/modules/ROOT/images/walkthrough_welcome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| * xref:introduction.adoc[] | ||
| * xref:system-requirements.adoc[] | ||
| * xref:installation.adoc[Installation] | ||
| * xref:getting-started.adoc[] | ||
| * xref:features.adoc[] | ||
| * xref:support.adoc[] | ||
| * xref:release-notes.adoc[] |
44 changes: 44 additions & 0 deletions
44
documentation/vs-code-plugin/modules/ROOT/pages/features.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| = Features | ||
|
|
||
| == Editing RDF/Turtle | ||
|
|
||
| * Syntax highlighting for `.ttl` files. | ||
| * Document outline for navigating the current file. | ||
| * Automatic syntax validation while typing, with diagnostics in the editor and the *Problems* view. | ||
|
|
||
| == Working with Aspect Models | ||
|
|
||
| * *Go to Definition* for referenced elements in the current file, workspace, and SAMM vocabulary. | ||
| * Aspect Model validation after a pause in editing and when saving. | ||
| * On-demand validation with *Semantic Models: Validate Document Now* from the Command Palette or editor context menu. | ||
|
|
||
| Validation issues appear in the editor and the Problems view. | ||
|
|
||
| [[github-model-resolution]] | ||
| == Resolving Aspect Models from GitHub | ||
|
|
||
| Enables *Go to Definition* and validation of Aspect Model element references stored in a GitHub repository outside the local workspace. | ||
|
|
||
| Open *Preferences: Open User Settings (JSON)* from the Command Palette and add the repositories to `semantic-models.modelResolution.githubRepositories`. | ||
| E.g. the following configuration enables to resolve elements from the extension samples: | ||
|
|
||
| [source,json] | ||
| ---- | ||
| { | ||
| "semantic-models.modelResolution.githubRepositories": [ | ||
| { | ||
| "repository": "eclipse-esmf/esmf-examples", | ||
| "branch": "main", | ||
| "path": "aspect-models" | ||
| } | ||
| ] | ||
| } | ||
| ---- | ||
|
|
||
| Set `repository` to `owner/repository` and `path` to the folder containing the models. | ||
| To use a tag, replace `branch` with `tag`. Do not set both. | ||
| For private repositories, add a `token` with read access in your user settings. | ||
|
andreas-wirth marked this conversation as resolved.
|
||
| Read more about how to create a GitHub Token in the https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens[GitHub docs,opts=nofollow]. | ||
|
|
||
| Open a local Aspect Model that references an element in the configured repository, then use *Go to Definition* or validate the document as usual. | ||
| The extension will automatically download the required models from GitHub. | ||
47 changes: 47 additions & 0 deletions
47
documentation/vs-code-plugin/modules/ROOT/pages/getting-started.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| = Getting Started | ||
|
|
||
| == Opening the example workspace | ||
|
|
||
| First, complete the xref:installation.adoc[installation and SAMM CLI setup]. | ||
|
|
||
| 1. Open the https://github.com/eclipse-esmf/esmf-examples[esmf-examples repository,opts=nofollow] and choose *Code -> Download ZIP*. Extract the archive locally. | ||
| 2. In VS Code, choose *File -> Open Folder...* and open the extracted repository. | ||
| 3. Open any Aspect Model and confirm that the language mode in the status bar is *Turtle*. | ||
| 4. Wait for the language server to start. Syntax highlighting and the outline view should become available. | ||
|
|
||
| == Validating and navigating a model | ||
|
|
||
| 1. Create an arbitrary problem, e.g., by removing the closing dot of a triple. | ||
| 2. Open *View -> Problems* and select the issue about the just removed dot. | ||
| 3. Re-add the dot. | ||
| 4. Wait for the validation to complete. The problem reported for the missing dot should disappear. | ||
|
|
||
| Turtle syntax validation runs while typing. Aspect Model validation runs after a pause in editing and when saving. | ||
|
|
||
| .Example of validation diagnostics | ||
| image::walkthrough_validation.png[width=100%] | ||
|
|
||
| If setup or validation fails, see xref:support.adoc[Support]. | ||
|
|
||
| == Creating your own workspace | ||
|
|
||
| Create a new folder for your models and open it in VS Code. | ||
| Models must be organized in a hierarchical manner, file paths must follow the structure: `namespace/version/name.ttl`. | ||
|
|
||
| [source,subs=+quotes] | ||
| ---- | ||
| _models root (open folder in VS Code)_ | ||
| └── com.mycompany.myproduct | ||
| ├── 1.0.0 | ||
| │ ├── MyAspect.ttl | ||
| │ ├── MyEntity.ttl | ||
| │ └── myProperty.ttl | ||
| └── 1.1.0 | ||
| └── MyAspect.ttl | ||
| ---- | ||
|
|
||
| The namespace and version directories must match the namespace and version in the model URNs. | ||
| For example, files in `com.mycompany.myproduct/1.0.0` use `@prefix : <urn:samm:com.mycompany.myproduct:1.0.0#> .`. | ||
|
|
||
| Read more about xref:esmf-developer-guide:tooling-guide:samm-cli.adoc#models-directory-structure[models directory structure,opts=nofollow] | ||
| and xref:esmf-developer-guide:tooling-guide:java-aspect-tooling.adoc#understanding-model-resolution[model resolution,opts=nofollow]. |
55 changes: 0 additions & 55 deletions
55
documentation/vs-code-plugin/modules/ROOT/pages/index.adoc
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
documentation/vs-code-plugin/modules/ROOT/pages/installation.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| = Install the Semantic Models for VS Code Extension | ||
|
|
||
| First, check the xref:system-requirements.adoc[system requirements]. | ||
|
|
||
| == Installing the extension | ||
|
|
||
| Open the *Extensions* view in VS Code, search for *Semantic Models* published by *eclipse-esmf*, and select *Install*. | ||
| You can also open https://marketplace.visualstudio.com/items?itemName=eclipse-esmf.semantic-models[Semantic Models on Visual Studio Marketplace,window=_blank,opts=nofollow]. | ||
|
|
||
| For a manual installation, download the latest `.vsix` file from the https://github.com/eclipse-esmf/esmf-vs-code-plugin/releases[extension releases,opts=nofollow]. | ||
| In VS Code, open *View -> Command Palette*, run *Extensions: Install from VSIX...*, and select the downloaded file. | ||
|
|
||
| == Configuration | ||
|
|
||
| After successful extension installation, a welcome screen should greet you: | ||
|
|
||
| image::walkthrough_welcome.png[width=100%] | ||
|
|
||
| Follow the instructions on the welcome screen to configure the extension. | ||
|
|
||
| If the welcome screen does not open, you need to manually configure the extension. Open *View -> Command Palette*, run *Semantic Models: Select SAMM CLI Executable*. | ||
| Configuring this executable is necessary for the extension to work properly. | ||
|
|
||
| If setup or validation fails, see xref:support.adoc[Support]. |
16 changes: 16 additions & 0 deletions
16
documentation/vs-code-plugin/modules/ROOT/pages/introduction.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| = Introduction | ||
|
|
||
| Semantic Models for VS Code is a Visual Studio Code extension for editing RDF/Turtle documents, | ||
| including xref:samm-specification:ROOT:index.adoc[SAMM Aspect Models,opts=nofollow] of the | ||
| xref:esmf-documentation:ROOT:index.adoc[Eclipse Semantic Modeling Framework (ESMF),opts=nofollow]. | ||
|
|
||
| For RDF/Turtle documents, it features syntax highlighting, document outline and automatic syntax validation. | ||
| For SAMM Aspect Models, the extension additionally features *Go to Definition* for elements and semantic model validation. | ||
|
|
||
| image::walkthrough_validation.png[width=100%] | ||
|
|
||
| == Comparison with the Aspect Model Editor | ||
|
|
||
| The xref:ame-guide:ROOT:introduction.adoc[Aspect Model Editor,opts=nofollow] provides graphical editing of Aspect Models. | ||
| The Semantic Models extension provides direct Turtle editing within VS Code, alongside its search, navigation and Git tools. | ||
| This is ideal for users like software developers who are familiar with SAMM, RDF/Turtle and VS Code. |
3 changes: 3 additions & 0 deletions
3
documentation/vs-code-plugin/modules/ROOT/pages/release-notes.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| = Release Notes | ||
|
|
||
| Find the release notes for the Semantic Models extension at the https://github.com/eclipse-esmf/esmf-vs-code-plugin/releases[GitHub releases overview^,opts=nofollow]. |
57 changes: 57 additions & 0 deletions
57
documentation/vs-code-plugin/modules/ROOT/pages/support.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| = Support | ||
|
|
||
| For troubleshooting, see the <<known-issues,known issues>> below. | ||
| Also make sure your system meets the xref:system-requirements.adoc[system requirements]. | ||
|
|
||
| As the Semantic Models extension relies on the SAMM specification, also check out the xref:samm-specification:ROOT:index.adoc[SAMM Aspect Meta Model,opts=nofollow]. | ||
|
|
||
| For further support, open an https://github.com/eclipse-esmf/esmf-vs-code-plugin/issues[issue in GitHub^,opts=nofollow]. | ||
| Include the following in your issue: | ||
|
|
||
| * Steps to reproduce the issue. | ||
| * Expected behavior. | ||
| * Actual behavior. | ||
| * Operating system, VS Code version, extension version, and SAMM CLI version. | ||
| * Relevant screenshots, minimal Turtle files, and logs. Remove tokens and other sensitive data. | ||
|
|
||
| [[known-issues]] | ||
| == Known issues | ||
|
|
||
| [[selection-and-download-of-samm-cli-fails]] | ||
| === SAMM CLI selection or download fails | ||
|
|
||
| One possible cause is a GitHub API rate limit. Check the *Semantic Models* output channel for the reported error. | ||
| If the release picker or download fails, try selecting a manually downloaded CLI: | ||
|
|
||
| 1. Go to the https://github.com/eclipse-esmf/esmf-sdk/releases[ESMF SDK releases page^,opts=nofollow] and manually download the SAMM CLI for your platform from the latest release. | ||
| 2. Extract the archive if necessary and move the cli to a suitable location for permanent storage. | ||
| 3. Run *Semantic Models: Select SAMM CLI Executable* from the Command Palette. | ||
| 4. Choose `Use custom SAMM CLI executable or jar file`, and select the downloaded executable or JAR file. | ||
|
|
||
| [[language-server-stops-being-available]] | ||
| === Language server stops being available | ||
|
|
||
| If language features such as syntax highlighting are unavailable, it may be due to the language server not running. | ||
| To start or restart it manually, open the Command Palette (View -> Command Palette) and run `Semantic Models: Restart Language Server Connection`. | ||
|
|
||
|
|
||
| == Accessing the VS Code extension logs (for troubleshooting/debugging) | ||
|
|
||
| To facilitate your troubleshooting efforts or when you need to compile detailed information for a GitHub issue, VS Code enables access to extension logs. | ||
|
|
||
| *Opening extension logs* | ||
|
|
||
| Open *View -> Output*. Select Semantic Models in the output dropdown menu. | ||
|
|
||
| *Enabling detailed logging* | ||
|
|
||
| The default logging level in VS Code is `info`. This might not be enough to understand the cause of certain issues. | ||
| In order to get a more complete picture, increase the logging level to `debug`. | ||
| Open *View -> Command Palette* and run *Developer: Set Log Level...*. | ||
| This allows you to configure the logging level either globally or on a per extension basis. | ||
| Select the Semantic Models extension and re-configure the logging level to e.g. `debug`. | ||
|
|
||
| {nbsp} | ||
|
|
||
| For general questions on semantic data structuring and the role of the Semantic Models extension, join the | ||
| https://chat.eclipse.org/#/room/#eclipse-semantic-modeling-framework:matrix.eclipse.org[ESMF Chat^,opts=nofollow]. |
9 changes: 9 additions & 0 deletions
9
documentation/vs-code-plugin/modules/ROOT/pages/system-requirements.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| = System Requirements | ||
|
|
||
| * Visual Studio Code 1.110.0 or later, with permission to install extensions. | ||
| * Windows, macOS, or Linux, with a SAMM CLI distribution compatible with your operating system and CPU architecture. Check the https://github.com/eclipse-esmf/esmf-sdk/releases[SAMM CLI releases,opts=nofollow]. | ||
|
|
||
| == Network Access | ||
|
|
||
| Internet access is required to download the extension and SAMM CLI, check for updates, and resolve models from GitHub. | ||
| The language server uses a local TCP connection on port `1846` by default. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.