allow to shelve changes from p4 offline mode (IDEA-69121)

This commit is contained in:
peter
2012-02-20 21:12:38 +01:00
parent 915d8b951a
commit 62dc79cffe
2 changed files with 8 additions and 4 deletions
@@ -1,13 +1,17 @@
package com.intellij.openapi.vcs.checkin;
import com.intellij.openapi.vcs.changes.CommitExecutor;
/**
* @author irengrig
* Date: 5/24/11
* Time: 7:23 PM
*/
public interface BeforeCheckinDialogHandler {
public abstract class BeforeCheckinDialogHandler {
/**
* @return false to cancel commit
* @param executors
* @param showVcsCommit
*/
boolean beforeCommitDialogShownCallback();
public abstract boolean beforeCommitDialogShownCallback(Iterable<CommitExecutor> executors, boolean showVcsCommit);
}
@@ -143,8 +143,8 @@ public class CommitChangeListDialog extends DialogWrapper implements CheckinProj
CheckinHandlersManager.getInstance().getMatchingVcsFactories(Arrays.<AbstractVcs>asList(allActiveVcss));
for (BaseCheckinHandlerFactory factory : factoryList) {
final BeforeCheckinDialogHandler handler = factory.createSystemReadyHandler(project);
if (handler != null) {
if (! handler.beforeCommitDialogShownCallback()) return false;
if (handler != null && !handler.beforeCommitDialogShownCallback(Collections.unmodifiableList(executors), showVcsCommit)) {
return false;
}
}