IDEA-54100 (Pass Disposable to CheckinHandler.getAfterCheckinConfigurationPanel())
authorirengrig <Irina.Chernushina@jetbrains.com>
Mon, 26 Apr 2010 13:54:17 +0000 (17:54 +0400)
committerirengrig <Irina.Chernushina@jetbrains.com>
Mon, 26 Apr 2010 13:54:17 +0000 (17:54 +0400)
platform/vcs-api/src/com/intellij/openapi/vcs/checkin/CheckinHandler.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java
plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/CvsCheckinHandlerFactory.java

index 022e18594d73a49831c1c4c04021dfcc04cd207f..6df09a6b2a47bf87483d3f883d3673212682d145 100644 (file)
@@ -16,6 +16,7 @@
 
 package com.intellij.openapi.vcs.checkin;
 
+import com.intellij.openapi.Disposable;
 import com.intellij.openapi.vcs.VcsException;
 import com.intellij.openapi.vcs.changes.CommitExecutor;
 import com.intellij.openapi.vcs.ui.RefreshableOnComponent;
@@ -56,9 +57,10 @@ public abstract class CheckinHandler {
    *
    * @return the panel instance, or null if the handler does not provide any options to show in the
    * "After Check In" group.
+   * @param parentDisposable
    */
   @Nullable
-  public RefreshableOnComponent getAfterCheckinConfigurationPanel() {
+  public RefreshableOnComponent getAfterCheckinConfigurationPanel(final Disposable parentDisposable) {
     return null;
   }
 
index 2164d5b938dcf302182dc000bab21ff679ce3276..489cae181233c1d135dece1a8231fc90ff5d7c01 100644 (file)
@@ -17,12 +17,12 @@ package com.intellij.openapi.vcs.changes.ui;
 
 import com.intellij.ide.util.PropertiesComponent;
 import com.intellij.openapi.Disposable;
-import com.intellij.openapi.extensions.Extensions;
 import com.intellij.openapi.actionSystem.AnAction;
 import com.intellij.openapi.actionSystem.DataKey;
 import com.intellij.openapi.actionSystem.DataSink;
 import com.intellij.openapi.actionSystem.TypeSafeDataProvider;
 import com.intellij.openapi.application.ModalityState;
+import com.intellij.openapi.extensions.Extensions;
 import com.intellij.openapi.fileEditor.FileDocumentManager;
 import com.intellij.openapi.progress.ProgressManager;
 import com.intellij.openapi.project.Project;
@@ -306,7 +306,7 @@ public class CommitChangeListDialog extends DialogWrapper implements CheckinProj
         myAdditionalComponents.add(beforePanel);
       }
 
-      final RefreshableOnComponent afterPanel = handler.getAfterCheckinConfigurationPanel();
+      final RefreshableOnComponent afterPanel = handler.getAfterCheckinConfigurationPanel(getDisposable());
       if (afterPanel != null) {
         afterBox.add(afterPanel.getComponent());
         afterVisible = true;
index 2cb1a8d067764a13ce9fe0a88fd313a87b5a4558..f9da86162257b3a8ed112e7565a92b16cc4d4406 100644 (file)
 
 package com.intellij.cvsSupport2;
 
-import com.intellij.openapi.vcs.checkin.CheckinHandlerFactory;
-import com.intellij.openapi.vcs.checkin.CheckinHandler;
-import com.intellij.openapi.vcs.CheckinProjectPanel;
-import com.intellij.openapi.vcs.ui.RefreshableOnComponent;
 import com.intellij.cvsSupport2.checkinProject.AdditionalOptionsPanel;
 import com.intellij.cvsSupport2.config.CvsConfiguration;
+import com.intellij.openapi.Disposable;
+import com.intellij.openapi.vcs.CheckinProjectPanel;
+import com.intellij.openapi.vcs.checkin.CheckinHandler;
+import com.intellij.openapi.vcs.checkin.CheckinHandlerFactory;
+import com.intellij.openapi.vcs.ui.RefreshableOnComponent;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -33,7 +34,7 @@ class CvsCheckinHandlerFactory extends CheckinHandlerFactory {
   public CheckinHandler createHandler(final CheckinProjectPanel panel) {
     return new CheckinHandler() {
       @Nullable
-      public RefreshableOnComponent getAfterCheckinConfigurationPanel() {
+      public RefreshableOnComponent getAfterCheckinConfigurationPanel(Disposable parentDisposable) {
         if (panel.getAffectedVcses().contains(CvsVcs2.getInstance(panel.getProject()))) {
           return new AdditionalOptionsPanel(true, CvsConfiguration.getInstance(panel.getProject()));
         }