Skip to content

Commit

Permalink
Version 1.5.29
Browse files Browse the repository at this point in the history
  • Loading branch information
waldo1001 committed Oct 20, 2023
1 parent ee29ef1 commit 6904c7d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,10 @@
# Change Log
All notable changes to the "crs-al-language-extension" extension:

## [1.5.29] - 2023-10-20
New! Organize your folders by Namespace.
Pretty neat idea from [Spyco Clown](https://github.com/Spycoclown), which he also turned into reality by [this pullrequest](https://github.com/waldo1001/crs-al-language-extension/pull/292). Many thanks!

## [1.5.28] - 2023-07-12
Fix from [James Pearson](https://github.com/jimmymcp): pull request [#282 - Do not add quotes to object names if not necessary when reorganising](https://github.com/waldo1001/crs-al-language-extension/pull/282/files) - thanks!

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -2,7 +2,7 @@
"name": "crs-al-language-extension",
"displayName": "waldo's CRS AL Language Extension",
"description": "Make working with the (Dynamics NAV / 365) AL Language easier and more efficient.",
"version": "1.5.28",
"version": "1.5.29",
"publisher": "waldo",
"icon": "images/waldo.png",
"author": {
Expand Down
7 changes: 3 additions & 4 deletions src/WorkspaceFiles.ts
Expand Up @@ -88,7 +88,7 @@ export class WorkspaceFiles {
if (navObject.objectFileName && navObject.objectFileName != '' && fixedname && fixedname != '') {

let objectFolder = path.join(vscode.workspace.getWorkspaceFolder(fileName).uri.fsPath, this.getDestinationFolder(navObject, settings));
let objectTypeFolder = path.join(objectFolder, this.getObjectTypeFolder(navObject, settings));//Boe
let objectTypeFolder = path.join(objectFolder, this.getObjectTypeFolder(navObject, settings));
let objectSubFolder = path.join(objectTypeFolder, this.getObjectSubFolder(navObject));
let destinationFileName = path.join(objectSubFolder, fixedname);

Expand Down Expand Up @@ -316,8 +316,7 @@ export class WorkspaceFiles {
}
}

if (mySettings[Settings.ReorganizeByNamespace])
{
if (mySettings[Settings.ReorganizeByNamespace]) {
let directoryPath = path.join(...navObject.objectNamespace.split("."))
return directoryPath
}
Expand All @@ -336,7 +335,7 @@ export class WorkspaceFiles {
static createDirectoryIfNotExists(dir) {
const segments = dir.split(path.sep);
let currentPath = segments[0];

for (let i = 1; i < segments.length; i++) {
if (segments[i]) {
currentPath = path.join(currentPath, segments[i]);
Expand Down

0 comments on commit 6904c7d

Please sign in to comment.