Skip to content

Commit

Permalink
Retrait maj schema après update dans l'extension
Browse files Browse the repository at this point in the history
  • Loading branch information
JabX committed Sep 3, 2024
1 parent 3d46fde commit 6662d2e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 32 deletions.
10 changes: 0 additions & 10 deletions TopModel.VSCode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@
"title": "Ouvrir le changelog",
"category": "TopModel"
},
{
"command": "topmodel.schema",
"title": "Générer le(s) schéma(s)",
"category": "TopModel"
},
{
"command": "topmodel.preview",
"title": "Ouvrir la prévisualisation UML du modèle",
Expand Down Expand Up @@ -155,11 +150,6 @@
"type": "boolean",
"default": false,
"description": "Met à jour automatiquement topmodel"
},
"topmodel.regenerateSchemaAfterUpdate": {
"type": "boolean",
"default": true,
"description": "Met à jour automatiquement le schéma json de configuration après une mise à jour de modgen"
}
}
}
Expand Down
1 change: 0 additions & 1 deletion TopModel.VSCode/src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export const COMMANDS = {
findRef: "topmodel.findRef",
releaseNote: "topmodel.releaseNote",
chooseCommand: "topmodel.chooseCommand",
schema: "topmodel.schema",
};

// Stockage de l'ensemble des commandes disponibles.
Expand Down
14 changes: 0 additions & 14 deletions TopModel.VSCode/src/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export class State {
applications: Application[] = [];
error?: string;
preview?: TopModelPreviewPanel;
_schemaTerminal: Terminal | undefined;
constructor(public readonly context: ExtensionContext) {
makeAutoObservable(this);
this.initTools();
Expand Down Expand Up @@ -140,7 +139,6 @@ export class State {
private registerCommands() {
this.registerPreviewCommand();
this.registerGoToLocation();
this.registerSchema();
this.registerChooseCommand();
this.registerReleaseNote();
}
Expand Down Expand Up @@ -174,18 +172,6 @@ export class State {
);
}

private registerSchema() {
this.context.subscriptions.push(
commands.registerCommand(COMMANDS.schema, async () => {
if (!this._schemaTerminal) {
this._schemaTerminal = window.createTerminal("generate schema");
}

this._schemaTerminal.sendText("modgen -s");
})
);
}

private registerReleaseNote() {
this.context.subscriptions.push(
commands.registerCommand(COMMANDS.releaseNote, async () => {
Expand Down
7 changes: 0 additions & 7 deletions TopModel.VSCode/src/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,6 @@ export class TmdTool {
if (this.latestVersion) {
this.showReleaseNote(`${this.name} a été mis à jour ${oldVersion} --> ${this.latestVersion}`);
}

if (this.name === "TopModel.Generator") {
const extensionConfiguration = workspace.getConfiguration("topmodel");
if (extensionConfiguration.regenerateSchemaAfterUpdate) {
await commands.executeCommand(COMMANDS.schema);
}
}
}

private async onInstalledChanged() {
Expand Down

0 comments on commit 6662d2e

Please sign in to comment.