Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Align subproject layout with metafacture-core #75

Merged
merged 3 commits into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
- name: Install language server
run: ./gradlew installServer
- name: Change directory
run: cd org.metafacture.fix.vsc/
run: cd metafix-vsc/
- name: Install fix extension
run: npm install
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
./gradlew build
./gradlew installServer
- name: Create fix extension
working-directory: org.metafacture.fix.vsc/
working-directory: metafix-vsc/
run: |
npm install
vsce package -o fix.vsix
Expand All @@ -34,7 +34,7 @@ jobs:
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'org.metafacture.fix.vsc/fix.vsix'
source_file: 'metafix-vsc/fix.vsix'
destination_repo: 'metafacture/metafacture.github.io'
destination_branch: main
destination_folder: 'ide-extensions'
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ Go to the Git repository root:

`cd metafacture-fix/`

Run the tests (in `org.metafacture.fix/src/test/java`) and checks (`.editorconfig`, `config/checkstyle/checkstyle.xml`):
Run the tests (in `metafix/src/test/java`) and checks (`.editorconfig`, `config/checkstyle/checkstyle.xml`):

`./gradlew clean check`

(To import the projects in Eclipse, choose File > Import > Existing Gradle Project and select the `metafacture-fix` directory.)

## Extension

The project `org.metafacture.fix.vsc` provides an extension for Visual Studio Code / Codium for `fix` via the language server protocol (LSP). In the current state the extension supports auto completion, simple syntax highlighting and auto closing brackets and quotes. This project was created using this [tutorial](https://www.typefox.io/blog/building-a-vs-code-extension-with-xtext-and-the-language-server-protocol) and the corresponding [example](https://github.com/TypeFox/languageserver-example).
The project `metafix-vsc` provides an extension for Visual Studio Code / Codium for `fix` via the language server protocol (LSP). In the current state the extension supports auto completion, simple syntax highlighting and auto closing brackets and quotes. This project was created using this [tutorial](https://www.typefox.io/blog/building-a-vs-code-extension-with-xtext-and-the-language-server-protocol) and the corresponding [example](https://github.com/TypeFox/languageserver-example).


Build extension:
Expand All @@ -44,19 +44,19 @@ Build extension:
3. In metafacture-fix execute:
Unix: `./gradlew installServer`
Windows: `.\gradlew.bat installServer`
4. In org.metafacture.fix.vsc execute (tip: if you use windows, install cygwin to execute npm commands):
4. In `metafix-vsc/` execute (tip: if you use windows, install cygwin to execute npm commands):
`npm install`

To start the extension in development mode (starting a second code/codium instance), follow A. To create an vsix file to install the extension permanently follow B.

A) Run in dev mode:
1. Open org.metafacture.fix.vsc in Visual Studio Code / Codium
1. Open `metafix-vsc/` in Visual Studio Code / Codium
2. Launch vscode extension by pressing F5 (opens new window of Visual Studio Code)
3. Open new file (file-ending .fix) or open existing fix-file (see sample below)
3. Open new file (file-ending `.fix`) or open existing fix-file (see sample below)

B) Install vsix file:
1. Install vsce: `npm install -g vsce`
2. In org.metafacture.fix.vsc execute: `vsce package`
2. In `metafix-vsc/` execute: `vsce package`
vsce will create a vsix file in the vsc directory which can be used for installation:
3. Open VS Code / Codium
4. Click 'Extensions' section
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ subprojects {
}

task installServer(type: Copy) {
dependsOn(':org.metafacture.fix.ide:installDist')
from "org.metafacture.fix.ide/build/install/xtext-server"
into "org.metafacture.fix.vsc/xtext-server"
dependsOn(':metafix-ide:installDist')
from "metafix-ide/build/install/xtext-server"
into "metafix-vsc/xtext-server"
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="org.metafacture.fix.web">
<property name="context-root" value="org.metafacture.fix.web"/>
<wb-module deploy-name="metafix-web">
<property name="context-root" value="metafix-web"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/xtext-gen"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
<wb-resource deploy-path="/" source-path="src/main/webapp"/>
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/org.metafacture.fix.ide/org.metafacture.fix.ide">
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/metafix-ide/metafix-ide">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/org.metafacture.fix/org.metafacture.fix">
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/metafix/metafix">
<dependency-type>uses</dependency-type>
</dependent-module>
</wb-module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {

dependencies {
implementation project(':metafix')
implementation project(':org.metafacture.fix.ide')
implementation project(':metafix-ide')

implementation "org.eclipse.xtend:org.eclipse.xtend.lib:${versions.xtext}"
implementation "org.eclipse.xtext:org.eclipse.xtext.web.servlet:${versions.xtext}"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ Workflow {
component = XtextGenerator {
configuration = {
project = StandardProjectConfig {
baseName = "org.metafacture.fix"
baseName = "metafix"
rootPath = ".."
runtimeTest = {
enabled = true
}
genericIde = {
name = "metafix-ide"
}
web = {
name = "metafix-web"
enabled = true
}
mavenLayout = true
Expand Down
9 changes: 3 additions & 6 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
include 'org.metafacture.fix'
include 'org.metafacture.fix.ide'
include 'org.metafacture.fix.web'

// change subproject name
project(":org.metafacture.fix").name = "metafix"
include 'metafix'
include 'metafix-ide'
include 'metafix-web'