ServerEventHandler.getDefault().addServerListener(listener);
}
public void decorate(Object element, IDecoration decoration) {
if (element instanceof ModuleServer) {
ModuleServer moduleServer = (ModuleServer) element;
IServer s = moduleServer.getServer();
if (s != null && CloudServerUtil.isCloudFoundryServer(s)) {
IModule[] modules = moduleServer.getModule();
if (modules != null && modules.length == 1) {
CloudFoundryServer server = getCloudFoundryServer(moduleServer.getServer());
if (server == null || !server.isConnected()) {
return;
}
CloudFoundryApplicationModule module = server.getExistingCloudModule(modules[0]);