| Summary: | action properties passed to RunOnServerAction can be ignored | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP ServerTools | Reporter: | Ian Tewksbury <itewksbu> | ||||
| Component: | wst.server | Assignee: | Steven Hung <sghung> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Elson Yuen <eyuen7> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | eyuen7 | ||||
| Version: | 3.2 | ||||||
| Target Milestone: | 3.2.5 P | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| See Also: | https://git.eclipse.org/r/109094 | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 373447 | ||||||
| Attachments: |
|
||||||
|
Description
Ian Tewksbury
Created attachment 210232 [details]
Patch v1.0
Overview of Fix:
In org.eclipse.wst.server.ui.internal.actions.RunOnServerActionDelegate.run(), the client and launchableAdapter are set with predefined values via getOverwriteValue if they exist. If they do not exist, these values are null.
In the case where these values are non-null, and the RunOnServerWizard is shown when calling org.eclipse.wst.server.ui.internal.actions.RunOnServerActionDelegate.getServer(IModule, IModuleArtifact, IProgressMonitor), the client and launchableAdapter will NOT have its values set based on the values from the wizard.
In the case where these values are null, and the RunOnServerWizard is shown when calling org.eclipse.wst.server.ui.internal.actions.RunOnServerActionDelegate.getServer(IModule, IModuleArtifact, IProgressMonitor), the client and launchableAdapter will have its values set based on the values from the wizard because they are null.
In the case where the RunOnServerWiard is not shown (i.e. "Always Use this Server" was enabled), the behaviour of setting the client and launchableAdapter only if they are null needs to be preserved. Prior to this patch, it was incorrectly overwriting the predefined values without doing any checks. As a result, the action properties were being ignored.
In addition to fixing the overwriting issue, I have also added trace strings to help diagnose this issue.
Tests Run:
Tomcat + Using "Run on Server", which does not set predefined values for client or launchableAdapter
1. "Always Use this Server" disabled, verified that Run on Server wizard is shown, and webpage is shown correctly
2. "Always Use this Server" enabled, verified that Run on Server wizard is not shown, and webpage is shown correctly
Server Adapter + Using a launch type which does set predefined values for client and launchableAdapter and the wizard's values will be null
1. "Always Use this Server" disabled, verified that Run on Server wizard is shown, and webpage is shown correctly
2. "Always Use this Server" enabled, verified that Run on Server wizard is not shown, and webpage is shown correctly (this was the reported issue where the action properties were ignored)
The patch looks good to me. Thanks for submitting the patch. Changes released to HEAD Thanks. What about 3.2.5 P? Code released to 325P Awesome, thanks! New Gerrit change created: https://git.eclipse.org/r/109094 |