Class CommitToBranchExecuter
- java.lang.Object
-
- com.nomagic.magicdraw.variants.teamwork.CommitToBranchExecuter
-
@OpenApiAll public abstract class CommitToBranchExecuter extends java.lang.Object
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
Constructors Constructor Description CommitToBranchExecuter()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addErrorMessage(java.lang.String message, java.lang.Exception e)
protected void
clearErrorMessages()
static CommitToBranchExecuter
createExecuter(Project project)
abstract void
findAndCommit(Project project, java.lang.String outputBranch, java.lang.String comment, java.util.List<java.lang.String> tags, boolean unlock, boolean retainUsageVersions)
Finds/creates the branch automatically, and then commits the given project to that branch.protected static java.util.List<java.lang.String>
getCommitTags(Project project, com.nomagic.magicdraw.teamwork2.ui.dialogs.L2RModulesDlg<?> dialog)
java.util.List<java.lang.String>
getErrorMessages()
abstract void
selectAndCommit(Project project)
Shows GUI allowing user to select the branch, add commit comment and tags.
-
-
-
Method Detail
-
createExecuter
@CheckForNull public static CommitToBranchExecuter createExecuter(Project project)
-
selectAndCommit
public abstract void selectAndCommit(Project project)
Shows GUI allowing user to select the branch, add commit comment and tags. Then should call commitToBranch()
-
findAndCommit
public abstract void findAndCommit(Project project, java.lang.String outputBranch, @CheckForNull java.lang.String comment, @CheckForNull java.util.List<java.lang.String> tags, boolean unlock, boolean retainUsageVersions) throws java.lang.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:
java.lang.Exception
-
addErrorMessage
protected void addErrorMessage(java.lang.String message, @CheckForNull java.lang.Exception e)
-
clearErrorMessages
protected void clearErrorMessages()
-
getErrorMessages
public java.util.List<java.lang.String> getErrorMessages()
-
getCommitTags
protected static java.util.List<java.lang.String> getCommitTags(Project project, com.nomagic.magicdraw.teamwork2.ui.dialogs.L2RModulesDlg<?> dialog)
-
-