-
Notifications
You must be signed in to change notification settings - Fork 874
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
basic auto completion for maven version properties. #5823
Conversation
// version property completion | ||
if (path.startsWith("/project/properties/") && path.indexOf("/", 20) == -1) { |
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.
this should make it hopefully fairly safe for inclusion. The code path is guarded by the xpath (basically), so it doesn't affect any other completion code.
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.
Nitpick: I would store the string to variable/constant, then would use length()
or leave a comment for 20
. I would add // NOI18N
if possible.
55f8cc9
to
15e1fbc
Compare
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.
looks good to me
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.
Tested and worked. Eyeballed the code and it looks sane. Thank you.
It is somewhat common to use properties for artifact versions, esp when several artifacts share the same version. This implements basic auto completion for properties which are used as version field. In contrast to hints, completion is implemented in the grammar and doesn't have the full context. This will only take properties into account which are in the same pom file as their usage.
15e1fbc
to
34cecee
Compare
thanks for the reviews. added going to merge once green again |
It is somewhat common to use properties for artifact versions, esp when several artifacts share the same version.
This implements basic auto completion for properties which are used as version field.
In contrast to hints, completion is implemented in the grammar and doesn't have the full context. This will only take properties into account which are in the same pom file as their usage.