| Summary: | ServerClasspathContainerPage not initialized properly, leads to error when changing page | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP ServerTools | Reporter: | Rob Stryker <stryker> | ||||||
| Component: | jst.server | Assignee: | Angel Vera <arvera> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Angel Vera <arvera> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | ||||||||
| Version: | 3.2 | ||||||||
| Target Milestone: | 3.2.4 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| See Also: | https://git.eclipse.org/r/109037 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Rob Stryker
Created attachment 189451 [details]
Fixes the initialization
The attached patch iterates through the runtime map and compares the classpath containers' getPath() with the getPath() of the initial selection. If it finds a match, it selects the item in the viewer, sets page as complete, and breaks.
Angel can you squeeze this in please? It'd also be a good fix for trunk obviously. Created attachment 192226 [details]
EARtest with no server classpath container
Not sure how you got to it, but the EARs that I created during my test didn't have a classpath container. Is there a special set of steps to how to recreate the problem?
Let's do it with a plain old java project:
1) Create java project
2) Right click java project, go to properties
a) build path
b) click "Add Library"
c) select "Server Runtime"
d) Pick any server
e) Click finish
f) click ok
3) Note your project has a new classpath container
a) Check the .classpath file to verify its type:
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.your.runtime.type/runtime name"/>
4) right-click the container, click properties
5) Note the page comes up
6) Note that the viewer has no selection
7) Select (again) the "Classpath Container" element in the left half of the dialog
8) Note the exception
I don't mean to complain, but in my opinion the patch is quite small and obvious. Any project (be it java, dynamic web, or ear) that has this classpath container will suffer from this bug.
Perhaps it needs to be applied to see exactly where it is in the UI file, but even without applying the patch, you can see quite clearly that it is simply initializing the selection in the viewer to what container was right-clicked and selected.
changes committed to 32M changes released to 32M changes committed to HEAD(3.3) Changes released to HEAD(3.3) New Gerrit change created: https://git.eclipse.org/r/109037 |