Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328891 - Sever never shows publishing state and in sync state prematurely
Summary: Sever never shows publishing state and in sync state prematurely
Status: RESOLVED FIXED
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: wst.server (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Elson Yuen CLA
QA Contact: Angel Vera CLA
URL:
Whiteboard:
Keywords:
Depends on: 326318
Blocks:
  Show dependency tree
 
Reported: 2010-10-27 17:02 EDT by Elson Yuen CLA
Modified: 2017-10-11 16:34 EDT (History)
2 users (show)

See Also:


Attachments
v1.0 patch for 3.2M (2.43 KB, patch)
2010-10-27 17:11 EDT, Elson Yuen CLA
no flags Details | Diff
v1.1 Patch for 3.3 (2.32 KB, patch)
2010-10-27 17:15 EDT, Elson Yuen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Elson Yuen CLA 2010-10-27 17:02:12 EDT
+++ This bug was initially created as a clone of Bug #326318 +++

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.
Comment 1 Elson Yuen CLA 2010-10-27 17:11:22 EDT
Created attachment 181885 [details]
v1.0 patch for 3.2M
Comment 2 Elson Yuen CLA 2010-10-27 17:12:03 EDT
Changes committed to 32M
Comment 3 Elson Yuen CLA 2010-10-27 17:12:22 EDT
Changes released to 32M
Comment 4 Elson Yuen CLA 2010-10-27 17:15:15 EDT
Created attachment 181886 [details]
v1.1 Patch for 3.3

Patch for 3.3
Comment 5 Elson Yuen CLA 2010-10-27 17:18:47 EDT
Changes released to HEAD (3.3)
Comment 6 Elson Yuen CLA 2010-10-27 17:19:24 EDT
Code released to both 3.2M and HEAD
Comment 7 Eclipse Genie CLA 2017-10-11 16:34:50 EDT
New Gerrit change created: https://git.eclipse.org/r/108997