optimize imports on commit restored (IDEA-68447)

(cherry picked from commit bcbd495b5922060740192f77f08ce6e7d9e29095)
This commit is contained in:
Roman Shevchenko
2011-05-10 22:16:50 +04:00
parent 17435f6731
commit 64a7c47f0d
@@ -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() {