diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..7372acb --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,51 @@ +name: Build Xsmp Eclipse + +on: + push: + branches: + - "main" + tags: + - "v*.*.*" + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: 11 + distribution: adopt + + # Maven build start + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Create P2 update repository + run: | + mvn clean package + cp releng/repository/repo-index.html releng/repository/target/repository/index.html + - name: Archive P2 Repository + uses: actions/upload-artifact@v2 + with: + name: p2-update-site + path: | + releng/repository/target/repository + retention-days: 14 + - name: Purge Artifacts from Cache + run: | + mvn dependency:purge-local-repository -ntp + # Maven build end + + - name: Publish to GH packages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: releng/repository/target/repository/ + destination_dir: download/updates/${{ github.ref_name }} + \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fb60f67 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +bin/ +target/ diff --git a/.project b/.project new file mode 100644 index 0000000..173d226 --- /dev/null +++ b/.project @@ -0,0 +1,11 @@ + + + xsmp-modeler-eclipse + + + + + + + + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8b28fb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,16 @@ +Copyright 2023 TypeFox GmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..65be3e4 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Xsmp Modeler Eclipse Plug-in + diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..08cebca --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,9 @@ +#### Update version + +`mvn org.eclipse.tycho:tycho-versions-plugin:2.7.5:set-version -DnewVersion="1.0.2-SNPASHOT"` + + +#### Deploy p2 Repository + +Create a tag `v1.0.1` and push it. GH Action will create a p2 repository and publish it to GH Pages. + diff --git a/org.eclipse.xsmp/.classpath b/org.eclipse.xsmp/.classpath new file mode 100644 index 0000000..81fe078 --- /dev/null +++ b/org.eclipse.xsmp/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/org.eclipse.xsmp/.gitignore b/org.eclipse.xsmp/.gitignore new file mode 100644 index 0000000..2ccbe46 --- /dev/null +++ b/org.eclipse.xsmp/.gitignore @@ -0,0 +1 @@ +/node_modules/ diff --git a/org.eclipse.xsmp/.project b/org.eclipse.xsmp/.project new file mode 100644 index 0000000..aa631dc --- /dev/null +++ b/org.eclipse.xsmp/.project @@ -0,0 +1,28 @@ + + + org.eclipse.xsmp + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/org.eclipse.xsmp/.settings/org.eclipse.core.resources.prefs b/org.eclipse.xsmp/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/org.eclipse.xsmp/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/org.eclipse.xsmp/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.xsmp/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..62ef348 --- /dev/null +++ b/org.eclipse.xsmp/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,9 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 diff --git a/org.eclipse.xsmp/META-INF/MANIFEST.MF b/org.eclipse.xsmp/META-INF/MANIFEST.MF new file mode 100644 index 0000000..f2f0d37 --- /dev/null +++ b/org.eclipse.xsmp/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Xsmp +Bundle-SymbolicName: org.eclipse.xsmp;singleton:=true +Bundle-Version: 1.0.1.qualifier +Require-Bundle: org.eclipse.lsp4e;bundle-version="0.15.0", + org.eclipse.core.runtime;bundle-version="3.26.100", + org.eclipse.wildwebdeveloper.embedder.node;bundle-version="1.0.1", + org.eclipse.ui;bundle-version="3.201.200", + org.eclipse.wildwebdeveloper, + org.eclipse.core.filesystem +Automatic-Module-Name: org.eclipse.xsmp +Bundle-RequiredExecutionEnvironment: JavaSE-17 diff --git a/org.eclipse.xsmp/build.properties b/org.eclipse.xsmp/build.properties new file mode 100644 index 0000000..1c9e369 --- /dev/null +++ b/org.eclipse.xsmp/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + node_modules/,\ + plugin.xml,\ + icons/ diff --git a/org.eclipse.xsmp/icons/langium-small.png b/org.eclipse.xsmp/icons/langium-small.png new file mode 100644 index 0000000..46ed1e5 Binary files /dev/null and b/org.eclipse.xsmp/icons/langium-small.png differ diff --git a/org.eclipse.xsmp/icons/langium-small@2x.png b/org.eclipse.xsmp/icons/langium-small@2x.png new file mode 100644 index 0000000..c43f1f0 Binary files /dev/null and b/org.eclipse.xsmp/icons/langium-small@2x.png differ diff --git a/org.eclipse.xsmp/package-lock.json b/org.eclipse.xsmp/package-lock.json new file mode 100644 index 0000000..8f2a2e3 --- /dev/null +++ b/org.eclipse.xsmp/package-lock.json @@ -0,0 +1,354 @@ +{ + "name": "org.eclipse.xsmp", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "xsmp-modeler": "file:target/xsmp-modeler-0.0.5.tgz" + } + }, + "node_modules/@chevrotain/cst-dts-gen": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.0.3.tgz", + "integrity": "sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ==", + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/gast": "11.0.3", + "@chevrotain/types": "11.0.3", + "lodash-es": "4.17.21" + } + }, + "node_modules/@chevrotain/gast": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-11.0.3.tgz", + "integrity": "sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q==", + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/types": "11.0.3", + "lodash-es": "4.17.21" + } + }, + "node_modules/@chevrotain/regexp-to-ast": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/regexp-to-ast/-/regexp-to-ast-11.0.3.tgz", + "integrity": "sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA==", + "license": "Apache-2.0" + }, + "node_modules/@chevrotain/types": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.0.3.tgz", + "integrity": "sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ==", + "license": "Apache-2.0" + }, + "node_modules/@chevrotain/utils": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-11.0.3.tgz", + "integrity": "sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ==", + "license": "Apache-2.0" + }, + "node_modules/@js-joda/core": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/@js-joda/core/-/core-5.6.3.tgz", + "integrity": "sha512-T1rRxzdqkEXcou0ZprN1q9yDRlvzCPLqmlNt5IIsGBzoEVgLCCYrKEwc84+TvsXuAc95VAZwtWD2zVsKPY4bcA==", + "license": "BSD-3-Clause" + }, + "node_modules/@oozcitak/dom": { + "version": "1.15.10", + "resolved": "https://registry.npmjs.org/@oozcitak/dom/-/dom-1.15.10.tgz", + "integrity": "sha512-0JT29/LaxVgRcGKvHmSrUTEvZ8BXvZhGl2LASRUgHqDTC1M5g1pLmVv56IYNyt3bG2CUjDkc67wnyZC14pbQrQ==", + "license": "MIT", + "dependencies": { + "@oozcitak/infra": "1.0.8", + "@oozcitak/url": "1.0.4", + "@oozcitak/util": "8.3.8" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/@oozcitak/infra": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@oozcitak/infra/-/infra-1.0.8.tgz", + "integrity": "sha512-JRAUc9VR6IGHOL7OGF+yrvs0LO8SlqGnPAMqyzOuFZPSZSXI7Xf2O9+awQPSMXgIWGtgUf/dA6Hs6X6ySEaWTg==", + "license": "MIT", + "dependencies": { + "@oozcitak/util": "8.3.8" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/@oozcitak/url": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@oozcitak/url/-/url-1.0.4.tgz", + "integrity": "sha512-kDcD8y+y3FCSOvnBI6HJgl00viO/nGbQoCINmQ0h98OhnGITrWR3bOGfwYCthgcrV8AnTJz8MzslTQbC3SOAmw==", + "license": "MIT", + "dependencies": { + "@oozcitak/infra": "1.0.8", + "@oozcitak/util": "8.3.8" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/@oozcitak/util": { + "version": "8.3.8", + "resolved": "https://registry.npmjs.org/@oozcitak/util/-/util-8.3.8.tgz", + "integrity": "sha512-T8TbSnGsxo6TDBJx/Sgv/BlVJL3tshxZP7Aq5R1mSnM5OcHY2dQaxLMu2+E8u3gN0MLOzdjurqN4ZRVuzQycOQ==", + "license": "MIT", + "engines": { + "node": ">=8.0" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chevrotain": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.0.3.tgz", + "integrity": "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==", + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/cst-dts-gen": "11.0.3", + "@chevrotain/gast": "11.0.3", + "@chevrotain/regexp-to-ast": "11.0.3", + "@chevrotain/types": "11.0.3", + "@chevrotain/utils": "11.0.3", + "lodash-es": "4.17.21" + } + }, + "node_modules/chevrotain-allstar": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/chevrotain-allstar/-/chevrotain-allstar-0.3.1.tgz", + "integrity": "sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw==", + "license": "MIT", + "dependencies": { + "lodash-es": "^4.17.21" + }, + "peerDependencies": { + "chevrotain": "^11.0.0" + } + }, + "node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/langium": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/langium/-/langium-3.1.3.tgz", + "integrity": "sha512-VDmrpRooT2QkKHbEtE5Ld6pbD1HuCKfM1CrAEwEpHBkw3S7xzuIgSJ+BdvFfpEMedymV2ceS+mpUV7qoXDK4mQ==", + "license": "MIT", + "dependencies": { + "chevrotain": "~11.0.3", + "chevrotain-allstar": "~0.3.0", + "vscode-languageserver": "~9.0.1", + "vscode-languageserver-textdocument": "~1.0.11", + "vscode-uri": "~3.0.8" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", + "license": "MIT" + }, + "node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "license": "BSD-3-Clause" + }, + "node_modules/vscode-jsonrpc": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/vscode-languageclient": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-9.0.1.tgz", + "integrity": "sha512-JZiimVdvimEuHh5olxhxkht09m3JzUGwggb5eRUkzzJhZ2KjCN0nh55VfiED9oez9DyF8/fz1g1iBV3h+0Z2EA==", + "license": "MIT", + "dependencies": { + "minimatch": "^5.1.0", + "semver": "^7.3.7", + "vscode-languageserver-protocol": "3.17.5" + }, + "engines": { + "vscode": "^1.82.0" + } + }, + "node_modules/vscode-languageserver": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "license": "MIT", + "dependencies": { + "vscode-languageserver-protocol": "3.17.5" + }, + "bin": { + "installServerIntoExtension": "bin/installServerIntoExtension" + } + }, + "node_modules/vscode-languageserver-protocol": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", + "license": "MIT", + "dependencies": { + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" + } + }, + "node_modules/vscode-languageserver-textdocument": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", + "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", + "license": "MIT" + }, + "node_modules/vscode-languageserver-types": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", + "license": "MIT" + }, + "node_modules/vscode-uri": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", + "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", + "license": "MIT" + }, + "node_modules/xmlbuilder2": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/xmlbuilder2/-/xmlbuilder2-3.1.1.tgz", + "integrity": "sha512-WCSfbfZnQDdLQLiMdGUQpMxxckeQ4oZNMNhLVkcekTu7xhD4tuUDyAPoY8CwXvBYE6LwBHd6QW2WZXlOWr1vCw==", + "license": "MIT", + "dependencies": { + "@oozcitak/dom": "1.15.10", + "@oozcitak/infra": "1.0.8", + "@oozcitak/util": "8.3.8", + "js-yaml": "3.14.1" + }, + "engines": { + "node": ">=12.0" + } + }, + "node_modules/xsmp-modeler": { + "version": "0.0.5", + "resolved": "file:target/xsmp-modeler-0.0.5.tgz", + "integrity": "sha512-/X7jiD7oiOpfhJlSTS6Hb9osM9POlq0uAHVOWwSlwM1ycydZKhSzGDJP74Ppq8XZa8pd7B1tjU9MLZ4vkati2g==", + "license": "MIT", + "dependencies": { + "@js-joda/core": "^5.6.3", + "chalk": "~5.3.0", + "commander": "~12.1.0", + "langium": "~3.1.3", + "vscode-languageclient": "~9.0.1", + "vscode-languageserver": "~9.0.1", + "xmlbuilder2": "^3.1.1" + }, + "bin": { + "xsmpproject-cli": "bin/cli.js" + }, + "engines": { + "node": ">=18.0.0", + "vscode": "^1.67.0" + } + } + } +} diff --git a/org.eclipse.xsmp/package.json b/org.eclipse.xsmp/package.json new file mode 100644 index 0000000..c8f9806 --- /dev/null +++ b/org.eclipse.xsmp/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "xsmp-modeler": "file:target/xsmp-modeler-0.0.5.tgz" + } +} diff --git a/org.eclipse.xsmp/plugin.xml b/org.eclipse.xsmp/plugin.xml new file mode 100644 index 0000000..e590f21 --- /dev/null +++ b/org.eclipse.xsmp/plugin.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.xsmp/pom.xml b/org.eclipse.xsmp/pom.xml new file mode 100644 index 0000000..5247958 --- /dev/null +++ b/org.eclipse.xsmp/pom.xml @@ -0,0 +1,157 @@ + + 4.0.0 + org.eclipse.xsmp + + org.eclipse.xsmp + org.eclipse.xsmp.parent + 1.0.1-SNAPSHOT + ../pom.xml + + eclipse-plugin + + + + + org.apache.maven.plugins + maven-clean-plugin + + + + node_modules + + + . + + package-lock.json + + + + + + + org.apache.maven.plugins + maven-scm-plugin + 1.13.0 + + + Checkout Xsmp sources + + checkout + + process-sources + + + scm:git:https://github.com/ydaveluy/xsmp-modeler.git + tag + v0.0.5 + ${project.build.directory} + + ${project.build.directory}/xsmp + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + + Local install Xsmp + + exec + + compile + + npm + + install + + ${project.build.directory}/xsmp + + + + Local generate Xsmp + + exec + + compile + + npm + + run + langium:generate + + ${project.build.directory}/xsmp + + + + + Local build Xsmp + + exec + + compile + + npm + + run + build + + ${project.build.directory}/xsmp + + + + Local pack Xsmp + + exec + + compile + + npm + + pack + --no-bin-links + --ignore-scripts + --pack-destination=${project.build.directory} + + + ${project.build.directory}/xsmp + + + + Resolve dependencies + + exec + + compile + + npm + + install + --omit=dev + --only=prod + --no-bin-links + --ignore-scripts + + ${project.basedir} + + + + + + org.eclipse.tycho + tycho-packaging-plugin + ${tycho-version} + + + node_modules + package-lock.json + + + + + + diff --git a/org.eclipse.xsmp/src/org/eclipse/xsmp/Activator.java b/org.eclipse.xsmp/src/org/eclipse/xsmp/Activator.java new file mode 100644 index 0000000..5f01462 --- /dev/null +++ b/org.eclipse.xsmp/src/org/eclipse/xsmp/Activator.java @@ -0,0 +1,27 @@ +package org.eclipse.xsmp; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +public class Activator extends AbstractUIPlugin { + + public static final String PLUGIN_ID = "org.eclipse.xsmp"; + + private static Activator plugin; + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + public static Activator getDefault() { + return plugin; + } +} diff --git a/org.eclipse.xsmp/src/org/eclipse/xsmp/XsmpBuiltinFileSystem.java b/org.eclipse.xsmp/src/org/eclipse/xsmp/XsmpBuiltinFileSystem.java new file mode 100644 index 0000000..aa0ff9c --- /dev/null +++ b/org.eclipse.xsmp/src/org/eclipse/xsmp/XsmpBuiltinFileSystem.java @@ -0,0 +1,38 @@ +package org.eclipse.xsmp; + +import java.io.File; +import java.io.IOException; +import java.net.URI; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.filesystem.provider.FileSystem; +import org.eclipse.core.internal.filesystem.NullFileStore; +import org.eclipse.core.internal.filesystem.local.LocalFile; +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.core.runtime.Path; + +@SuppressWarnings("restriction") +public class XsmpBuiltinFileSystem extends FileSystem +{ + + @Override + public IFileStore getStore(URI uri) + { + try + { + final var url = FileLocator.toFileURL(getClass() + .getResource("/node_modules/xsmp-modeler/out/lib/" + uri.getSchemeSpecificPart())); + if (url != null) + { + return new LocalFile(new File(url.getFile())); + } + } + catch (final IOException e) + { + // ignore + } + + return new NullFileStore(new Path(uri.getPath())); + } + +} diff --git a/org.eclipse.xsmp/src/org/eclipse/xsmp/XsmpLanguageServer.java b/org.eclipse.xsmp/src/org/eclipse/xsmp/XsmpLanguageServer.java new file mode 100644 index 0000000..029425c --- /dev/null +++ b/org.eclipse.xsmp/src/org/eclipse/xsmp/XsmpLanguageServer.java @@ -0,0 +1,50 @@ + +package org.eclipse.xsmp; + +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.lsp4e.server.ProcessStreamConnectionProvider; +import org.eclipse.lsp4e.server.StreamConnectionProvider; +import org.eclipse.wildwebdeveloper.embedder.node.NodeJSManager; + +/** + * @author dhuebner + */ +public class XsmpLanguageServer extends ProcessStreamConnectionProvider + implements StreamConnectionProvider +{ + + public XsmpLanguageServer() + { + final List commands = new ArrayList<>(); + commands.add(NodeJSManager.getNodeJsLocation().getAbsolutePath()); + try + { + final var url = FileLocator + .toFileURL(getClass().getResource("/node_modules/xsmp-modeler/out/language/main.js")); + commands.add(new java.io.File(url.getPath()).getAbsolutePath()); + commands.add("--stdio"); + setCommands(commands); + setWorkingDirectory(System.getProperty("user.dir")); + } + catch (final IOException e) + { + Activator.getDefault().getLog().log(new Status(IStatus.ERROR, + Activator.getDefault().getBundle().getSymbolicName(), e.getMessage(), e)); + } + } + + @Override + public Object getInitializationOptions(URI rootUri) + { + return Collections.singletonMap("provideFormatter", true); + } + +} diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..a4a75ad --- /dev/null +++ b/pom.xml @@ -0,0 +1,229 @@ + + 4.0.0 + pom + + org.eclipse.xsmp + org.eclipse.xsmp.parent + 1.0.1-SNAPSHOT + + + 4.0.8 + UTF-8 + 17 + 17 + + + org.eclipse.xsmp + releng/target-platform + releng/feature + releng/repository + + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho-version} + true + + + org.eclipse.tycho + tycho-source-plugin + ${tycho-version} + + + plugin-source + + plugin-source + + + + + + org.eclipse.tycho + tycho-p2-plugin + ${tycho-version} + + + attach-p2-metadata + package + + p2-metadata + + + + + + org.eclipse.tycho + target-platform-configuration + ${tycho-version} + + JavaSE-17 + + + org.eclipse.xsmp + org.eclipse.xsmp.target + ${project.version} + + + + + macosx + cocoa + x86_64 + + + macosx + cocoa + aarch64 + + + win32 + win32 + x86_64 + + + linux + gtk + x86_64 + + + + + + maven-deploy-plugin + + + + + + org.eclipse.tycho + tycho-compiler-plugin + ${tycho-version} + + -err:-forbidden + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + + org.apache.maven.plugins + maven-clean-plugin + 3.2.0 + + + + ${project.basedir}/target + + + + + + org.eclipse.tycho + tycho-p2-plugin + ${tycho-version} + + true + + + + https://download.eclipse.org/wildwebdeveloper/snapshots/ + + + + META-INF/ECLIPSE_.RSA + META-INF/ECLIPSE_.SF + + + + + com.googlecode.maven-download-plugin + download-maven-plugin + 1.6.8 + + + + + + + release + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + true + true + UTF-8 + UTF-8 + UTF-8 + -Xdoclint:none + false + + + + package + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + + + + + Xsmp Eclipse Plugin + Provides Xsmp language server for LSP4E. + https://github.com/ydaveluy/xsmp-modeler-eclipse + + + MIT License + https://www.opensource.org/licenses/mit-license.php + + + + scm:git:git://github.com/ydaveluy/xsmp-modeler-eclipse.git + + scm:git:ssh://github.com/ydaveluy/xsmp-modeler-eclipse.git + https://github.com/ydaveluy/xsmp-modeler-eclipse + + + + OSSRH + https://oss.sonatype.org/content/repositories/snapshots + + + OSSRH + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + \ No newline at end of file diff --git a/releng/feature/build.properties b/releng/feature/build.properties new file mode 100644 index 0000000..b045d39 --- /dev/null +++ b/releng/feature/build.properties @@ -0,0 +1 @@ +bin.includes = feature.xml \ No newline at end of file diff --git a/releng/feature/feature.xml b/releng/feature/feature.xml new file mode 100644 index 0000000..a724005 --- /dev/null +++ b/releng/feature/feature.xml @@ -0,0 +1,16 @@ + + + + + Editor for the Xsmp Language. + + + + + diff --git a/releng/feature/pom.xml b/releng/feature/pom.xml new file mode 100644 index 0000000..ef2ec63 --- /dev/null +++ b/releng/feature/pom.xml @@ -0,0 +1,35 @@ + + + 4.0.0 + + org.eclipse.xsmp + org.eclipse.xsmp.parent + 1.0.1-SNAPSHOT + ../../pom.xml + + + org.eclipse.xsmp.feature + eclipse-feature + + + + + org.apache.maven.plugins + maven-install-plugin + 2.5.2 + + + default-install + none + + + + + maven-deploy-plugin + + true + + + + + \ No newline at end of file diff --git a/releng/repository/.project b/releng/repository/.project new file mode 100644 index 0000000..4bcf987 --- /dev/null +++ b/releng/repository/.project @@ -0,0 +1,11 @@ + + + repository + + + + + + + + diff --git a/releng/repository/category.xml b/releng/repository/category.xml new file mode 100644 index 0000000..c4ba5fa --- /dev/null +++ b/releng/repository/category.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/releng/repository/pom.xml b/releng/repository/pom.xml new file mode 100644 index 0000000..8104902 --- /dev/null +++ b/releng/repository/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + + org.eclipse.xsmp + org.eclipse.xsmp.parent + 1.0.1-SNAPSHOT + ../../pom.xml + + + org.eclipse.xsmp.repository + eclipse-repository + + + + + org.eclipse.tycho + tycho-p2-repository-plugin + ${tycho-version} + + false + + + + + org.apache.maven.plugins + maven-install-plugin + 2.5.2 + + + default-install + none + + + + + maven-deploy-plugin + + true + + + + + \ No newline at end of file diff --git a/releng/repository/repo-index.html b/releng/repository/repo-index.html new file mode 100644 index 0000000..8bd2a17 --- /dev/null +++ b/releng/repository/repo-index.html @@ -0,0 +1,11 @@ + + + +Xsmp Repository + + + +

This is a p2 repository for the Xsmp Eclipse Plug-In.

+

Point your p2 repository manager to this location.

+ + \ No newline at end of file diff --git a/releng/target-platform/.project b/releng/target-platform/.project new file mode 100644 index 0000000..cedbacf --- /dev/null +++ b/releng/target-platform/.project @@ -0,0 +1,11 @@ + + + target-platform + + + + + + + + diff --git a/releng/target-platform/org.eclipse.xsmp.target b/releng/target-platform/org.eclipse.xsmp.target new file mode 100644 index 0000000..28f6e7b --- /dev/null +++ b/releng/target-platform/org.eclipse.xsmp.target @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/releng/target-platform/pom.xml b/releng/target-platform/pom.xml new file mode 100644 index 0000000..7ba80a4 --- /dev/null +++ b/releng/target-platform/pom.xml @@ -0,0 +1,26 @@ + + 4.0.0 + + + org.eclipse.xsmp + org.eclipse.xsmp.parent + 1.0.1-SNAPSHOT + ../../pom.xml + + + org.eclipse.xsmp.target + + + eclipse-target-definition + + + + + maven-deploy-plugin + + true + + + + + \ No newline at end of file