-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
efa7675
commit 7a4799b
Showing
10 changed files
with
68 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { AbapObject } from "./AbapObject" | ||
import { Uri } from "vscode" | ||
|
||
export class AbapFunctionGroup extends AbapObject { | ||
isLeaf() { | ||
return false | ||
} | ||
getUri(base: Uri): Uri { | ||
const ptype = encodeURIComponent(this.type) | ||
const pname = encodeURIComponent(this.name) | ||
const techname = encodeURIComponent( | ||
this.namespace() === "" | ||
? "SAPL" + this.name | ||
: `/${this.namespace()}/SAPL${this.nameinns}` | ||
) | ||
return base.with({ | ||
path: "/sap/bc/adt/repository/nodestructure", | ||
query: `parent_name=${pname}&parent_tech_name=${techname}&parent_type=${ptype}&withShortDescriptions=true` | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { AbapObject } from "./AbapObject" | ||
import { Uri } from "vscode" | ||
|
||
export class AbapFunctionModule extends AbapObject { | ||
getUri(base: Uri): Uri { | ||
return base.with({ path: this.path + "/source/main" }) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
import { ObjectNode } from "../adt/AdtParser" | ||
import { AbapObject } from "./AbapObject" | ||
import { AbapPackage } from "./AbapPackage" | ||
import { AbapFunctionGroup } from "./AbapFunctionGroup" | ||
import { AbapSimpleObject } from "./AbapSimpleObject" | ||
|
||
export function fromObjectNode(node: ObjectNode): AbapObject { | ||
let objtype = AbapObject | ||
switch (node.OBJECT_TYPE) { | ||
case "DEVC/K": | ||
return new AbapPackage( | ||
node.OBJECT_TYPE, | ||
node.OBJECT_NAME, | ||
node.OBJECT_URI | ||
) | ||
default: | ||
return new AbapObject(node.OBJECT_TYPE, node.OBJECT_NAME, node.OBJECT_URI) | ||
objtype = AbapPackage | ||
break | ||
case "FUGR/F": | ||
objtype = AbapFunctionGroup | ||
break | ||
case "TABL/DT": | ||
case "DOMA/DT": | ||
case "DTEL/DE": | ||
objtype = AbapSimpleObject | ||
break | ||
} | ||
return new objtype(node.OBJECT_TYPE, node.OBJECT_NAME, node.OBJECT_URI) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { AbapObject } from "./AbapObject" | ||
import { Uri } from "vscode" | ||
|
||
export class AbapSimpleObject extends AbapObject { | ||
getUri(base: Uri): Uri { | ||
return base.with({ path: this.path }) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters