package net.sf.taverna.t2.workbench.ui.servicepanel.actions;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
import net.sf.taverna.t2.servicedescriptions.impl.ServiceDescriptionRegistryImpl;

/**
 * Action for refreshing the service provider registry.
 * <p>
 * This would typically re-parse WSDLs, etc.
 * 
 * @see ServiceDescriptionRegistry#refresh()
 * 
 * @author Stian Soiland-Reyes
 *
 */
@SuppressWarnings("serial")
public class RefreshProviderRegistryAction extends AbstractAction {

	private ServiceDescriptionRegistry serviceDescriptionRegistry = ServiceDescriptionRegistryImpl.getInstance();

	public RefreshProviderRegistryAction() {
		super("Refresh");
	}

	public void actionPerformed(ActionEvent e) {
		getServiceDescriptionRegistry().refresh();
	}

	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
	}

	public ServiceDescriptionRegistry getServiceDescriptionRegistry() {
		return serviceDescriptionRegistry;
	}

}

@@ -581,16 +581,76 @@
 Action %7B
+%0A%09%0A%09private static final String REFRESH = %22Reload services%22;
 %0A%0A%09priva
@@ -809,17 +809,15 @@
 per(
-%22Refresh%22
+REFRESH
 );%0A%09

Altered the name of the action so it is more intuitive