From c60866c2b383148d086d4cf560c6fd79d5aa1c91 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Wed, 2 Feb 2011 15:17:03 +0100 Subject: [PATCH] help ID for SessionDialog (IDEA-64910) --- .../intellij/openapi/vcs/changes/CommitSession.java | 11 +++++++++++ .../vcs/changes/patch/CreatePatchCommitExecutor.java | 5 +++++ .../changes/shelf/ShelveChangesCommitExecutor.java | 5 +++++ .../openapi/vcs/changes/ui/SessionDialog.java | 10 ++++++++++ 4 files changed, 31 insertions(+) diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/CommitSession.java b/platform/vcs-api/src/com/intellij/openapi/vcs/changes/CommitSession.java index f294d2b32ec7..e1ac2fd5555a 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/CommitSession.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/changes/CommitSession.java @@ -43,6 +43,11 @@ public interface CommitSession { public void executionCanceled() { } + + @Override + public String getHelpId() { + return null; + } }; /** @@ -57,4 +62,10 @@ public interface CommitSession { boolean canExecute(Collection changes, String commitMessage); void execute(Collection changes, String commitMessage); void executionCanceled(); + + /** + * @return the ID of the help topic to show for the dialog + * @since 10.5 + */ + String getHelpId(); } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/CreatePatchCommitExecutor.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/CreatePatchCommitExecutor.java index 519fa1c6f415..42ac02e16028 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/CreatePatchCommitExecutor.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/CreatePatchCommitExecutor.java @@ -198,5 +198,10 @@ public class CreatePatchCommitExecutor implements CommitExecutorWithHelp, Projec public void executionCanceled() { } + + @Override + public String getHelpId() { + return null; + } } } \ No newline at end of file diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelveChangesCommitExecutor.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelveChangesCommitExecutor.java index 22c37a6bcdc1..bfb8a1cce25b 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelveChangesCommitExecutor.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelveChangesCommitExecutor.java @@ -112,5 +112,10 @@ public class ShelveChangesCommitExecutor implements CommitExecutorWithHelp { public void executionCanceled() { } + + @Override + public String getHelpId() { + return null; + } } } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/SessionDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/SessionDialog.java index 2d25392c59a2..0ff88ea86e3c 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/SessionDialog.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/SessionDialog.java @@ -85,4 +85,14 @@ public class SessionDialog extends DialogWrapper { super.dispose(); myOKButtonUpdateAlarm.cancelAllRequests(); } + + @Override + protected String getHelpId() { + try { + return mySession.getHelpId(); + } + catch (AbstractMethodError e) { + return null; + } + } }