How to use the abap-adt-api.ADTClient.mainInclude function in abap-adt-api

To help you get started, we’ve selected a few abap-adt-api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sbcgua / sap-nw-abap-vagrant / abapdeploy.js / abapdeploy.js View on Github external
async function fetchTmpObj(objName) { // eslint-disable-line no-unused-vars
    const client      = create();
    const nodes       = await client.nodeContents('DEVC/K', '$TMP');
    const node        = nodes.nodes.find(i => i.OBJECT_NAME === objName);
    const structure   = await client.objectStructure(node.OBJECT_URI);
    const mainInclude = ADTClient.mainInclude(structure);
    const code        = await client.getObjectSource(mainInclude);
    // console.log(structure, mainInclude);
    console.log(code);
}
github marcellourbani / vscode_abap_remote_fs / client / src / adt / abap / AbapClass.ts View on Github external
public async getChildren(
    client: ADTClient
  ): Promise {
    if (this.isLeaf()) throw FileSystemError.FileNotADirectory(this.vsName)
    if (!this.structure) await this.loadMetadata(client)
    if (!this.structure) throw FileSystemError.FileNotFound(this.vsName)

    const ns: NodeStructureMapped = {
      categories: new Map(),
      objectTypes: new Map(),
      nodes: []
    }
    const main = this.selfLeafNode()
    main.OBJECT_URI = ADTClient.mainInclude(this.structure)
    const sources = ADTClient.classIncludes(this.structure)
    this.structure.includes.forEach(i => {
      const node = {
        EXPANDABLE: "",
        OBJECT_NAME: this.name + "." + i["class:includeType"],
        OBJECT_TYPE: i["adtcore:type"],
        OBJECT_URI: sources.get(i["class:includeType"] as classIncludes) || "",
        OBJECT_VIT_URI: "",
        TECH_NAME: i["class:includeType"] // bit of a hack, used to match include metadata
      }
      if (node.OBJECT_URI) {
        if (i["abapsource:sourceUri"] === "source/main") ns.nodes.unshift(node)
        else ns.nodes.push(node)
      }
    })
github marcellourbani / vscode_abap_remote_fs / client / src / adt / abap / AbapObject.ts View on Github external
public getContentsUri(): string {
    if (!this.structure) throw FileSystemError.FileNotFound(this.path)
    const include = ADTClient.mainInclude(this.structure)
    return include
  }