-
Notifications
You must be signed in to change notification settings - Fork 15
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
Base "generate missing member" CodeActions on if the type is a source or binary file #676
Comments
To support that I suggest that you add in https://github.com/redhat-developer/quarkus-ls/blob/8a52980f2a999e80a0367f301f8962dfaf4f84b7/qute.jdt/com.redhat.qute.jdt/src/main/java/com/redhat/qute/commons/ResolvedJavaTypeInfo.java private Boolean source;
...
public boolean isSource() {
return source != null && source.booleanValue();
} like isTerable: Line 44 in 8a52980
|
datho7561
added a commit
to datho7561/quarkus-ls
that referenced
this issue
Jul 28, 2022
When generating CodeActions for missing properties that are referenced in a Qute template, don't suggest adding a field or adding a getter when the type that is being referred to is a binary type (i.e. built-in class or class from an external library). Fixes redhat-developer#676 Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561
added a commit
to datho7561/quarkus-ls
that referenced
this issue
Jul 28, 2022
When generating CodeActions for missing properties that are referenced in a Qute template, don't suggest adding a field or adding a getter when the type that is being referred to is a binary type (i.e. built-in class or class from an external library). Fixes redhat-developer#676 Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561
added a commit
to datho7561/quarkus-ls
that referenced
this issue
Jul 29, 2022
When generating CodeActions for missing properties that are referenced in a Qute template, don't suggest adding a field or adding a getter when the type that is being referred to is a binary type (i.e. built-in class or class from an external library). Fixes redhat-developer#676 Signed-off-by: David Thompson <davthomp@redhat.com>
angelozerr
pushed a commit
that referenced
this issue
Jul 29, 2022
When generating CodeActions for missing properties that are referenced in a Qute template, don't suggest adding a field or adding a getter when the type that is being referred to is a binary type (i.e. built-in class or class from an external library). Fixes #676 Signed-off-by: David Thompson <davthomp@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The "add field" and "add getter" code actions for missing members in Qute templates should not appear if the Java type is a binary, since the source for the class can't be modified.
The "add to existing template extensions" and "add to new template extensions" code actions for missing members in Qute templates should not appear if the Java type is a source file, since it makes more sense to add it as a field or getter to the source file.
If we know if the type is a source file or a binary file before we generate the text edits associated with the code action, we can generate only the code actions that are needed.
See #671 (comment)
The text was updated successfully, but these errors were encountered: