Skip to content

Support updating remote when ABAP files are edited #495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 7, 2025

Conversation

shruti0085
Copy link
Contributor

Description of changes:
Ensures when Q edits an existing file associated with an ABAP ADT project, the update is communicated to the remote server. This is done by marking the editor for the file as dirty and triggering a save which in turn informs remote. When a file is not opened, it is opened in an invisible editor to do the same. For new files not associated with the current workspace, when Q creates a new one user will be informed to configure it appropriately as it cannot be configured for them by Q directly due to the limitations around ABAP ADT projects.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

if (params instanceof Map) {
var map = (Map<?, ?>) params;
Object path = map.get("path");
return path != null ? path.toString() : null;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need a instance check before toString?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path !=null check does that I believe


// Check if file is already open in an editor
var existingEditor = findOpenEditor(page, workspaceFile);
if (existingEditor != null && AbapUtil.isAdtEditor(existingEditor.getClass().getName())) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is editor check relevant here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the abapfile check to confirm for abap adt file instead in the callstack before.

Comment on lines +543 to +544
if (AbapUtil.isAbapFile(path)) {
AbapUtil.updateAdtServer(path);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder do we still want to depend on the extension or should we use editor to check if is in adt plugin environment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this situation (file not open)we only have the path, no editor is available in this case

Base automatically changed from xiaoluk/adt-support to feature/adt-support August 7, 2025 19:46
@shruti0085 shruti0085 merged commit 191c677 into feature/adt-support Aug 7, 2025
1 check passed
@shruti0085 shruti0085 deleted the shruti0085/abapEdit branch August 7, 2025 21:06
shruti0085 added a commit that referenced this pull request Aug 13, 2025
Merges feature branch containing improvements for ADT ABAP support into main.
Relevant PRs

* adt support #487
* Support updating remote when ABAP files are edited #495
* handle the null case for contentType in adt plugin environment #496
* Fix: Handle removing paint listeners with ADT viewer and allow multiline text in inline chat #500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants