/******************************************************************************* * Copyright (c) 2013, 2016 Wind River Systems, Inc. and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Wind River Systems - initial API and implementation *******************************************************************************/ package org.eclipse.tcf.te.tcf.locator.steps; import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Status; import org.eclipse.tcf.protocol.IPeer; import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback; import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer; import org.eclipse.tcf.te.runtime.services.ServiceManager; import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId; import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext; import org.eclipse.tcf.te.tcf.core.interfaces.IPathMapService; public class RemoveExternalPathMapsStep extends AbstractPeerNodeStep { @Override public void validateExecute(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException { } @Override public void execute(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, ICallback callback) { Assert.isNotNull(context); Assert.isNotNull(data); Assert.isNotNull(fullQualifiedId); final IPeer peer = getActivePeerContext(context, data, fullQualifiedId); final IPathMapService service = ServiceManager.getInstance().getService(peer, IPathMapService.class); service.cleanSharedPathMapRules(peer); callback(data, fullQualifiedId, callback, Status.OK_STATUS, null); } }