From ecdaf088b436373665705f08d20d46c5852c2238 Mon Sep 17 00:00:00 2001 From: Yannick Daveluy Date: Sat, 17 Aug 2024 18:39:00 +0200 Subject: [PATCH] initital commit --- .github/workflows/main.yml | 51 +++ .gitignore | 2 + .project | 11 + LICENSE | 16 + README.md | 2 + RELEASE.md | 9 + org.eclipse.xsmp/.classpath | 7 + org.eclipse.xsmp/.gitignore | 1 + org.eclipse.xsmp/.project | 28 ++ .../org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 9 + org.eclipse.xsmp/META-INF/MANIFEST.MF | 13 + org.eclipse.xsmp/build.properties | 7 + org.eclipse.xsmp/icons/langium-small.png | Bin 0 -> 2896 bytes org.eclipse.xsmp/icons/langium-small@2x.png | Bin 0 -> 3862 bytes org.eclipse.xsmp/package-lock.json | 347 ++++++++++++++++++ org.eclipse.xsmp/package.json | 5 + org.eclipse.xsmp/plugin.xml | 87 +++++ org.eclipse.xsmp/pom.xml | 159 ++++++++ .../src/org/eclipse/xsmp/Activator.java | 27 ++ .../eclipse/xsmp/XsmpBuiltinFileSystem.java | 38 ++ .../org/eclipse/xsmp/XsmpLanguageServer.java | 50 +++ pom.xml | 229 ++++++++++++ releng/feature/build.properties | 1 + releng/feature/feature.xml | 16 + releng/feature/pom.xml | 35 ++ releng/repository/.project | 11 + releng/repository/category.xml | 7 + releng/repository/pom.xml | 44 +++ releng/repository/repo-index.html | 11 + releng/target-platform/.project | 11 + .../target-platform/org.eclipse.xsmp.target | 19 + releng/target-platform/pom.xml | 26 ++ 33 files changed, 1281 insertions(+) create mode 100644 .github/workflows/main.yml create mode 100644 .gitignore create mode 100644 .project create mode 100644 LICENSE create mode 100644 README.md create mode 100644 RELEASE.md create mode 100644 org.eclipse.xsmp/.classpath create mode 100644 org.eclipse.xsmp/.gitignore create mode 100644 org.eclipse.xsmp/.project create mode 100644 org.eclipse.xsmp/.settings/org.eclipse.core.resources.prefs create mode 100644 org.eclipse.xsmp/.settings/org.eclipse.jdt.core.prefs create mode 100644 org.eclipse.xsmp/META-INF/MANIFEST.MF create mode 100644 org.eclipse.xsmp/build.properties create mode 100644 org.eclipse.xsmp/icons/langium-small.png create mode 100644 org.eclipse.xsmp/icons/langium-small@2x.png create mode 100644 org.eclipse.xsmp/package-lock.json create mode 100644 org.eclipse.xsmp/package.json create mode 100644 org.eclipse.xsmp/plugin.xml create mode 100644 org.eclipse.xsmp/pom.xml create mode 100644 org.eclipse.xsmp/src/org/eclipse/xsmp/Activator.java create mode 100644 org.eclipse.xsmp/src/org/eclipse/xsmp/XsmpBuiltinFileSystem.java create mode 100644 org.eclipse.xsmp/src/org/eclipse/xsmp/XsmpLanguageServer.java create mode 100644 pom.xml create mode 100644 releng/feature/build.properties create mode 100644 releng/feature/feature.xml create mode 100644 releng/feature/pom.xml create mode 100644 releng/repository/.project create mode 100644 releng/repository/category.xml create mode 100644 releng/repository/pom.xml create mode 100644 releng/repository/repo-index.html create mode 100644 releng/target-platform/.project create mode 100644 releng/target-platform/org.eclipse.xsmp.target create mode 100644 releng/target-platform/pom.xml 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..d10beb6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,16 @@ +Copyright 2024 Yannick Daveluy + +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 0000000000000000000000000000000000000000..46ed1e5e0c9b00c2514baa4f28275ecfea1e26d7 GIT binary patch literal 2896 zcmaJ@4OA568lHthgh)d2D)zH3V1##ee)fl*X&D0-1Z`zqRu6hHo1K}3!JVCLX84mt zu3fe4R@kL`uBj(FXs6D-VAo@2MrbB=%f!k`k9DZ-u@rA7rLGxLale`U1>x@Q?Dx*Q z&-1?D_q^}-%|7m0wm2;%D+Pj}wDK~C8;t4dm7D~=@BVR&27^v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_+iz}7%^bP%s zrsoxIyXkN3e|X-y_CLKxl2iJiwnq+15ojH?G*{Ir-?kz02?YIlYU;E1RpIy7ctVpLl-v z&kuB${`7kO8u#b(d)-$zZ@f}m|H?ZJt<@cQn+D(fN$B~zEvIVjjHhO9U$z=v?z-^y zOLG44Umsn;p8sje4En8ncZ2pJvh@C$>Q16*p`OOx`&_k`v z_1`*@a@U+86ZNg{crOYIzUeyO)_Kp43>H&8Bj$110Hden?nwkIE$d%y}$Gb+3 z4Iea)oLx91?4$qWRU)$97Tk6>9R$W)# W*rl~&*XOH$4$DiHIeLm8+Vnrpc94?* literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..c43f1f0921dbf431247006ddd53aa02034d94fd9 GIT binary patch literal 3862 zcmaJ^30M=?7M_401P~M`iWEbj%9eeBL3sca+as2zD6!6d02oqQ2x7(8o8;3BZGKsHsFld2EbI*3_w={LB0UW z8qm|)0Kh@b9<^7Z9EULo5=8=Z5R3_O$WUahZGqTn*#cn7Fn0%X)tIiD)5tX-h#i6< z<4Ht3nF;`8BALV_GMHorhD2u~KQaXXbW2cUV=2)YjfW}G9kVr&7pIXmISr+O%j5un zx7QpfH7qM271lk--=`o`@%6S!fIf<00enm|?#D!*t}%6C1BkNSOpea&j_0 znSz(d_yiJz!5|RH1Tq&u>w@$#B%$gAR}>nVL2odNEHH!7^8^`awJI#Pb^lG zX!J8QPK|aGGVui>sWulfAHwGtTxb+8O_B+g|G+~E93+cp7dEB5^t0!mJjQP zC`nL)QiMeOEJ-2YjR`S+t6<>4t(m=Ffb zB}p;}_FIL_dQ5*rUJs3?%!MIAEHa+xK^VOoQ-25%0n6k_g%FgsbBB>5-pS~2fe2or z07X(3iB2Ii$W(?qjZAbWy3>b=V}Qxj5Fx1GNn|1x8-y^6mki@az2o3qi0O|2K?O@7 z0{JjOD&~6-#+>7jh{8;^ge%~s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7LM!gLd|LVAi0UsJAcX<5#7fw5-bx zK#$?!{G9rei@&)Y6@B2%i~M}=8b`w-v7cam*m8EaA%Fdb!I{96_U)GIRPSzEJ_8D= zk6)?H?#E%;r_COC-P?uxmg95!FX+&XR8MX=e!=_7n^umt4^c{tLsSAM!o<7^X{4g* z26gsFpZ}fex+ST>Y?bZBoVUi8qP&u4?Ta_f@t^*f?U40g|68M$lbn!!F2T+B51+v{ zG+2~nx8-*E4E~3G!?R6%&b7|px<>AmSr zeaDn^uLnntmj8IcQBdQvnw80KOTM=z;jzT)d8VSOr{{{&S~Y-MWGg-XNc|*x_tpIG zGk>uu-EnZ|!Md;`$816W6Thxi^nW^69afVub))0*TX&wg*~YQrr!=@Y*pZAIpWbQZ zmc1#7Y1yHADcs9W!L+pM@QCUHR*=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-4MIlcKG8F3mugunpYCaWymrCR+e7YuamqMEnKBtJsQhjKA10OeFhBgY+trds/bdgs6EocCO6ttZEMXz2Wfp+zA==", + "license": "MIT", + "dependencies": { + "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..25ef803 --- /dev/null +++ b/org.eclipse.xsmp/pom.xml @@ -0,0 +1,159 @@ + + 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 + -- + --minify + + ${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