diff --git a/platform/external-system-api/src/com/intellij/openapi/externalSystem/model/task/ExternalSystemTaskNotificationListener.java b/platform/external-system-api/src/com/intellij/openapi/externalSystem/model/task/ExternalSystemTaskNotificationListener.java index 2d6c426f37d6..fd8cded4a1eb 100644 --- a/platform/external-system-api/src/com/intellij/openapi/externalSystem/model/task/ExternalSystemTaskNotificationListener.java +++ b/platform/external-system-api/src/com/intellij/openapi/externalSystem/model/task/ExternalSystemTaskNotificationListener.java @@ -15,20 +15,23 @@ public interface ExternalSystemTaskNotificationListener { = ExtensionPointName.create("com.intellij.externalSystemTaskNotificationListener"); /** - * Notifies that task with the given id is queued for the execution. - *

- * 'Queued' here means that intellij process-local codebase receives request to execute the target task and even has not been - * sent it to the slave gradle api process. - * - * @param id target task's id - * @param workingDir + * @deprecated use {@link #onStart(ExternalSystemTaskId, String)} */ void onQueued(@NotNull ExternalSystemTaskId id, String workingDir); - + /** * Notifies that task with the given id is about to be started. - * + * * @param id target task's id + * @param workingDir working directory + */ + default void onStart(@NotNull ExternalSystemTaskId id, String workingDir) { + onQueued(id, workingDir); + onStart(id); + } + + /** + * @deprecated use {@link #onStart(ExternalSystemTaskId, String)} */ void onStart(@NotNull ExternalSystemTaskId id); diff --git a/platform/external-system-api/src/com/intellij/openapi/externalSystem/model/task/ExternalSystemTaskNotificationListenerAdapter.java b/platform/external-system-api/src/com/intellij/openapi/externalSystem/model/task/ExternalSystemTaskNotificationListenerAdapter.java index 87a36684af3b..ec9e20c8289a 100644 --- a/platform/external-system-api/src/com/intellij/openapi/externalSystem/model/task/ExternalSystemTaskNotificationListenerAdapter.java +++ b/platform/external-system-api/src/com/intellij/openapi/externalSystem/model/task/ExternalSystemTaskNotificationListenerAdapter.java @@ -10,11 +10,21 @@ public abstract class ExternalSystemTaskNotificationListenerAdapter implements E @NotNull public static final ExternalSystemTaskNotificationListener NULL_OBJECT = new ExternalSystemTaskNotificationListenerAdapter() { }; - @Override + /** + * @deprecated use {@link #onStart(ExternalSystemTaskId, String)} + */ public void onQueued(@NotNull ExternalSystemTaskId id, String workingDir) { } @Override + public void onStart(@NotNull ExternalSystemTaskId id, String workingDir) { + onQueued(id, workingDir); + onStart(id); + } + + /** + * @deprecated use {@link #onStart(ExternalSystemTaskId, String)} + */ public void onStart(@NotNull ExternalSystemTaskId id) { } diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/AbstractExternalSystemFacadeImpl.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/AbstractExternalSystemFacadeImpl.java index bc6efab979ea..9a8e9f3782e3 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/AbstractExternalSystemFacadeImpl.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/AbstractExternalSystemFacadeImpl.java @@ -210,14 +210,12 @@ public abstract class AbstractExternalSystemFacadeImpl update(), TOO_LONG_EXECUTION_MS); diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/internal/ExternalSystemResolveProjectTask.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/internal/ExternalSystemResolveProjectTask.java index b3c5d709cc99..817d01c69b3c 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/internal/ExternalSystemResolveProjectTask.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/internal/ExternalSystemResolveProjectTask.java @@ -83,7 +83,7 @@ public class ExternalSystemResolveProjectTask extends AbstractExternalSystemTask ExternalSystemProgressNotificationManagerImpl progressNotificationManager = (ExternalSystemProgressNotificationManagerImpl)ServiceManager.getService(ExternalSystemProgressNotificationManager.class); ExternalSystemTaskId id = getId(); - progressNotificationManager.onQueued(id, myProjectPath); + progressNotificationManager.onStart(id, myProjectPath); try { DataNode project = resolver.resolveProjectInfo(id, myProjectPath, myIsPreviewMode, settings); if (project != null) { diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/remote/ExternalSystemProgressNotificationManagerImpl.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/remote/ExternalSystemProgressNotificationManagerImpl.java index b7eb7e8a6d7e..c21868f668e8 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/remote/ExternalSystemProgressNotificationManagerImpl.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/remote/ExternalSystemProgressNotificationManagerImpl.java @@ -67,25 +67,15 @@ public class ExternalSystemProgressNotificationManagerImpl extends RemoteObject } @Override - public void onQueued(@NotNull ExternalSystemTaskId id, @NotNull String workingDir) { + public void onStart(@NotNull ExternalSystemTaskId id, @NotNull String workingDir) { for (Map.Entry> entry : myListeners.entrySet()) { final Set ids = entry.getValue(); if (Collections.EMPTY_SET == ids || ids.contains(id)) { - entry.getKey().onQueued(id, workingDir); + entry.getKey().onStart(id, workingDir); } } } - @Override - public void onStart(@NotNull ExternalSystemTaskId id) { - for (Map.Entry> entry : myListeners.entrySet()) { - final Set ids = entry.getValue(); - if (Collections.EMPTY_SET == ids || ids.contains(id)) { - entry.getKey().onStart(id); - } - } - } - @Override public void onStatusChange(@NotNull ExternalSystemTaskNotificationEvent event) { for (Map.Entry> entry : myListeners.entrySet()) { diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/remote/RemoteExternalSystemProgressNotificationManager.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/remote/RemoteExternalSystemProgressNotificationManager.java index f151d68cc30a..ca6fb84032de 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/remote/RemoteExternalSystemProgressNotificationManager.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/remote/RemoteExternalSystemProgressNotificationManager.java @@ -19,11 +19,7 @@ public interface RemoteExternalSystemProgressNotificationManager extends Remote RemoteExternalSystemProgressNotificationManager NULL_OBJECT = new RemoteExternalSystemProgressNotificationManager() { @Override - public void onQueued(@NotNull ExternalSystemTaskId id, @NotNull String projectPath) throws RemoteException { - } - - @Override - public void onStart(@NotNull ExternalSystemTaskId id) { + public void onStart(@NotNull ExternalSystemTaskId id, @NotNull String projectPath) throws RemoteException { } @Override @@ -55,9 +51,7 @@ public interface RemoteExternalSystemProgressNotificationManager extends Remote } }; - void onQueued(@NotNull ExternalSystemTaskId id, @NotNull String projectPath) throws RemoteException; - - void onStart(@NotNull ExternalSystemTaskId id) throws RemoteException; + void onStart(@NotNull ExternalSystemTaskId id, @NotNull String projectPath) throws RemoteException; void onStatusChange(@NotNull ExternalSystemTaskNotificationEvent event) throws RemoteException; diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/remote/wrapper/ExternalSystemProjectResolverWrapper.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/remote/wrapper/ExternalSystemProjectResolverWrapper.java index cc5ee1c89293..2b13fb84e19f 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/remote/wrapper/ExternalSystemProjectResolverWrapper.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/remote/wrapper/ExternalSystemProjectResolverWrapper.java @@ -15,7 +15,7 @@ import java.rmi.RemoteException; /** * Intercepts calls to the target {@link RemoteExternalSystemProjectResolver} and - * {@link ExternalSystemTaskNotificationListener#onQueued(ExternalSystemTaskId, String) updates 'queued' task status}. + * {@link ExternalSystemTaskNotificationListener#onStart(ExternalSystemTaskId, String) updates 'queued' task status}. *

* Thread-safe. * diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/remote/wrapper/ExternalSystemTaskManagerWrapper.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/remote/wrapper/ExternalSystemTaskManagerWrapper.java index 51d63d75fcb4..ba5424462f53 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/remote/wrapper/ExternalSystemTaskManagerWrapper.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/remote/wrapper/ExternalSystemTaskManagerWrapper.java @@ -48,9 +48,10 @@ public class ExternalSystemTaskManagerWrapper