SAP CDS Language Support
This Visual Studio Code extension features language support for the core data services (CDS) language as used in the SAP Cloud Application Programming Model (CAP).
Features
CDS Language Support (e.g. in text editor)
syntax highlighting
source code validation
quick fixes to
- create using statement for unknown artifacts
- maintain missing translation
- convert @cds.doc and @description annotations to doc comments
where-used navigation to
- definition
- references
- highlight occurrences
inventory (symbols) for
- current file
- workspace incl. query capabilities to select e.g. artifact types, names, also include reuse models
code completion for
- keywords
- identifiers
- using paths and artifacts incl. showing README.md documentation as details
- i18n translation IDs
- turn on/off formatting regions
snippets for typical CDS language constructs
(with documentation extracts of capire explaining language concepts)
like
- namespace and context
- using
- service
- type
- entity and projections, ...
- element, associations and compositions
- extend and annotate
- annotations for documentation
hover information based on
- doc comments
- @title, @description and ~~@cds.doc~~ (deprecated) annotations
- translations
code formatting
- whole document
- selected range
- on-the-fly when completing statements via
; or }
- on save (depending on the IDE)
- on paste (depending on the IDE)
- with many options, configurable via
- settings file
- command-line switches
- Config UI with simulation of options for Visual Studio Code and Eclipse
- JSON schema for textual support
- also for markdown in doc comments
translation support
- properties, JSON and CSV files
- navigate to translation definitions from translation IDs like
'{i18n>customerName}'
- show translations on hover
- quickfix to maintain missing translations
plugin framework for external handlers of annotation domains
CAP Project Explorer
- tree view with service and domain layers
- powerful search and filter
- simple query e.g.
Boo to filter all artefacts which contain boo in their name (case-insensitive)
- filter by artefact kind e.g.
view: to filter all views
- combine kind with artefact name e.g.
serv:Admin to filter all services which have admin in their name
- include children for filtered artefacts by adding
/* e.g. serv:Admin/* or serv:/* to filter all services and show their successors
- multiple queries (combined with OR) e.g.
Boo Auth to find all artefacts with boo OR auth in their name
- hover
- goto definition by simply clicking tree node name
- context menu
- find references
- goto implementation (e.g. for service handlers)
Preview
- preview a CDS file in different output formats, like yaml, diagram, edmx, json, odata, sql...
Visualize dependencies
- for a given CDS file or folder, visualize the transitive dependency graph
- detailed between single CDS files
- simplified: only show the folders of the detailed graph
- architectural: collected dependencies between folders (i.e. all files within)
- for a selected CDS file or a sample, change formatting options interactively and see the effect
CAP for SAP Business Technology Platform helps you implement data models, services, and UIs to develop your own stand-alone applications or extend other cloud solutions, like SAP S/4HANA or SAP SuccessFactors. The programming model includes languages, libraries, and APIs and focuses on back-end development.
See the documentation for more details.
How to Obtain Support
In case you find a bug, please report an incident on SAP Support Portal.
Telemetry and Data Collection
This extension collects usage data to help improve SAP products and enhance the user experience. The collected data is sent to SAP in accordance with our Privacy Statement.
If you prefer not to share usage data, you can disable telemetry by setting sapbas.telemetryEnabled to false in your VS Code settings.
License
This plug-in is provided under the terms of the SAP Developer License Agreement.
Legal Notices
For information on copyright, trademark notices, and other legal information related to SAP CAP, please refer to the Legal Notices page. This page provides important details about intellectual property rights, third-party licenses, and terms of use that govern the use of SAP CAP and its associated tools. Reviewing these notices helps ensure compliance with the applicable legal requirements when using this extension.