-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
if (params instanceof Map) { | ||
var map = (Map<?, ?>) params; | ||
Object path = map.get("path"); | ||
return path != null ? path.toString() : null; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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())) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
if (AbapUtil.isAbapFile(path)) { | ||
AbapUtil.updateAdtServer(path); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
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
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.