Skip to content

Commit

Permalink
[EDM] Fix on-save Transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
ThuF committed Dec 6, 2023
1 parent 96fa1b1 commit 73765af
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
* SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and Eclipse Dirigible contributors
* SPDX-License-Identifier: EPL-2.0
*/
let transformer = require("ide-entity/template/transform-edm");
let workspaceManager = require("platform/workspace");
const transformer = require("ide-entity/template/transform-edm");
const workspaceManager = require("platform/workspace");

let workspace = __context.get('workspace');
let project = __context.get('project');
let path = __context.get('path');
const workspace = __context.get('workspace');
const project = __context.get('project');
const path = __context.get('path');

let modelPath = path.replace(".edm", ".model");
let content = transformer.transform(workspace, project, path);
const modelPath = path.replace(".edm", ".model");
const content = transformer.transform(workspace, project, path);

if (content !== null) {
let bytes = require("io/bytes");
input = bytes.textToByteArray(content);
const bytes = require("io/bytes");
const input = bytes.textToByteArray(content);

if (workspaceManager.getWorkspace(workspace)
.getProject(project).getFile(path).exists()) {
Expand Down

0 comments on commit 73765af

Please sign in to comment.