Skip to content

Commit ecf8b4c

Browse files
author
Tyler Deemer
committed
Fix how CSP files are detected, change OTHER to OTH to match Atelier API
1 parent c64332b commit ecf8b4c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/explorer/models/rootNode.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class RootNode extends NodeBase {
6262
case "CSP":
6363
spec = "*";
6464
break;
65-
case "OTHER":
65+
case "OTH":
6666
spec = "*";
6767
break;
6868
default:
@@ -105,7 +105,7 @@ export class RootNode extends NodeBase {
105105
return this.getList(path, category, false).then((data) =>
106106
data
107107
.filter((el) => {
108-
if (category === "OTHER") {
108+
if (category === "OTH") {
109109
return el.Type === "100";
110110
} else if (category === "CSP") {
111111
return el.Type === "10" || el.Type === "5";
@@ -115,11 +115,11 @@ export class RootNode extends NodeBase {
115115
})
116116
.map((el) => {
117117
switch (el.Type) {
118-
case "5":
119118
case "9":
120-
case "100":
121119
return new PackageNode(el.Name, el.fullName, category, this.options);
122120
case "4":
121+
case "5":
122+
case "100":
123123
return new ClassNode(el.Name, el.fullName, this.options);
124124
case "0":
125125
case "1":

src/explorer/models/workspaceNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class WorkspaceNode extends NodeBase {
3838
node = new RootNode("CSP Files", "", "dataRootNode:cspRootNode", "CSP", this.options);
3939
children.push(node);
4040

41-
node = new RootNode("Other", "", "dataRootNode:otherRootNode", "OTHER", this.options);
41+
node = new RootNode("Other", "", "dataRootNode:otherRootNode", "OTH", this.options);
4242
children.push(node);
4343

4444
return children;

src/providers/DocumentContentProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class DocumentContentProvider implements vscode.TextDocumentContentProvid
6161
});
6262
}
6363
}
64-
const isCsp = name.split("/")[0] === "csp";
64+
const isCsp = name.includes("/");
6565
if (namespace && namespace !== "") {
6666
if (isCsp) {
6767
uri = uri.with({

0 commit comments

Comments
 (0)