| Summary: | Server never shows publishing state and in sync state prematurely | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP ServerTools | Reporter: | Jason Duan <jasonxd> | ||||||
| Component: | wst.server | Assignee: | Elson Yuen <eyuen7> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Angel Vera <arvera> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | ccc, thatnitind | ||||||
| Version: | unspecified | Flags: | arvera:
review+
|
||||||
| Target Milestone: | 3.2.2 P | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 328891 | ||||||||
| Attachments: |
|
||||||||
my ref# 57988 Created attachment 180506 [details]
v1.0
The problem is caused by the code is still using the old publishing states from the old variable before migrating to the cnf view.
This patch will fix the described problem to change the status to "Publishing" during the publish operation.
Tested scenario:
1. The status of the server changed to "Publishing..." when publishing to a tomcat server.
This problem is a regression on function on the CNF Servers view when comparing to the old Servers view on 3.0.x. Targeting to 3.2.2 P as per request of the adopter Created attachment 181093 [details]
Deprecate ServerContentProvider.publishing instead of removing
Comment on attachment 181093 [details]
Deprecate ServerContentProvider.publishing instead of removing
Carl your patch is a good idea since this is a maintenance release
Committed to R3_2_2_patches |
Build Identifier: 3.2.2 We noticed that the server never shows publishing state and it is in sync state even before the publishing is completed. If we look at the org.eclipse.wst.server.ui.internal.cnf.ServerDecorator.getServerStatusLabel(IServer server). The ServerContentProvider.publishing is never got set, so it will never return syncState[4], that is "Publishing." Instead, it returns the syncState[0]. This is "Synchronized" state. public static String getServerStatusLabel(IServer server) { IStatus status = ((Server) server).getServerStatus(); if (status != null) return status.getMessage(); if (server.getServerType() == null) return ""; if (server.getServerState() == IServer.STATE_UNKNOWN) return ""; String serverId = server.getId(); if (ServerContentProvider.publishing.contains(serverId)) return ServerDecorator.syncState[4]; // republish int i = 0; if (server.shouldPublish()) { if (((Server)server).isPublishUnknown()) return ""; i += 2; } if (server.shouldRestart()) i = 1; return syncState[i]; } Reproducible: Always Steps to Reproduce: 1. Publish a project that takes some time to publish. 2. 3.