How to use the abap-adt-api.ADTClient.classIncludes 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 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)
      }
    })

    const aggregated = aggregateNodes(ns, this.type)
github marcellourbani / vscode_abap_remote_fs / client / src / adt / abap / AbapClassInclude.ts View on Github external
public getContentsUri(): string {
    if (!this.structure || !this.techName)
      throw FileSystemError.FileNotFound(this.path)
    const include = ADTClient.classIncludes(this.structure).get(this
      .techName as classIncludes)
    if (!include) throw FileSystemError.FileNotFound(this.path)
    return include
  }