From 64a7c47f0da2ab7997958876ff7bd4750451dc4a Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Tue, 10 May 2011 22:15:37 +0400 Subject: [PATCH] optimize imports on commit restored (IDEA-68447) (cherry picked from commit bcbd495b5922060740192f77f08ce6e7d9e29095) --- .../vcs/changes/ui/CommitChangeListDialog.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java index 342a8f23ba10..1e3defb44fff 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2011 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -666,13 +666,19 @@ public class CommitChangeListDialog extends DialogWrapper implements CheckinProj }; stopUpdate(); - for(CheckinHandler handler: myHandlers) { + Runnable runnable = proceedRunnable; + for(final CheckinHandler handler: myHandlers) { if (handler instanceof CheckinMetaHandler) { - ((CheckinMetaHandler) handler).runCheckinHandlers(proceedRunnable); - return; + final Runnable previousRunnable = runnable; + runnable = new Runnable() { + @Override + public void run() { + ((CheckinMetaHandler)handler).runCheckinHandlers(previousRunnable); + } + }; } } - proceedRunnable.run(); + runnable.run(); } protected void doOKAction() {