@Override public int getModulePublishState(IModule[] module) { // TODO Auto-generated method stub return server.getModulePublishState(module); }
private boolean isChildModuleChanged(IModule[] module, IProgressMonitor monitor) { if (module == null || module.length == 0) { return false; } IServer myserver = this.getServer(); IModule[] childModules = myserver.getChildModules(module, monitor); if (childModules != null && childModules.length > 0) { // Compose the full structure of the child module IModule[] currentChild = new IModule[module.length + 1]; for (int i = 0; i < module.length; i++) { currentChild[i] = module[i]; } for (IModule child : childModules) { currentChild[module.length] = child; if (myserver.getModulePublishState(currentChild) != IServer.PUBLISH_STATE_NONE || isChildModuleChanged(currentChild, monitor)) { return true; } } } return false; }
@Override public boolean canRestartModule (IModule[] modules) { try { CloudFoundryServer cloudServer = getCloudFoundryServer(); IServer server = cloudServer.getServerOriginal(); // If module is started, we should return true, regardless of the // publish state (this is for example an unlinked project that is // available and running, just not bound to any project in the // workspace) int moduleState = server.getModuleState(modules); if (moduleState == IServer.STATE_STARTED) { return true; } int publishState = server.getModulePublishState(modules); // If state is unknown, then inform module(s) can't be // restarted (which will disable push/start context menu operations) if (publishState == IServer.PUBLISH_STATE_UNKNOWN) { return false; } } catch (CoreException ce) { CloudFoundryPlugin.logError(ce); } return super.canRestartModule(modules); } }
public void doUpdateItem(Widget widget, Object element, boolean fullMap) { if (widget instanceof TreeItem && color != null) { TreeItem item = (TreeItem) widget; if (element instanceof ModuleServer) { ModuleServer ms = (ModuleServer) element; IModule m = ms.module[ms.module.length-1]; if (m.isExternal()) item.setForeground(color); else item.setForeground(null); if (ms.server.getModulePublishState(ms.module) != IServer.PUBLISH_STATE_NONE) item.setFont(0, font); else item.setFont(0, null); } } super.doUpdateItem(widget, element, fullMap); }
public void doUpdateItem(Widget widget, Object element, boolean fullMap) { if (widget instanceof TreeItem && color != null) { TreeItem item = (TreeItem) widget; if (element instanceof ModuleServer) { ModuleServer ms = (ModuleServer) element; IModule m = ms.module[ms.module.length-1]; if (m.isExternal()) item.setForeground(color); else item.setForeground(null); if (!(server instanceof IServer) || ((IServer)server).getModulePublishState(ms.module) != IServer.PUBLISH_STATE_NONE) item.setFont(font); else item.setFont(null); } } super.doUpdateItem(widget, element, fullMap); } };
.getModulePublishState(new IModule[] { appModule.getLocalModule() }); if (appModule.isDeployed() && moduleState == IServer.PUBLISH_STATE_NONE) {
return status.getMessage(); return modulePublishState[ms.server.getModulePublishState(ms.module)];
int publishState = getServer().getModulePublishState(module); ICloudFoundryOperation op = null; if (deltaKind == ServerBehaviourDelegate.ADDED || publishState == IServer.PUBLISH_STATE_UNKNOWN) {