Skip to content

Commit 873891a

Browse files
uenal-akkayaalbertminkwurzkaMarkus1812schneidermic0
authored
[SAIA] Add new object type SAIA (#614)
Co-authored-by: Albert Mink <[email protected]> Co-authored-by: Katharina Wurz <[email protected]> Co-authored-by: Markus <[email protected]> Co-authored-by: Michael Schneider <[email protected]>
1 parent 06134bd commit 873891a

File tree

5 files changed

+311
-0
lines changed

5 files changed

+311
-0
lines changed

file-formats/saia/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SAIA File Format
2+
3+
File | Cardinality | Definition | Schema | Example
4+
:--- | :--- | :--- | :--- | :---
5+
`<name>.saia.json` | 1 | [`zif_aff_saia_v1.intf.abap`](./type/zif_aff_saia_v1.intf.abap) | [`saia-v1.json`](./saia-v1.json) | [`z_aff_example_saia.saia.json`](./examples/z_aff_example_saia.saia.json)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"formatVersion": "1",
3+
"header": {
4+
"description": "IDE Action (SAIA) Example Object",
5+
"originalLanguage": "en"
6+
},
7+
"generalInformation": {
8+
"title": "SAIA AFF Demo Action",
9+
"summary": "This is a demo action for AFF.",
10+
"implementingClass": "ZCL_DEMO_IMPL_CLASS",
11+
"inputUiConfigurationClass": "ZCL_DEMO_INPUT_UI_CONFIG_CLASS"
12+
},
13+
"filters": {
14+
"numberOfFocusedResources": "exactlyOne",
15+
"supportedDevObjectTypes": [
16+
{
17+
"workbenchObjectType": "BDEF",
18+
"workbenchObjectSubtype": "BAC"
19+
},
20+
{
21+
"workbenchObjectType": "CLAS"
22+
},
23+
{
24+
"workbenchObjectType": "INTF",
25+
"workbenchObjectSubtype": "IO"
26+
}
27+
]
28+
}
29+
}

file-formats/saia/saia-v1.json

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
{
2+
"$comment": "This file is autogenerated, do not edit manually, see https://github.com/SAP/abap-file-formats for more information.",
3+
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
"$id": "https://github.com/SAP/abap-file-formats/blob/main/file-formats/saia/saia-v1.json",
5+
"title": "IDE Action",
6+
"description": "IDE action (SAIA) v1",
7+
"type": "object",
8+
"properties": {
9+
"formatVersion": {
10+
"title": "Format Version",
11+
"description": "Format version",
12+
"type": "string",
13+
"const": "1"
14+
},
15+
"header": {
16+
"title": "Header",
17+
"description": "Header",
18+
"type": "object",
19+
"properties": {
20+
"description": {
21+
"title": "Description",
22+
"description": "Description of the ABAP object",
23+
"type": "string",
24+
"maxLength": 100
25+
},
26+
"originalLanguage": {
27+
"title": "Original Language",
28+
"description": "Original language of the ABAP object",
29+
"type": "string",
30+
"minLength": 2
31+
},
32+
"abapLanguageVersion": {
33+
"title": "ABAP Language Version",
34+
"description": "ABAP language version",
35+
"type": "string",
36+
"enum": [
37+
"standard",
38+
"keyUser",
39+
"cloudDevelopment"
40+
],
41+
"enumTitles": [
42+
"Standard",
43+
"ABAP for Key Users",
44+
"ABAP Cloud Development"
45+
],
46+
"enumDescriptions": [
47+
"Standard",
48+
"ABAP for key user extensibility",
49+
"ABAP cloud development"
50+
],
51+
"default": "standard"
52+
}
53+
},
54+
"additionalProperties": false,
55+
"required": [
56+
"description",
57+
"originalLanguage"
58+
]
59+
},
60+
"generalInformation": {
61+
"title": "General Information",
62+
"description": "General information",
63+
"type": "object",
64+
"properties": {
65+
"title": {
66+
"title": "Title",
67+
"description": "Title",
68+
"type": "string",
69+
"maxLength": 30
70+
},
71+
"summary": {
72+
"title": "Summary",
73+
"description": "What is the action doing and how can it be used",
74+
"type": "string"
75+
},
76+
"implementingClass": {
77+
"title": "Implementing Class",
78+
"description": "Implementing class for handling the action input. Needs to implement interface {@link if_aia_action }.",
79+
"type": "string",
80+
"maxLength": 30
81+
},
82+
"inputUiConfigurationClass": {
83+
"title": "Input UI Configuration Class",
84+
"description": "Input UI configuration class for implementing the server-driven UI input configuration. Needs to implement interface {@link IF_AIA_SD_ACTION_INPUT }.",
85+
"type": "string",
86+
"maxLength": 30
87+
}
88+
},
89+
"additionalProperties": false,
90+
"required": [
91+
"title",
92+
"summary"
93+
]
94+
},
95+
"filters": {
96+
"title": "Filter: Cardinality",
97+
"description": "Filtering of application of action according to cardinality and object types",
98+
"type": "object",
99+
"properties": {
100+
"numberOfFocusedResources": {
101+
"title": "Number of Focused Resources",
102+
"description": "Number of focused resources",
103+
"type": "string",
104+
"enum": [
105+
"exactlyOne",
106+
"atLeastOne",
107+
"moreThanOne",
108+
"any"
109+
],
110+
"enumTitles": [
111+
"One",
112+
"At least One",
113+
"At least Two",
114+
"Any"
115+
],
116+
"enumDescriptions": [
117+
"One",
118+
"At least one",
119+
"At least two",
120+
"Any"
121+
],
122+
"default": "any"
123+
},
124+
"supportedDevObjectTypes": {
125+
"title": "Filter: Object Types",
126+
"description": "Filtering of action according to specified object types",
127+
"type": "array",
128+
"uniqueItems": true,
129+
"items": {
130+
"title": "Object Type",
131+
"description": "Object type",
132+
"type": "object",
133+
"properties": {
134+
"workbenchObjectType": {
135+
"title": "Object Type",
136+
"description": "Object type",
137+
"type": "string",
138+
"maxLength": 4
139+
},
140+
"workbenchObjectSubtype": {
141+
"title": "Object Subtype",
142+
"description": "Object subtype",
143+
"type": "string",
144+
"maxLength": 3
145+
}
146+
},
147+
"additionalProperties": false
148+
}
149+
}
150+
},
151+
"additionalProperties": false
152+
}
153+
},
154+
"additionalProperties": false,
155+
"required": [
156+
"formatVersion",
157+
"header",
158+
"generalInformation"
159+
]
160+
}
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
INTERFACE zif_aff_saia_v1
2+
PUBLIC.
3+
4+
"! <p class="shorttext">Object Type</p>
5+
"! Object type
6+
TYPES ty_wb_object_type TYPE c LENGTH 4.
7+
"! <p class="shorttext">Object Subtype</p>
8+
"! Object sub-type
9+
TYPES ty_wb_object_sub_type TYPE c LENGTH 3.
10+
11+
TYPES:
12+
"! <p class="shorttext">Object Type</p>
13+
"! Object type
14+
BEGIN OF ty_workbench_object_type,
15+
"! <p class="shorttext">Object Type</p>
16+
"! Object type
17+
workbench_object_type TYPE ty_wb_object_type,
18+
"! <p class="shorttext">Object Subtype</p>
19+
"! Object subtype
20+
workbench_object_subtype TYPE ty_wb_object_sub_type,
21+
END OF ty_workbench_object_type.
22+
23+
"! <p class="shorttext">Filter: Object Types</p>
24+
"! Filter for object types
25+
TYPES ty_workbench_object_types TYPE SORTED TABLE OF ty_workbench_object_type WITH UNIQUE DEFAULT KEY.
26+
27+
"! $values { @link zif_aff_saia_v1.data:co_number_of_focused_resources }
28+
"! $default { @link zif_aff_saia_v1.data:co_number_of_focused_resources.any }
29+
TYPES ty_number_of_focused_resources TYPE string.
30+
31+
CONSTANTS:
32+
"! <p class="shorttext">Number of Focused Resources</p>
33+
"! Number of focused resources
34+
BEGIN OF co_number_of_focused_resources,
35+
"! <p class="shorttext">One</p>
36+
"! One
37+
exactly_one TYPE ty_number_of_focused_resources VALUE 'EXACTLY_ONE',
38+
"! <p class="shorttext">At least One</p>
39+
"! At least one
40+
at_least_one TYPE ty_number_of_focused_resources VALUE 'AT_LEAST_ONE',
41+
"! <p class="shorttext">At least Two</p>
42+
"! At least two
43+
more_than_one TYPE ty_number_of_focused_resources VALUE 'MORE_THAN_ONE',
44+
"! <p class="shorttext">Any</p>
45+
"! Any
46+
any TYPE ty_number_of_focused_resources VALUE 'ANY',
47+
END OF co_number_of_focused_resources.
48+
49+
TYPES:
50+
"! <p class="shorttext">Filter: Cardinality</p>
51+
"! Filtering of action according to specified applicable criteria.
52+
"! If filter is satisfied then the action is available and will be shown.
53+
"! $required
54+
BEGIN OF ty_filters,
55+
"! <p class="shorttext">Number of Focused Resources</p>
56+
"! Number of focused resources
57+
number_of_focused_resources TYPE ty_number_of_focused_resources,
58+
"! <p class="shorttext">Filter: Object Types</p>
59+
"! Filtering of action according to specified object types
60+
supported_dev_object_types TYPE ty_workbench_object_types,
61+
END OF ty_filters.
62+
63+
"! <p class="shorttext">Title</p>
64+
"! title
65+
TYPES ty_action_title TYPE c LENGTH 30.
66+
67+
TYPES:
68+
"! <p class="shorttext">IDE Action</p>
69+
"! IDE action
70+
"! $required
71+
BEGIN OF ty_adt_saia_object,
72+
"! <p class="shorttext">Title</p>
73+
"! Title
74+
"! $required
75+
title TYPE ty_action_title,
76+
"! <p class="shorttext">Summary</p>
77+
"! What is the action doing and how can it be used
78+
"! $required
79+
summary TYPE string,
80+
"! <p class="shorttext">Implementing Class</p>
81+
"! Implementing class for handling the action input. Needs to implement interface {@link if_aia_action }.
82+
implementing_class TYPE zif_aff_types_v1=>ty_object_name_30,
83+
"! <p class="shorttext">Input UI Configuration Class</p>
84+
"! Input UI configuration class for implementing the server-driven UI input configuration.
85+
"! Needs to implement interface {@link IF_AIA_SD_ACTION_INPUT }.
86+
input_ui_configuration_class TYPE zif_aff_types_v1=>ty_object_name_30,
87+
END OF ty_adt_saia_object.
88+
89+
TYPES:
90+
"! <p class="shorttext">IDE Action</p>
91+
"! IDE action (SAIA) v1
92+
BEGIN OF ty_main,
93+
"! <p class="shorttext">Format Version</p>
94+
"! Format version
95+
"! $required
96+
format_version TYPE zif_aff_types_v1=>ty_format_version,
97+
"! <p class="shorttext">Header</p>
98+
"! Header
99+
"! $required
100+
header TYPE zif_aff_types_v1=>ty_header_100,
101+
"! <p class="shorttext">General Information</p>
102+
"! General information
103+
"! $required
104+
general_information TYPE ty_adt_saia_object,
105+
"! <p class="shorttext">Filter: Cardinality</p>
106+
"! Filtering of application of action according to cardinality and object types
107+
filters TYPE ty_filters,
108+
END OF ty_main.
109+
110+
ENDINTERFACE.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"formatVersion": "1",
3+
"header": {
4+
"description": "types for abap file format of ide actions",
5+
"originalLanguage": "en"
6+
}
7+
}

0 commit comments

Comments
 (0)