Skip to content

Commit

Permalink
Fix abaplint issues and incorporate code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
uenal-akkaya authored May 22, 2024
1 parent 6d33e09 commit b188ca4
Show file tree
Hide file tree
Showing 4 changed files with 329 additions and 0 deletions.
5 changes: 5 additions & 0 deletions file-formats/saia/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SAIA File Format

File | Cardinality | Definition | Schema | Example
:--- | :--- | :--- | :--- | :---
`<name>.saia.json` | 1 | [`zif_aff_saia_v1.intf.abap`](./type/zif_aff_saia_v1.intf.abap) | [`saia-v1.json`](./saia-v1.json)
179 changes: 179 additions & 0 deletions file-formats/saia/saia-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
{
"$comment": "This file is autogenerated, do not edit manually, see https://github.com/SAP/abap-file-formats for more information.",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/SAP/abap-file-formats/blob/main/file-formats/saia/saia-v1.json",
"title": "ADT IDE Action",
"description": "ADT IDE Action (SAIA) v1",
"type": "object",
"properties": {
"formatVersion": {
"title": "Format Version",
"description": "Format version",
"type": "string",
"const": "1"
},
"header": {
"title": "Header",
"description": "Header",
"type": "object",
"properties": {
"description": {
"title": "Description",
"description": "Description of the ABAP object",
"type": "string",
"maxLength": 100
},
"originalLanguage": {
"title": "Original Language",
"description": "Original language of the ABAP object",
"type": "string",
"minLength": 2
},
"abapLanguageVersion": {
"title": "ABAP Language Version",
"description": "ABAP language version",
"type": "string",
"enum": [
"standard",
"keyUser",
"cloudDevelopment"
],
"enumTitles": [
"Standard",
"ABAP for Key Users",
"ABAP Cloud Development"
],
"enumDescriptions": [
"Standard",
"ABAP for key user extensibility",
"ABAP cloud development"
],
"default": "standard"
}
},
"additionalProperties": false,
"required": [
"description",
"originalLanguage"
]
},
"adtIdeAction": {
"title": "ADT IDE Action",
"description": "ADT IDE Action",
"type": "object",
"properties": {
"actionId": {
"title": "Unique Id of the Action",
"description": "Unique action id - it should be human readable and reveal the intention of the action Action id is case insensitive TODO: length restriction, check how long it should be, su22 variant restrictions???",
"type": "string"
},
"title": {
"title": "Action Title",
"description": "Action title for the action",
"type": "string"
},
"description": {
"title": "Action Description",
"description": "What is the action doing and how can it be used",
"type": "string"
},
"filters": {
"title": "Action Filter(In development)",
"description": "Filter for application of action according to specific object type or object type groups TODO: new filter mechanis currently under development -> all filters stored in a string on database",
"type": "object",
"properties": {
"numberOfFocusedResources": {
"title": "Number of Focused Resources",
"description": "Number of Focused Resources",
"type": "string"
},
"supportedDevObjectTypes": {
"title": "Supported Development Object Types",
"description": "Supported development object types",
"type": "array",
"uniqueItems": true,
"items": {
"title": "Global Workbench Object Type",
"description": "Global Workbench Object Type",
"type": "object",
"properties": {
"objtypeTr": {
"title": "Object Type in Object Directory",
"description": "Object Type in Object Directory",
"type": "string",
"maxLength": 4
},
"subtypeWb": {
"title": "WB Request: (Internal) Type of an ABAP Workbench Object",
"description": "WB Request: (Internal) Type of an ABAP Workbench Object",
"type": "string",
"maxLength": 3
}
},
"additionalProperties": false
}
},
"supportedResourceTypes": {
"title": "Supported Resource Types",
"description": "Supported resource types",
"type": "array",
"uniqueItems": true,
"items": {
"title": "Resource Type",
"description": "Resource type",
"type": "object",
"properties": {
"categoryScheme": {
"title": "Category Scheme",
"description": "Category scheme",
"type": "string"
},
"categoryTerm": {
"title": "Category Term",
"description": "Category term",
"type": "string"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"implementationClass": {
"title": "Action Handler Class",
"description": "Implementation class for handling the action input. Needs to implement interface {@link if_aia_action }.",
"type": "string",
"maxLength": 30
},
"inputUiConfigurationClass": {
"title": "Action Input UI Class",
"description": "The ABAP class implementing the server-driven UI input configuration. Needs to implement interface {@link IF_AIA_SD_ACTION_INPUT }.",
"type": "string",
"maxLength": 30
},
"dontShowInRunActionDialog": {
"title": "Run Action Dialog Visibility",
"description": "Flag to indicate that the action shouldn't be shown in the action selection dialog where all available actions are listed. TODO: put in a structure: options -> all options stored in a string in database",
"type": "boolean"
}
},
"additionalProperties": false,
"required": [
"actionId",
"title",
"description",
"filters",
"implementationClass",
"inputUiConfigurationClass",
"dontShowInRunActionDialog"
]
}
},
"additionalProperties": false,
"required": [
"formatVersion",
"header",
"adtIdeAction"
]
}
138 changes: 138 additions & 0 deletions file-formats/saia/type/zif_aff_saia_v1.intf.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
INTERFACE zif_aff_saia_v1
PUBLIC.

TYPES:
"! <p class="shorttext">Resource Type</p>
"! Resource type
BEGIN OF ty_resource_type,
"! <p class="shorttext">Category Scheme</p>
"! Category scheme
category_scheme TYPE string,
"! <p class="shorttext">Category Term</p>
"! Category term
category_term TYPE string,
END OF ty_resource_type.

"! <p class="shorttext">Object Type in Object Directory</p>
"! Object Type in Object Directory
TYPES ty_trobjtype TYPE c LENGTH 4.
"! <p class="shorttext">WB Request: (Internal) Type of an ABAP Workbench Object</p>
"! WB Request: (Internal) Type of an ABAP Workbench Object
TYPES ty_seu_objtyp TYPE c LENGTH 3.

TYPES:
"! <p class="shorttext">Global Workbench Object Type</p>
"! Global Workbench Object Type
BEGIN OF ty_wbobjtype,
"! <p class="shorttext">Object Type in Object Directory</p>
"! Object Type in Object Directory
objtype_tr TYPE ty_trobjtype,
"! <p class="shorttext">WB Request: (Internal) Type of an ABAP Workbench Object</p>
"! WB Request: (Internal) Type of an ABAP Workbench Object
subtype_wb TYPE ty_seu_objtyp,
END OF ty_wbobjtype.

"! <p class="shorttext">Development Object Types</p>
"! Development object types
TYPES tt_development_object_types TYPE SORTED TABLE OF ty_wbobjtype WITH UNIQUE DEFAULT KEY.

Check failure on line 37 in file-formats/saia/type/zif_aff_saia_v1.intf.abap

View check run for this annotation

abaplint / abaplint

Bad TYPES naming, expected "^TY_.+$", got "tt_development_object_types"

https://rules.abaplint.org/types_naming

"! <p class="shorttext">Resource Types</p>
"! Resource types
TYPES tt_resource_types TYPE SORTED TABLE OF ty_resource_type WITH UNIQUE DEFAULT KEY.

Check failure on line 41 in file-formats/saia/type/zif_aff_saia_v1.intf.abap

View check run for this annotation

abaplint / abaplint

Bad TYPES naming, expected "^TY_.+$", got "tt_resource_types"

https://rules.abaplint.org/types_naming

"! <p class="shorttext">Number of Focused Resources</p>
"! Number of focused resources
TYPES ty_number_of_focused_resources TYPE string.

CONSTANTS:
"! <p class="shorttext">Number of Focuses Resources</p>
"! Number of focused resources
BEGIN OF co_number_of_focused_resources,
"! <p class="shorttext">Exactly One</p>
"! Exactly one
exactly_one TYPE ty_number_of_focused_resources VALUE 'EXACTLY_ONE',
"! <p class="shorttext">At Least One</p>
"! At least one
at_least_one TYPE ty_number_of_focused_resources VALUE 'AT_LEAST_ONE',
"! <p class="shorttext">More Than One</p>
"! More than one
more_than_one TYPE ty_number_of_focused_resources VALUE 'MORE_THAN_ONE',
END OF co_number_of_focused_resources.

TYPES:
"! <p class="shorttext">Action Filter</p>
"! Filtering of action according to specified applicable criteria.
"! If filter is satisfied then the action is available and will be shown.
"! $required
BEGIN OF ty_filters,
"! <p class="shorttext">Number of Focused Resources</p>
"! Number of Focused Resources
number_of_focused_resources TYPE ty_number_of_focused_resources,
"! <p class="shorttext">Supported Development Object Types</p>
"! Supported development object types
supported_dev_object_types TYPE tt_development_object_types,
"! <p class="shorttext">Supported Resource Types</p>
"! Supported resource types
supported_resource_types TYPE tt_resource_types,
END OF ty_filters.

TYPES:
"! <p class="shorttext">ADT IDE Action</p>
"! ADT IDE Action
"! $required
BEGIN OF ty_adt_saia_object,

Check failure on line 83 in file-formats/saia/type/zif_aff_saia_v1.intf.abap

View check run for this annotation

abaplint / abaplint

Type "TY_ADT_SAIA_OBJECT" contains unknown: SEOCLSNAME not found, lookup

https://rules.abaplint.org/unknown_types
"! <p class="shorttext">Unique Id of the Action</p>
"! Unique action id - it should be human readable and reveal the intention of the action
"! Action id is case insensitive
"! TODO: length restriction, check how long it should be, su22 variant restrictions???
"! $required
action_id TYPE string,
"! <p class="shorttext">Action Title</p>
"! Action title for the action
"! $required
title TYPE string,
"! <p class="shorttext">Action Description</p>
"! What is the action doing and how can it be used
"! $required
description TYPE string,
"! <p class="shorttext">Action Filter(In development)</p>
"! Filter for application of action according to specific object type or object type groups
"! TODO: new filter mechanis currently under development -> all filters stored in a string on database
"! $required
filters TYPE ty_filters,
"! <p class="shorttext">Action Handler Class</p>
"! Implementation class for handling the action input. Needs to implement interface {@link if_aia_action }.
"! $required
implementation_class TYPE seoclsname,
"! <p class="shorttext">Action Input UI Class</p>
"! The ABAP class implementing the server-driven UI input configuration.
"! Needs to implement interface {@link IF_AIA_SD_ACTION_INPUT }.
"! $required
input_ui_configuration_class TYPE seoclsname,
"! <p class="shorttext">Run Action Dialog Visibility</p>
"! Flag to indicate that the action shouldn't be shown in the action selection dialog
"! where all available actions are listed.
"! TODO: put in a structure: options -> all options stored in a string in database
"! $required
dont_show_in_run_action_dialog TYPE abap_bool,
END OF ty_adt_saia_object.

TYPES:
"! <p class="shorttext">ADT IDE Action</p>
"! ADT IDE Action (SAIA) v1
BEGIN OF ty_main,

Check failure on line 123 in file-formats/saia/type/zif_aff_saia_v1.intf.abap

View check run for this annotation

abaplint / abaplint

Type "TY_MAIN" contains unknown: SEOCLSNAME not found, lookup

https://rules.abaplint.org/unknown_types
"! <p class="shorttext">Format Version</p>
"! Format version
"! $required
format_version TYPE zif_aff_types_v1=>ty_format_version,
"! <p class="shorttext">Header</p>
"! Header
"! $required
header TYPE zif_aff_types_v1=>ty_header_100,
"! <p class="shorttext">ADT IDE Action</p>
"! ADT IDE Action
"! $required
adt_ide_action TYPE ty_adt_saia_object,
END OF ty_main.

ENDINTERFACE.
7 changes: 7 additions & 0 deletions file-formats/saia/type/zif_aff_saia_v1.intf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"formatVersion": "1",
"header": {
"description": "types for abap file format of ide actions",
"originalLanguage": "en"
}
}

0 comments on commit b188ca4

Please sign in to comment.