diff --git a/Dockerfile b/Dockerfile index 4eda4a3dbe97de9f0a40c73cd270080b99dbb8ca..f0f98e21c77e48a85c8f47dcad441efd178f295e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN apt install rsync -y RUN apt install vim -y COPY plugins /home/plugins -COPY plugin-storage/global-state.json /home/theia/.theia/plugin-storage/global-state.json +COPY default/.theia/ /home/theia/.theia/ RUN chown theia /home/theia/.theia -R RUN chown theia /home/plugins -R diff --git a/build-plugins.sh b/build-plugins.sh index 764f6d0c2bda9247af39317c07dd9cebe08b112d..cd04431c78d85f34d799d70216b1a54330e42f00 100755 --- a/build-plugins.sh +++ b/build-plugins.sh @@ -10,6 +10,6 @@ for dir in deadlock-plugins/*/; do CURRENT_PLUGIN_DIR=$(basename "$PWD") ./install.sh ./build.sh CI_COMMIT_SHORT_SHA - cp *.vsix ../../plugins/$CURRENT_PLUGIN_DIR-$CI_COMMIT_SHORT_SHA.vsix + cp -f *.vsix ../../plugins/$CURRENT_PLUGIN_DIR-$CI_COMMIT_SHORT_SHA.vsix cd - done diff --git a/deadlock-plugins/deadlock-extension/src/view/briefingView.ts b/deadlock-plugins/deadlock-extension/src/view/briefingView.ts index 827e56b35a581d23e1d1483a91a9aafc46ee3a47..6da57e1613b12aeb84999f1fa94ea18cf6d8f165 100644 --- a/deadlock-plugins/deadlock-extension/src/view/briefingView.ts +++ b/deadlock-plugins/deadlock-extension/src/view/briefingView.ts @@ -63,7 +63,7 @@ export default class BriefingView extends WebviewBase { this.briefingContent = this.setupImages(document.getText()); } catch (e) { console.error(e); - this.briefingContent = 'Error while parsing your briefing.' + this.briefingContent = 'Error while parsing your briefing.'; } this.show(); }, diff --git a/deadlock-plugins/deadlock-extension/src/view/view.ts b/deadlock-plugins/deadlock-extension/src/view/view.ts index 4bc8ed7408c8ece5731d1c1f20998d42ace8ada4..c2387c802709dbbca6fe070b5ba3bd89096c39a5 100644 --- a/deadlock-plugins/deadlock-extension/src/view/view.ts +++ b/deadlock-plugins/deadlock-extension/src/view/view.ts @@ -181,6 +181,14 @@ export default abstract class View { // append in the HTML head<script nonce="${nonce}" src="${scriptUri}"></script> + let content = ''; + try { + content = this.render(); + } catch (e) { + console.error('Erreur lors du render', e); + content = 'Impossible d\'afficher le rendu, nous sommes désolés'; + } + return `<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> @@ -189,7 +197,7 @@ export default abstract class View { </head> <body> <div> - ${this.render()} + ${content} </div> </body></html>`; } diff --git a/plugin-storage/global-state.json b/default/.theia/plugin-storage/global-state.json similarity index 100% rename from plugin-storage/global-state.json rename to default/.theia/plugin-storage/global-state.json diff --git a/default/.theia/settings.json b/default/.theia/settings.json new file mode 100644 index 0000000000000000000000000000000000000000..a2b0693a3754b16d9f6375290d8cbda6466b0832 --- /dev/null +++ b/default/.theia/settings.json @@ -0,0 +1,9 @@ +{ + "files.exclude": { + "**/.classpath": true, + "**/.project": true, + "**/.settings": true, + "**/.factorypath": true + }, + "editor.autoSave": "on" +}