Skip to content

adt support#487

Merged
XiaoxuanLu merged 17 commits intofeature/adt-supportfrom
xiaoluk/adt-support
Aug 7, 2025
Merged

adt support#487
XiaoxuanLu merged 17 commits intofeature/adt-supportfrom
xiaoluk/adt-support

Conversation

@XiaoxuanLu
Copy link

@XiaoxuanLu XiaoxuanLu commented Jul 24, 2025

Problems

The Amazon Q Eclipse plugin lacked proper support for ABAP files when used with the ADT (ABAP Development Tools) plugin. ABAP developers could not access inline completion suggestions or benefit from active file functionality that was available for other programming languages. The plugin was unable to recognize ABAP workspace structure and files, preventing Amazon Q features from working in ABAP development environments.

Solutions

This PR enables ABAP support by registering a new editor to handle ABAP files in the active file system and utilizing temporary folder management to make ABAP files accessible to Q chat functionality. The solution registers common ABAP files into the workspace so clients can utilize inline suggestions for ABAP development. This allows ABAP files to display the Q button for inline suggestions and be properly recognized by the Amazon Q system.

Further work

Future improvements should include

  1. Eclipse needs to send didWorkspaceFolderChangeEvent to language server
  2. refactoring the editor listener architecture to support broader editor types beyond text editors, which would reduce code complexity and provide more comprehensive editor support across different file types and plugins.
    By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@XiaoxuanLu XiaoxuanLu requested a review from shruti0085 July 25, 2025 21:47
@XiaoxuanLu XiaoxuanLu changed the base branch from main to feature/adt-support July 28, 2025 18:17
Object part = partRef.getPart(false);
if (part instanceof ITextEditor) {
handleEditorChange((ITextEditor) part);
} else if (part instanceof IEditorPart) {
Copy link
Contributor

Choose a reason for hiding this comment

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

isnt ItextEditor as IEditorPart as well?

} else if (editorInput instanceof IFileEditorInput fileEditorInput) {
return fileEditorInput.getFile().getRawLocation().toOSString();
var file = fileEditorInput.getFile();
if (file.getRawLocation() == null && AbapUtil.isAbapFile(file)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Also add a comment indicating that special handling is needed for abap files because we are referencing the cached location it is stored with ADT plugins.

Please add this.

}

@Test
void isAdtEditorWithSapPackagePrefixReturnsTrue() {
Copy link
Contributor

Choose a reason for hiding this comment

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

this test can be removed

private void setupPlatformMock() {
setupPlatformMockWithPaths(
"file:///workspace/.metadata/.plugins/org.eclipse.core.resources.semantic/.cache/test/path",
"/workspace/.metadata/.plugins/org.eclipse.core.resources.semantic",
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldnt this be c:/users instead?

Copy link
Author

Choose a reason for hiding this comment

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

will go back to tests later

@XiaoxuanLu XiaoxuanLu merged commit 3a0767a into feature/adt-support Aug 7, 2025
1 check passed
@XiaoxuanLu XiaoxuanLu deleted the xiaoluk/adt-support branch August 7, 2025 19:46
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.

2 participants