Skip to content

handle the null case for contentType in adt plugin environment#496

Merged
XiaoxuanLu merged 2 commits intofeature/adt-supportfrom
xiaoluk/adt-support
Aug 8, 2025
Merged

handle the null case for contentType in adt plugin environment#496
XiaoxuanLu merged 2 commits intofeature/adt-supportfrom
xiaoluk/adt-support

Conversation

@XiaoxuanLu
Copy link

@XiaoxuanLu XiaoxuanLu commented Aug 8, 2025

fix the bug for inline suggestion in adt environment.

Todo: add content type in plugin.xml

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

IFile file = ((FileEditorInput) input).getFile();
IContentType contentType = Platform.getContentTypeManager().findContentTypeFor(file.getName());
contentTypeName = contentType.getName();
if (contentType != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

out of curiousity do you know why content type is null for abap files?

Copy link
Author

Choose a reason for hiding this comment

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

I searched and it said that this commonly happens with files that don't have recognized extensions or aren't registered with Eclipse's content type system. I think we do not register in Eclipse's content type systems. I will check if there is some place that I can add them

@XiaoxuanLu XiaoxuanLu merged commit 7877679 into feature/adt-support Aug 8, 2025
1 check passed
@XiaoxuanLu XiaoxuanLu deleted the xiaoluk/adt-support branch August 8, 2025 17:35
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