* Refactor: Jump to Object Logic
The goal is to greatly simplify the code to jump to an object, and to separate UI and object layers some more.
This PR introduces GUI Jumper (`zcl/if_abapgit_gui_jumper`), which covers all generic options to show an object. It tries the following options in order:
- ADT (if enabled)
- Workbench with line number
- Workbench without line number
- Transport System (new)
Only if all fail, abapGit will call the object-specific handler.
Next steps:
- Remove `jump_adt` and `jump_se11` from `zcl_abapgit_objects_super` and replace by GUI Jumper
- Remove almost all object-specific jump handler since they are covered by GUI Jumper now
* Add class
* Lint
* Misleading name
* UI: Sticky Top
With this change, the top bar will become sticky. Meaning, it remains on the top of the page when scrolling down.
It's CSS + JS since IE does not support the "sticky" CSS feature.
There's a bit of a "wiggle" when scrolling begins and alignment is not the best on the diff page (which has full width). Maybe some of you CSS wizards can figure these things out.
Closes#5035
* Upload with LF + UTF8
* Remove todo
- already includes changes of 5083
Co-authored-by: Christian Günter <christianguenter@googlemail.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* wip, unit testing
* refactor popup
* update abaplint
* transpile additional classes
* all data classes
* all git
* update
* fix
* change type
* all gui
* all http
* ZCL_ABAPGIT_USER_RECORD
* all zlib
* all exceptions
* all xml
* all html
* all html zif
* all gui zif
* all xml zif
* all repo zif
* more generic
* star
* zif_abapgit_longtexts
* sort
* zcl_abapgit_news
* zcl_abapgit_adt_link
* ZCL_ABAPGIT_DIFF
* more
* add zcl_abapgit_services_git
* Commit Page: Repo Header and Summary
- Added repo header back
- Changed summary as suggested by @sbcgua
- Adjusted display of details accordingly
* Remove var
* Revert color on details
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* New hotkeys for remote settings page
* Enable hotkeys for non-input fields
* Prioritize link hint activation key over hotkey
* cleanup
* resolve 2
* resolve 3
Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com>
* better multilang class tpool handling
* dont save lang list on empty clas docu
Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Diff and Patch Pages Update
- Fix refresh of a single file on diff page (it was displaying all diffs afterwards)
- Add some hotkey assignments
- Replace "Refresh" after filename with icon
normal:
hover:
* Local refresh on patch page
* Update zcl_abapgit_gui_page_patch.clas.abap
* Patch page: Add js for refresh all hotkey
Co-authored-by: Christian Günter <christianguenter@googlemail.com>
* Commit Page Update
Here's the redesigned commit page moving to the HTML forms you know form other dialogs (goes together with #5047 for best look).
New features:
- check of mandatory entries
- validation of email address format
- link to docs (t.b..d.)
- summary of changes on top, list of changed filed on bottom
- placeholder for body
Closes#5029
* rm > remove
* Create guide-stage-commit.md
* Add files via upload
* Update guide-stage-commit.md
* Delete commit_done.png
* Add files via upload
* Update guide-moving-package.md
* Add files via upload
* Add files via upload
* Update zcl_abapgit_gui_page_patch.clas.xml
* Update zcl_abapgit_gui_page_stage.clas.xml
* Update zcl_abapgit_gui_page_merge.clas.xml
* Update zcl_abapgit_gui_page_commit.clas.xml
* Update zcl_abapgit_gui_page_code_insp.clas.xml
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Enhance diff class
- Refactor `zcl_abapgit_diff` to use `RS_CMP_COMPUTE_DELTA` instead of `SVRS_COMPUTE_DELTA_REPS` (needs less code in abapGit)
- Replace `abaptxt_255` with `rswsourcet` which removes 255 character per line limit. Now diffs on long lines are calculated properly.
- Add "ignore indent", "ignore comments", and "ignore case" options. These correspond to the options for the Split Screen Editor in SAP GUI and work the same way. The options are *not* exposed to the UI yet.
Same functionality, same performance.
* Lint
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Refactor serializer class
- Consolidate i18n parameters
- Move determination of translation languages into serializer class
- Pass translation language setting when parallel processing (was a bug)
* Lint
* Add unit tests
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* CSS adjustments
I made a few small CSS adjustments to make things a bit more consistent
- Repo overview: Adjust hightlight for current row
- Repo: Add background color to table header to match staging
- Repo: Fix hightlight for current row
- Staging: Slight color and table border adjustments
- Forms: Slight color adjustments for textarea placeholder
- DB Utility: Add hightlight for current row
* Update to dark theme
Co-authored-by: Lars Hvam <larshp@hotmail.com>
This measures the time it takes in the backend to prepare the HTML page. Result is shown when hovering over abapGit logo in the page footer.
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Diff-page: Enable refresh functions
* cleanup
* Diff: add refresh local hotkey
* Rename 'Refresh' to 'Refresh All'
Co-authored-by: Alexander Tsybulsky <sbcgua@users.noreply.github.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com>
Co-authored-by: Frederik Hudák <frederik.hudak@sap.com>
* sci result at stage and commit pages
* improvements
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Co-authored-by: Christian Günter <christianguenter@googlemail.com>
* SXCI: Inactive classic BAdIs
Implements a workaround since SAP does not show inactive classic BAdIs properly (missing entry in table `dwinactive`).
* Update zcl_abapgit_object_sxci.clas.abap
* Update src/objects/zcl_abapgit_object_sxci.clas.abap
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
* Change by
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Change Package Assignment
Previously, if an object was assigned to another package (but not changed otherwise), AG would delete and re-create the object. This was also visible in the "Selective Pull" popups:
The new process is smarter and detects such changes. It re-assigns the package (via a TADIR change) and avoids dropping and re-creating. The package overwrite popup is also avoided (it will still appear if the object itself was changed, too):
* Better icon
* Add unit test
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Co-authored-by: Alexander Tsybulsky <sbcgua@users.noreply.github.com>
* XSLT: Add late activation
In case a transformation depends on other objects like a class, the transformation will not activate if it's deserialized before the dependent objects.
This change adds the transformation to the late activation step.
* lint
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Fix dump during "New Online"
I accidentally used a copied link `sapevent:url?url=https://github.com/abapGit-tests/TABL` into the "New Online" diaplog. AG would dump in this case.
Now you get a proper error message.
* Strip leading/trailing spaces for URLs
* Add
* Update
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Co-authored-by: g-back <27279305+g-back@users.noreply.github.com>
- Removed "class analysis logic" from hotkey collection
- Hotkeys are now registered directly in the hotkey controller (similar to asset manager)
- `zif_abapgit_hotkeys->get_hotkey_actions` was changed to instance method and can therefore be redefined in subclasses
- Renamed the controller class to match the interface name
Co-authored-by: Christian Günter <christianguenter@googlemail.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
In dynpro screen, when a field is referring to a data element and text is taken from dictionary, no need to serialize the text as it is always taken from dictionary. If the text is included then it will show unnecessary diffs when data element text changes.
Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* ENHO: Split code into separate files
Similarly to class enhancements where enhanced methods are stored as individual files, this change separates the code for implicit enhancements (type `HOOK_IMPL`) into abap-files.
This makes the code more readable (instead of being embedded and escaped into XML) and allows for linting.
* Switch to filenames with hash
* CI
* Filenames in XML
* Lint
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* CLEAR dd05m-leng
In S/4HANA system some of the data element lengths changed. Example: MATNR length changed from 18 characters to 40 characters. It would show as diff when this repo is pulled into S/4HANA. dd05m-leng is for information only hence, cleared it to avoid diffs.
* Replace tab with space
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
* Replace tab with 6 spaces
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Post-processing option for custom class serializer
When using the current exit for serializing classes, you have to code the complete serialization yourself (i.e. reading and formatting the code).
https://docs.abapgit.org/ref-exits.html#custom_serialize_abap_clif
With this change, you get the option to let abapGit serialize the class first and then post-process the source in the exit. The change is compatible with existing implementations of the exit.
To use the post-processing option, add the following code to the beginning of the exit:
```abap
IF it_source IS INITIAL.
RETURN.
ENDIF.
```
* Update ref-exits.md
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Naming of class constants
This is in preparation of enforcing a naming convention for constants in classes/interfaces. At the end, the following lint rule shall be set:
```json
"class_attribute_names": {
"constants": "^C_.+$",
...
},
```
After this, the only remaining constants not following this rule are in `zcl_abapgit_version`.
* Update zif_abapgit_dot_abapgit.intf.abap
* Update zcl_abapgit_gui_chunk_lib.clas.abap
* Update zcl_abapgit_gui_router.clas.abap
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* SRFC: Improvements
- Check if `SRFC` is supported in `constructor`. This will ensure proper error handling (closes#4899). Note: Using the constructor is how it should be checked for other object types as well.
- Added `changed_by` logic
- Simplified catch code
* SRFC: Improvements
* SRFC: Improvements
* Update message
* Raise
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* DDLS: Fix dump in lower releases
- Add requirements check to constructor
- Prevent delete call in case object does not exist
Ref #4899
* Update message
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Improvements for Objects Class
This introduces a new `is_type_supported` method for `zcl_abapgit_objects` which is about 30x faster than the current `is_supported` method.
`is_type_supported` is used in the other methods like `changed_by` and `exists` to avoid instanciating or calling the object class unnecessarily. It won't be necessary to check for support before using these methods which will alllow simplifying the calling programs (separate PR).
There are also some new test cases for `is_type_supported` and for serializing a commom interface.
* No user id for unsupported objects
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Filter code inspection/syntax check
In case of generated maintenance screens, the code inspection/syntax check include findings in SAP code (`LSVIM*` includes). This change removes those findings.
* Update zcl_abapgit_code_inspector.clas.abap
* Add "Last changed by" to repo page
Proposition for #3267
* Add "Last changed by" to repo page
For #3267
- add "Changed by" also for local items
Co-authored-by: Lars Hvam <larshp@hotmail.com>
SAP GUI for Java 7.70 has trailing null values in postdata (if data >256 characters). This is a bug that SAP will have to fix.
As a workaround, abapGit will strip the trailing null values. The workaround shall be removed 2022-12-31 latest.
Closes#4832
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Add icon link for changing remote repo on the list
Proposition for #4737
* Add icon link for changing remote repo on the list
- corrections for PR #4907
- fixed syntax
* Update zcl_abapgit_gui_page_repo_over.clas.abap
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com>
Clarify error and resolution options in case subpackage already exists in system but is not included in pack hierarchy of repo root package.
Closes#4904
the old get_instance() method in ZCL_ABAPGIT_PERSIST_SETTINGS has been moved to a method in zcl_abapgit_persist_factory, plus interface added. Added to persist injector
add unit test which parses the response from hex, ie. containing a real null value
simplify get_null() method, it only returns 1 character, but 2 characters are calculated
* Auto creation of package during new online
If you create a new online repository and the repo does not contain any SAP package, then abapGit will prompt you for the package attributes and create the package for you. This is, for example, the case when you use an newly created online repo as a starting point.
If the repo does contain a package, then the package will be created automatically when you pull from the repo (as described in [docs](https://docs.abapgit.org/ref-packages.html)).
Closes#4538
* Update docs
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Co-authored-by: Christian Günter <christianguenter@googlemail.com>
* Dialogs: Set autofocus on first form element
Improves usability.
Closes#4816
* Autofocus for commit page
- Works in case JS is not an option
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Add more shortcuts for main page
* Update zabapgit_css_common.w3mi.data.css
* Update zcl_abapgit_gui_router.clas.abap
* Change keyboard shortcuts
* fix js
* fix js
* deindent
* indentation
* one more
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com>
* Fixed Version BRF+ Integration
* BRF+ serialization
* Fixed obsolete parameters and wrong boolean type
* Fixed some errors and filtered ComponentReleeases
ComponentReleeases in XML Export and Import of BRF+ API can be omitted and works also the same. Next try if I could delete the useless metadata (User, System, etc...) or must leave them empty and fill them manually before deserialization.
* Some little changes
Removed Parameter iv_marked_option for older releases and removed method wb_request_choice. Changed to transport automatically.
Aligned some parameters.
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com>
* Repo overview - cosmetic changes
* extract logic to method
* Update src/ui/zcl_abapgit_gui_page_repo_over.clas.abap
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
* fix if in if
* unshorten remote, move package, improve wrapping
* Add max width for columns
* Mostly working now
* add prefixes
* Remove checkbox, move package where it was
* Keyboard navigation
< > to navigate in list (arrow keys don't seem to trigger), enter to open selected
* Ellipsis for repo url, use css variable
* Fix css, js persistence
* Fix invalid function name
* add back !important to override hover color
* abaplint
* Don't use const in js
* more eslint
* Remove unused field symbol
* eslint
* Bring back repo lock icon, styling improvements
Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com>
* Focus HTML control on abapGit startup
`cl_gui_control=>set_focus` must be called during PBO. Maybe there's a nicer way to pass the HTML control to the PBO.
* Move to output form
* Set focus
* Add autofocus
* Offline repo: "Import via RFC" feature
Adds option to **offline** repositories for importing a repo via an RFC connection from another SAP system. It's a shortcut for doing "Export ZIP" in one system, and "Import ZIP" in the other.
Closes#4784
Pre-requisite: abapGit develop version (with this change) is installed on remote SAP system.
Note: The general recommendation is to use **online** repositories and a git server for comparing and synchronizing systems.
* Lint
* Create guide-import-rfc.md
* Langu
* Langu
* Write-protect only
* Compare
* Compare
* Compare
* Compare
* Git
* Update docs/guide-import-rfc.md
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Fix use of sy-langu in object serializers
- Replace sy-langu variable with mv_language
- Replace sy-langu type with langu (makes it easier to spot sy-langu)
- Enhance generic serializer to use mv_language
- Add unit tests to generic serializer
- Adjust and simplify serializers that are based on generic class
Closes#2080
* Update scvi+ueno
* Revert scvi
* Langu
* Langu
* Langu
* Langu
* Langu
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Terminology: Inclusive Language - Part 6
Change remaining variables and switch setting to main_language.
Finally closes#4043
* Add todo
Co-authored-by: Lars Hvam <larshp@hotmail.com>
For local packages, the application component is now stored in AG persistence. This will avoid the diff, if transportable packages are pulled into local packages.
Closes#1880
Checkout commit: Improve error message.
Checking out commits is currently limited to branches with less than 99 commits. If this limit is reached a message appears saying 'No commits are available in this branch.'.
After this commit is applied the error message is 'Cannot find initial commit. Too many commits. Action not possible.'.
* Release serialization resources (fixes#4774)
Release serialization resources to prevent dump #4774 for export of large packages
* Free files after parallelization
* transfer files one by one
* Update src/objects/core/zcl_abapgit_serialize.clas.abap
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
* fix lint, missing fs declaration
* index access on delete lt_found
* Update src/objects/core/zcl_abapgit_serialize.clas.abap
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
* cleanup: index variable not required
* rollback to original APPEND LINES
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Fix menu hover background
In default theme, the background color when hovering over menu items was bearly visible in HTML GUI and not visible at all in Win GUI.
The fix explicitly set the background color so both GUIs look the same.
* Keep subitem highlight
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Enhance "Force Pull" to become "Selective Pull"
With this PR you can now peform a selective pull. Yay!
- Changes "Force Pull" to show *all* changed objects in the usual "Overwrite Popup". This allows you to select individual objects to be pulled no matter if they were changed locally or remotely.
- Does *not* change the regular "Pull" logic
Closes#413, #4282
* Combine delete and overwrite popups
* Add icons to abaplint.json
* Change if to case
* Add icons to abaplint.json
* Enhance UTs
* show_icon
* Show icon
Co-authored-by: Lars Hvam <larshp@hotmail.com>
- Differentiate between Developer and Standalone versions
- Add link to contribution guidelines
- Add listing of user exits with implementation status (based on include for standalone, class for developer version)
- Add feature to save debug info output as HTML page which can be used for attaching to Github issues
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Remove adjust_namespace
Method is obsolete since namespace of object is already adjusted in `zcl_abapgit_filename_logic=>file_to_object`
* Remove adjust_namespace
* Remove bracket
Co-authored-by: Lars Hvam <larshp@hotmail.com>
As mentioned in #4673, the existence check for interfaces is not correct and actually checking for classes. The PR will correct the check.
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Replace GET_R3TR_OBJECT_FROM_LIMU_OBJ, fixes#4715
Replaced with TR_CHECK_TYPE. Only tested locally (with a copy of the method in a separate program), not in full ABAPGit context.
* forgot the additional DATA declarations
* Ignore deleted objects
as requested by Marc Bernard
* remove whitespace at end
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* INTF: Refactor to fix "permission error"
Implements interface deserializer the same way as the class deserializer.
Closes#4672
* Remove types
* Class exists
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* based on the lastest master
* pretty printer
* fix inline declaration fragments
* fixing method chaining
* Fix: Use boolc instead of IF, negate expression
* remove descriptions
* pretty printer
* empty line in method calls
* Fix: Statement does not exist in ABAPv702
* fix exceptions
* fix Indentation problem
* fix: Statement does not exist in ABAPv702(or a par
* mitigate usage of not existing objects in 702
* remove not existing objects for 702
* indentation issues
* next
* next
* Indentation issues
* next
* fix
* Fix: The EXPORTING keyword can be omitted
* change to constant mc_source_file
* Update zcl_abapgit_object_srvd.clas.abap
* changes regarding mbtools' feedback
* according to mbtools' feedback
* Update zcl_abapgit_object_srvd.clas.abap
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Co-authored-by: Christian Günter <christianguenter@googlemail.com>
Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com>
* Add support for partial logs (WIP)
* Still trying to handle multiple branch origins
* Error message for too many commits
* Remove PDXX
* Lint
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* New "Switch" tab in repo settings
This PR adds a new tab to the repo settings which combines all options for switching the repository to a different source:
- Switch between "Online" and "Offline"
- Switch to Branch, Tag, Commit, or Pull Request
Note 1: Value help for URL history has not been implemented yet.
Note 2: None of the existing related menu items have been removed yet.
* Clean-up
* Clean-up
* Clean-up
* Clean-up
* Clean-up
* Change to "Remote"
- rename class
- add "autosave" for on/offline switch
- change "Switch" to "Remote"
* Update on/offline switch
* Update on/offline switch
* Update zcl_abapgit_gui_page_sett_remo.clas.abap
* Grammar
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Accept remote without HEAD
* Update src/git/zcl_abapgit_git_branch_list.clas.testclasses.abap
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Combines `zcl_abapgit_file_status=>identify_object` and `zcl_abapgit_object_files=>filename` into new class `zcl_abapgit_filename_logic`. This class provides `file_to_object` and `object_to_file` conversion logic similar to what `zcl_abapgit_folder_logic` does for packages and git folders.
Also includes unit tests which were missing for the old methods.
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Terminology: Inclusive Language - Part 5
Change of terminology (#4043)
- Replace `get_master_language` with `get_main_language` and remove it
* File Status
* Jump
* Language
* Main language
* Main language
Enhancements might refer to other objects of the repo so create them after the other objects.
Example: Repo includes enhancement for an exception class. Therefore, the exception class has to be deserialized before the enhancement.
* Show "data" by object in repo view
Continuing on #3441
- "data" is now shown as `TABU` `<table>` in the repo view
* Remove get_item
* Add cmnt
* Update src/objects/core/zcl_abapgit_serialize.clas.abap
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
* Update zcl_abapgit_serialize.clas.abap
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
* Fix dump due to package name conflicts
Raises an error message instead of dumping
Closes#4620
* Split calculate_status
* Refactor only
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* SOTS: Uninstall with usage reference
Remove usage references of `SOTS` texts during uninstall
* Add comment
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Improve reuse of HTML viewer
Adding optional parameters to allow reuse of HTML viewer in subscreens and allow testing of query parameter table (potential replacement of `zcl_abapgit_html_action_util=>parse...`).
* Lint
Co-authored-by: Lars Hvam <larshp@hotmail.com>
In addition to the client setting (repository objects modifiable or not, scc4), abapGit will not allow changes to any local objects, if
- system is set to "not modifiable" (se03)
- system is running an upgrade
- system is a shadow system
Closes#4267
Co-authored-by: Lars Hvam <larshp@hotmail.com>
If the composite enhancement already exists, trying to update it fails with error "Error while creating enhancement implementation"
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* PROG: Refactor deserialize and fix inactive code
This is a follow-up to #4500, #4509, #4518
- Split `ZCL_ABAPGIT_OBJECTS_PROGRAM->DESERIALIZE_PROGRAM` into smaller methods
- `INSERT_PROGRAM` now uses standard `RPY_PROGRAM_INSERT` and only does `INSERT REPORT` in exceptional cases like function groups (see below)
- Special case of Code Inspector variants is handled by `ZCL_ABAPGIT_OBJECT_PROG->DESERIALIZE_WITH_EXT` since these aren't actual programs (but includes containing data)
Using the standard function fixes the issue of inactive code that can't be accessed after a pull. This used to happen, for example, when a program contained syntax errors due to missing objects.
* Update zcl_abapgit_objects_program.clas.abap
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Fix for Java GUI so new repo can be defined
The HTML demo programs are able to pass values from a form, so why does abapGit not work with Java GUI?
I've been trying to figure this out. The key to a break-through was not any fancy code analysis, it was "brute force".
I added a method in ZCL_ABAPGIT_HTML_FORM to replace the generated HTML by a copy of the resulting HTML. Then I removed things until POST-data was filled, and added things back until it broke again.
The main issue was of course the complete lack of POST-data for the event.
This is solved by adding an action attribute to the form element and removing the form-action attribute from the 'default' submit button.
The biggest surprise was that radion buttons don't work as they should. Values are returned as if both radio buttons (in the new online repository form) are checked - which of course is not possible. I tried enabling the query table in the HTML viewer just in case this was specific to the POST-data, but no such luck, it is probably a problem with the HTML viewer itself. You won't find any samples from SAP with radio buttons either.
The bug is possibly fixed by the patch in Note 2832978.
The solution is far from perfect, but at least it is now possible to add new repositories in Java GUI.
The most annoying problem that remains is that if a dialog is opened to select a package or branch the existing input data are lost. One step at a time though...
* Update src/ui/zcl_abapgit_html_form.clas.abap
Linter fix
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
* Single-parameter calls on one line
One extended line, mind you...
* One argument per line - when possible
Don't break the string expression up over more lines thna neessary.
* Keep line length under 120 characters
* Playing catch-up
Fixing the conflict after another pull-request was merged
* Catch up with main branch
I didn't understand from the conflict resolution view on github the total difference between main and my fork. Looked at the source file and it became clear.
So hopefully this is the last commit... (and hopefully that won't be "famous last words")
* Time to learn about rebase...
Removed duplicate statement to get number of rows
* Conflicting line reset
Reset to main
<<<<<<< kjetil-kilhavn/javagui-fix
ii_html->add( |<td><input type="text" name="{ lv_cell_id }" id="{ lv_cell_id }"|
%26%26 | value="{ lv_value }"{ lv_readonly }></td>| ).
=======
ii_html->add( |<td><input type="text" name="{ lv_cell_id }" id="{
lv_cell_id }" value="{ lv_value }"{ lv_readonly }></td>| ).
>>>>>>> main
Now, may I have all green lights please?
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Refactor "Background Mode" to HTML Form
ref #4171
- Moved "Background Mode" from "Advanced" menu to "Repo Settings"
- Changed Bckg Setting and Bckg Run to new HTML pages
* Add back_toolbar
Previously if there were no data rows, it would render just the column headers of the table.
After this change, it shows "Not available".
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Data deserialize
Continuing on #3441
- Fixes issue with namespaced tables
- Adds deserialize of table content during pull but does NOT persist changes to database
`zcl_abapgit_repo->deserialize` now contains the following call to deserialize "data":
```abap
zcl_abapgit_data_factory=>get_deserializer( )->deserialize(
ii_config = get_data_config( )
it_files = get_files_remote( )
iv_persist = abap_false ). "<<no persisting, just test for now
```
Closes#4650
* Fixes and max record check
* Get result preview
* Split deser/actualize
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Error "The concept will be created in the non-original system" (`SOTR_MESS 137`)
It's not an error (see function `SOTR_STRING_CREATE_CONCEPT`) and has been removed.
* refactor export package to zip to HTML form
* change literal to constant
* downport statement
* remove popup package_export
* reorder methods, unify whitespace
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Fixes DDIC activation
The changes mimic the behavior of CTS Activatin Job as of 7.40 SP 23
* fixes Activation of dependant DDIC (#4496)
The change attempts to mimic behaviour of SAP CTS DDIC Mass Activation Job
* Revert to DDMODE = 'O'
Reverts to activation mode "in original" system; adds "forced activation" (FRCACT = abap_true)
* restore variable definitions
* and Pretty Printer
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Add measures to repo stats
- Lines in ABAP Files
- Lines of Code in ABAP Files (no empty or comment lines)
* Split read_stats
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* move perf test option to new repo
Moving the performance test option to separate repository,
https://github.com/abapGit/performance-test
I guess this feature is not used very often, it will reduce the overall code size, and instead of refactoring these popups to HTML they can stay ALVs in the new repo
* fixes
The old code called the REPO service class to check if a repo exists, to better encapsulate the packages, the check will now stay inside the persistence package
* overview page, dont display ".git"
dont display ".git" in the urls in the overview page, to save a bit more horizontal space
also see #4539
* dont use regex
* add ORDER BY
* wdcc, add ORDER BY
* wapa add order by
* udmo, add order by
* tobj, add order by
* stvi, add order by
* CHAR, add order by
* CMOD, add order by
* dial, order by
* CLAS: Remove test class include
Once unit tests are disabled, the test class include is now completely removed (before it might have still contains obsolete code).
Closes#4460
* Reverse pp
* Update 6 objects
* Typo
* Typo
* Revert
* Revert
* Revert
* Revert
* Revert
* Lint
* Update zcl_abapgit_oo_class.clas.abap
* Move add_to_activation
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Add unsupported object count in repo statistics
* lint fix: Keep single parameter on one line
* Fix indentation
* Undo changes to TADIR and DEFINITIONS
Undo changes to ZCL_ABAPGIT_TADIR and ZIF_ABAPGIT_DEFINITIONS
* Refactor code
Co-authored-by: Lars Hvam <larshp@hotmail.com>
After the pull request:
https://github.com/abapGit/abapGit/pull/4589
Objects supported by abapGit-plugins are not deserialized and
all are reported as not supported.
Closes#4610
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* TYPE: Serialize active version
When a new type-pools is created, SAP creates active version by default. SY-SUBRC is always set to 0 for the first function module call as there is always an active version hence, second function will never be called. Remove the second call.
* Multiple changes
Check existence of the object using TADIR entry
If the active object doesn't exist, show proper message
* Existence check using PROGDIR
* Replace SELECT..ENDSELECT
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Group unsupported messages per object type
When number of unsupported objects increase in a package, user needs to scroll through the long list of messages. This change groups messages per object type reducing the number of messages. Also, the filtering before serialization is good in terms of effective work process utilization( in parallel mode ).
* Replace LINE_EXISTS with READ TABLE
* Cache the supported object types
* Show object name
If there is only one object name for the unsupported object type, show the name.
* Spelling: "object(s)" to "objects"
Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
In case DDIC objects exist as "new" version only , the system will now raise an error message to alert the user that "No active version was found".
Note: The log will disappear after some navigation and such objects will not be included in the repo view if they only exist locally (until they are activated).
* Fix#4515Fix#4515 by serializing new TAB_INCLUDES to contain include numbers of new methods of classes.
* Last fix before pull request
* files named "em_<methodname>" instead "emxxx"
* editorder without gaps
* Cleanup commented out line
* fixes abaplint
Co-authored-by: sandra rossi <sandra.rossi@gmail.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* DEVC: Unlock in case of errors
If a package object cannot be deleted or deserialized properly, it remains locked.
The change unlocks the object in these cases.
* Update set_lock
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* TABL: Remove field position from serialization
It's not necessary to serialize field position (`DD03P-POSTION`). Fields can simply be numberred sequentially during deserialize.
This avoid issues with include structures that have different number of fields in original and target systems.
Closes#4506
* Clear tabname, ddlanguage
* Lint
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
* Clear dd08v-ddlanguage
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Main page - Only show hover info for favorites
in package, user links
suppress titles for non-favorite repositories
* always suppress loading titles in repo overview
Co-authored-by: Lars Hvam <larshp@hotmail.com>
When executing the background logic if a repo processing fails, then log the error and continue processing with next repository.
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Deserialize: Commit changes before activation
Some objects (like `prog` or `intf`) are deserialized as inactive objects i.e. uncommitted changes. Usually, these changes are committed to the database after the activation process (end of the session). However, if there are any errors during activation, an exception is raised which will automatically do a `rollback work`.
This change will make sure that inactive objects are preserved even if the activation fails. One can then analyze the inactive objects, make necessary corrections, and activate them manually.
Closes#4500
* Replace with standard function
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Tweak HTTP error messages
- Minor changes to error texts
- Add HTTP 422 which can happen on gitlab if you ommit ".git" in the URL
* Lint
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Fix the following issues to make it CSS3 compliant:
- Font-style bold is not a font-style value
- Family names containing whitespace should be quoted
- Same color for background-color and border-color
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* DEVC: Fix check if package is empty
SOTR object is linked to SAP package and removed together with the package on uninstall. Therefore, it should not be taken into account when checking if a package is empty.
* Update comment
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
The progress bar should not be turned off after `deserialize_object` (but only at end of `deserialize`).
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* ACID: Avoid "no changes found" popup
- Fix "no changes found" popup in case identical object is deserialized again
- Change to T100 messages
- Add missing dequeue
* Lint
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Adjustments to Debug Info
- Fix display of abapGit installation package (side-effect of changed package assignment)
- Clarify that list of supported objects is relevant for the local system only (since it's release dependent)
- Add link to complete list of supported objects
* Remove pragmas
* Fix status calculation on package move
If an object is moved to another package *and* changed, the status was "blank". Now the object status is properly shown as "added/deleted". Also the `packmove` flag is *not* set anymore since a simple `tadir` change would not be sufficient.
Extended unit test to cover this case.
* Split test method
* pretty
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Change of terminology (#4043). This time with the missing changes in service_repo.
repo_srv and serializer will be next after #4431.
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Automatic creation of top repository package
When adding a repository, it is not necessary anymore that the top SAP package assigned to the repository exists. Just enter a package name and clone (works for offline, too).
The initial diff will now show that the top package exists remotely only. Therefore, when pulling, you will not get the "confirm overwrite package" popup anymore. Yippie!
* Typo
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* NSPC: Add support for namespaces
Part 2 of #835
If a repo contains any namespaced object, then this PR will make namespaces part of the repository. So far, serializing and updating an existing namespace is supported.
abapGit can not (yet) create the namespace automatically. This will require a bit of refactoring which will then also support creating the top repo package automatically. Coming soon.
See readme of test case https://github.com/abapGit-tests/NSPC
* Refactor build
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Fix for #4425
* Remove whitespace at end of line
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
* Remove whitespace at end of line
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
* Refactor CTS API and support additional objects
- Change methods from public to private
- Reduce interface to public methods
- Support objects that can not be locked but can be included in a transport (prep for namespaces)
* Remove lenght check
Co-authored-by: Lars Hvam <larshp@hotmail.com>
There is no problem with having dots in names - we have these names in
our corporate github.
I don't know how to deal with the non-deterministic regex differently
than first trying with the suffix .git and than without it.
Closes#4427
* Refactor I18N settings
- Consolidate I18N parameters into a structure and pass it to xml and serializer classes (#4415)
- Continue change of terminology (#4043)
* Remove changes to serializer class
* Main lang
* DSYS
* OTGR
* Repo view
* Main langu
* Repo view %26 stage
* Serialize
* Settings
* Repo view
* Defs
* Stage
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Repo view: Adjust link to settings & render transport
- Update link text
- Re-init flag to render transport (in case the package has changed)
* Main langu
* NSPC: Add warning if namespace does not exist
Part 1 of #835
* Limit to xml files
* Unit test
* RC
* Regex
* Refactor checks into methods
Co-authored-by: Lars Hvam <larshp@hotmail.com>
Usually, in abapGit packages are created by the folder logic already. But it dumps with "`li_package` is not assigned," if deserialize is used in other ways.
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Prevent staging of duplicate files
Since objects cannot exist in multiple packages, the staging page is now checking the selected files to prevent the resulting repo from containing an object multiple times.
If an object is moved to another SAP package and the corresponding files are seleted to be added to the repo (for the new package), then the files must also be removed from the repo (from the old package). If not, an error is raised.
* Remove other changes
* Update file status
* Extend unit test
Co-authored-by: Lars Hvam <larshp@hotmail.com>
* Adjustment to BDEF Object Handler
Adjustment to BDEF Object Handler regarding exchange file format
* fix abaplint stuff
* fix abaplint issue
* adaptation in deserialize method
* fix abaplint issues
* fixes abaplinter issues
* requested changes
* fix type issue
* fix type issue
* delete unused method FILL_METADATA_FROM_DB
* enhance signature with exception information
* change reference type
* change to initial activation logic
* change to abap step for activation
* change of reference type as part of create Service
Co-authored-by: Christian Günter <christianguenter@googlemail.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>