@Override public void removeServerStateChangeListener(IDSServerStateChangeListener listener) { super.removeServerStateChangeListener(listener); if (stateListeners.size() == 0) { ResourcesPlugin.getWorkspace().removeResourceChangeListener(serverPropertiesChangeListener); serverPropertiesChangeListener = null; } }
@Override public void addServerStateChangeListener(IDSServerStateChangeListener listener) { super.addServerStateChangeListener(listener); if (serverPropertiesChangeListener == null) { serverPropertiesChangeListener = new ServerPropertiesChangeListener(); ResourcesPlugin.getWorkspace() .addResourceChangeListener( serverPropertiesChangeListener, IResourceChangeEvent.POST_CHANGE); } }