-
Notifications
You must be signed in to change notification settings - Fork 401
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
Ask to run generate proto tasks after projects are imported #2195
Conversation
9cf69ee
to
5fa724e
Compare
After projects are imported, check if any of the projects contains the classpath entry having 'protobuf_generated_source' attribute and is empty. If we found such projects, ask users to run 'generateProto' and `generateTestProto` Gradle tasks to generate those Java source files. Signed-off-by: Sheng Chen <[email protected]>
5fa724e
to
983ec85
Compare
test this please |
...pse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/framework/protobuf/ProtobufSupport.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Sheng Chen <[email protected]>
...pse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/framework/protobuf/ProtobufSupport.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Sheng Chen <[email protected]>
…nerate Signed-off-by: Sheng Chen <[email protected]>
if (!projectUris.isEmpty()) { | ||
ActionableNotification notification = new ActionableNotification().withSeverity(MessageType.Info) | ||
.withMessage("Would you like to generate Java source files out of your proto files?") | ||
.withCommands(Arrays.asList(new Command("Yes", "java.protobuf.generateSources", Arrays.asList(projectUris)))); |
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.
@jdneo I've tested the change and it works well. Apologies for taking long. Regarding the prompt, I would change "Yes" to "Generate". I think if we have a Yes/No dialog but we only want to display the action that does something, then we can just name it by the action that will be taken.
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.
…jdtls#2195) * Ask to run generate proto task after projects import After projects are imported, check if any of the projects contains the classpath entry having 'protobuf_generated_source' attribute and is empty. If we found such projects, ask users to run 'generateProto' and `generateTestProto` Gradle tasks to generate those Java source files. Signed-off-by: Sheng Chen <[email protected]>
After projects are imported, check if any of the projects contains the
classpath entry having 'protobuf_generated_source' attribute and is empty.
If we found such projects, ask users to run 'generateProto' and
generateTestProto
Gradle tasks to generate those Java source files.
How to test this PR
Signed-off-by: Sheng Chen [email protected]