External system: code cleanup

This commit is contained in:
Vladislav.Soroka
2014-06-02 19:09:22 +04:00
parent a6352965a8
commit 7a71a4d846
3 changed files with 5 additions and 30 deletions
@@ -32,19 +32,14 @@ import java.util.List;
*/
public interface ExternalSystemTaskManager<S extends ExternalSystemExecutionSettings> {
/**
*
* @deprecated will be removed in 13.1
*/
@Deprecated
void executeTasks(@NotNull ExternalSystemTaskId id,
@NotNull List<String> taskNames,
@NotNull String projectPath,
@Nullable S settings,
@Nullable String vmOptions,
@NotNull final List<String> vmOptions,
@NotNull List<String> scriptParameters,
@Nullable String debuggerSetup,
@NotNull ExternalSystemTaskNotificationListener listener)
throws ExternalSystemException;
@NotNull ExternalSystemTaskNotificationListener listener) throws ExternalSystemException;
boolean cancelTask(@NotNull ExternalSystemTaskId id,
@NotNull ExternalSystemTaskNotificationListener listener)
@@ -18,10 +18,8 @@ package com.intellij.openapi.externalSystem.service.remote;
import com.intellij.openapi.externalSystem.model.ExternalSystemException;
import com.intellij.openapi.externalSystem.model.settings.ExternalSystemExecutionSettings;
import com.intellij.openapi.externalSystem.model.task.ExternalSystemTaskId;
import com.intellij.openapi.externalSystem.task.AbstractExternalSystemTaskManager;
import com.intellij.openapi.externalSystem.task.ExternalSystemTaskManager;
import com.intellij.util.Producer;
import com.intellij.util.execution.ParametersListUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -55,12 +53,8 @@ public class RemoteExternalSystemTaskManagerImpl<S extends ExternalSystemExecuti
@Nullable
@Override
public Object produce() {
if(myDelegate instanceof AbstractExternalSystemTaskManager) {
((AbstractExternalSystemTaskManager<S>)myDelegate)
.executeTasks(id, taskNames, projectPath, settings, vmOptions, scriptParameters, debuggerSetup, getNotificationListener());
} else {
myDelegate.executeTasks(id, taskNames, projectPath, settings, ParametersListUtil.join(vmOptions), debuggerSetup, getNotificationListener());
}
myDelegate.executeTasks(
id, taskNames, projectPath, settings, vmOptions, scriptParameters, debuggerSetup, getNotificationListener());
return null;
}
});
@@ -49,20 +49,6 @@ public class GradleTaskManager extends AbstractExternalSystemTaskManager<GradleE
private final GradleExecutionHelper myHelper = new GradleExecutionHelper();
/**
* TODO: remove the method in 13.1
*/
@Override
public void executeTasks(@NotNull ExternalSystemTaskId id,
@NotNull List<String> taskNames,
@NotNull String projectPath,
@Nullable GradleExecutionSettings settings,
@Nullable String vmOptions,
@Nullable String debuggerSetup,
@NotNull ExternalSystemTaskNotificationListener listener) throws ExternalSystemException {
throw new UnsupportedOperationException();
}
@Override
public void executeTasks(@NotNull final ExternalSystemTaskId id,
@NotNull final List<String> taskNames,