Search in sources :

Example 6 with PublishAdapter

use of org.eclipse.wst.server.core.util.PublishAdapter in project liferay-ide by liferay.

the class AbstractPortalServerEditorSection method addChangeListeners.

protected void addChangeListeners() {
    listener = new PropertyChangeListener() {

        public void propertyChange(PropertyChangeEvent event) {
            if (updating) {
                return;
            }
            updating = true;
            addPropertyListeners(event);
            updating = false;
        }
    };
    server.addPropertyChangeListener(listener);
    publishListener = new PublishAdapter() {

        public void publishFinished(IServer server2, IStatus status) {
            boolean flag = false;
            if (status.isOK() && server2.getModules().length == 0)
                flag = true;
            if (flag != allowRestrictedEditing) {
                allowRestrictedEditing = flag;
            }
        }
    };
    server.getOriginal().addPublishListener(publishListener);
}
Also used : PropertyChangeEvent(java.beans.PropertyChangeEvent) IServer(org.eclipse.wst.server.core.IServer) IStatus(org.eclipse.core.runtime.IStatus) PropertyChangeListener(java.beans.PropertyChangeListener) PublishAdapter(org.eclipse.wst.server.core.util.PublishAdapter)

Aggregations

PublishAdapter (org.eclipse.wst.server.core.util.PublishAdapter)6 IStatus (org.eclipse.core.runtime.IStatus)5 PropertyChangeEvent (java.beans.PropertyChangeEvent)3 PropertyChangeListener (java.beans.PropertyChangeListener)3 IServer (org.eclipse.wst.server.core.IServer)3 Server (org.eclipse.wst.server.core.internal.Server)2 Point (org.eclipse.swt.graphics.Point)1