Class CommitToBranchExecuter
java.lang.Object
com.nomagic.magicdraw.variants.teamwork.CommitToBranchExecuter
Commits the provided remote project to the selected branch (that can only be the branch of the same remote project).
The resulting version of the branch is identical to the source project.
Current changes to the original (source) project itself are not committed/saved.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addErrorMessage
(String message, Exception e) protected void
static CommitToBranchExecuter
createExecuter
(Project project) abstract void
findAndCommit
(Project project, String outputBranch, String comment, List<String> tags, boolean unlock, boolean retainUsageVersions) Finds/creates the branch automatically, and then commits the given project to that branch.getCommitTags
(Project project, com.nomagic.magicdraw.teamwork2.ui.dialogs.L2RModulesDlg<?> dialog) abstract void
selectAndCommit
(Project project) Shows GUI allowing user to select the branch, add commit comment and tags.
-
Constructor Details
-
CommitToBranchExecuter
public CommitToBranchExecuter()
-
-
Method Details
-
createExecuter
-
selectAndCommit
Shows GUI allowing user to select the branch, add commit comment and tags. Then should call commitToBranch() -
findAndCommit
public abstract void findAndCommit(Project project, String outputBranch, @CheckForNull String comment, @CheckForNull List<String> tags, boolean unlock, boolean retainUsageVersions) throws Exception Finds/creates the branch automatically, and then commits the given project to that branch. Implementation of this method should not use any user interaction/GUI- Parameters:
project
- source to get the state fromoutputBranch
- string to find in the given project. If branch does not exit, it should be created.comment
- informative commit commenttags
- optional commit tagsunlock
- true to unlock user's currently locked elements in the output branchretainUsageVersions
- true to preserve project usage versions in the output branch. Providing false will update versions from the source project- Throws:
Exception
-
addErrorMessage
-
clearErrorMessages
protected void clearErrorMessages() -
getErrorMessages
-
getCommitTags
-