Skip to content

Commit

Permalink
Merge branch 'release/0.6.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
OpherV committed Jun 22, 2017
2 parents f74d5e0 + 55629b2 commit a2eb4d9
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
4 changes: 2 additions & 2 deletions META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<name>Git Flow Integration</name>
<id>Gitflow</id>
<description>Git Flow Integration</description>
<version>0.6.1</version>
<version>0.6.2</version>
<category>VCS Integration</category>
<vendor url="http://www.opherv.com">Opher Vishnia</vendor>

<depends>com.intellij.modules.vcs</depends>
<depends>com.intellij.tasks</depends>
<depends>Git4Idea</depends>

<idea-version since-build="162.0" until-build="172.*"/>
<idea-version since-build="171.0" until-build="172.*"/>

<actions>
<action id="Gitflow.OpenGitflowPopup" class="gitflow.actions.OpenGitflowPopup"
Expand Down
2 changes: 1 addition & 1 deletion src/gitflow/actions/FinishFeatureAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public FinishFeatureAction() {
super("Finish Feature");
}

FinishFeatureAction(GitRepository repo) {
public FinishFeatureAction(GitRepository repo) {
super(repo, "Finish Feature");
}

Expand Down
3 changes: 3 additions & 0 deletions src/gitflow/actions/GitflowAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public void actionPerformed(AnActionEvent e) {
public void setup(Project project){
myProject = project;
virtualFileMananger = VirtualFileManager.getInstance();
repos.add(myRepo);

featurePrefix = GitflowConfigUtil.getFeaturePrefix(myProject, myRepo);
releasePrefix = GitflowConfigUtil.getReleasePrefix(myProject, myRepo);
Expand All @@ -59,6 +60,8 @@ public void setup(Project project){
developBranch= GitflowConfigUtil.getDevelopBranch(myProject, myRepo);

branchUtil= GitflowBranchUtilManager.getBranchUtil(myRepo);

currentBranchName= GitBranchUtil.getBranchNameOrRev(myRepo);
}

public void runAction(Project project, final String baseBranchName, final String branchName){
Expand Down
7 changes: 4 additions & 3 deletions src/gitflow/ui/GitflowCloseTaskPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ public class GitflowCloseTaskPanel extends TaskDialogPanel {

final private GitflowState gitflowState;

GitflowCloseTaskPanel(Project project, Task task){
GitflowCloseTaskPanel(Project project, Task task, GitRepository repo){
myProject = project;
myTask = task;
myRepo = repo;
gitflowState = ServiceManager.getService(GitflowState.class);

gitflowBranchUtil = GitflowBranchUtilManager.getBranchUtil(myRepo);
Expand Down Expand Up @@ -100,11 +101,11 @@ public void commit() {
String taskBranchName = gitflowBranchUtil.stripFullBranchName(taskFullBranchName);

if (finishFeatureCheckbox.isSelected()){
FinishFeatureAction action = new FinishFeatureAction();
FinishFeatureAction action = new FinishFeatureAction(myRepo);
action.runAction(myProject, taskBranchName);
}
else if (finishHotfixCheckbox.isSelected()){
FinishHotfixAction action = new FinishHotfixAction();
FinishHotfixAction action = new FinishHotfixAction(myRepo);
action.runAction(myProject, taskBranchName, tagMessageTextField.getText());
}
}
Expand Down
8 changes: 5 additions & 3 deletions src/gitflow/ui/GitflowOpenTaskPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ public class GitflowOpenTaskPanel extends TaskDialogPanel implements ItemListene
private GitflowState gitflowState;


public GitflowOpenTaskPanel(Project project, Task task){
public GitflowOpenTaskPanel(Project project, Task task, GitRepository repo){
myProject = project;
currentTask = task;
myRepo = repo;

myTaskManager = (TaskManagerImpl) TaskManager.getManager(project);
VcsTaskHandler[] vcsTaskHAndlers = VcsTaskHandler.getAllHandlers(project);
if (vcsTaskHAndlers.length > 0){
Expand Down Expand Up @@ -101,12 +103,12 @@ public void commit() {
GitflowAction action;

if (startFeatureRadioButton.isSelected()) {
action = new StartFeatureAction();
action = new StartFeatureAction(myRepo);
action.runAction(myProject, selectedFeatureBaseBranch.getBranchName(), featureName.getText());
gitflowState.setTaskBranch(currentTask, GitflowConfigUtil.getFeaturePrefix(myProject, myRepo) + featureName.getText());
}
else if (startHotfixRadioButton.isSelected()) {
action = new StartHotfixAction();
action = new StartHotfixAction(myRepo);
action.runAction(myProject, selectedHotfixBaseBranch.getBranchName(), hotfixName.getText());
gitflowState.setTaskBranch(currentTask, GitflowConfigUtil.getHotfixPrefix(myProject, myRepo) + hotfixName.getText());
}
Expand Down
4 changes: 2 additions & 2 deletions src/gitflow/ui/GitflowTaskDialogPanelProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public TaskDialogPanel getOpenTaskPanel(@NotNull Project project, @NotNull Task
GitRepository currentRepo = GitBranchUtil.getCurrentRepository(project);
GitflowBranchUtil branchUtil = GitflowBranchUtilManager.getBranchUtil(currentRepo);
if (branchUtil.hasGitflow()) {
return TaskManager.getManager(project).isVcsEnabled() ? new GitflowOpenTaskPanel(project, task) : null;
return TaskManager.getManager(project).isVcsEnabled() ? new GitflowOpenTaskPanel(project, task, currentRepo) : null;
}
else{
return null;
Expand All @@ -38,7 +38,7 @@ public TaskDialogPanel getCloseTaskPanel(@NotNull Project project, @NotNull Loca
GitflowBranchUtil branchUtil = GitflowBranchUtilManager.getBranchUtil(currentRepo);

if (branchUtil.hasGitflow()) {
return TaskManager.getManager(project).isVcsEnabled() ? new GitflowCloseTaskPanel(project, task) : null;
return TaskManager.getManager(project).isVcsEnabled() ? new GitflowCloseTaskPanel(project, task, currentRepo) : null;
}
else{
return null;
Expand Down

0 comments on commit a2eb4d9

Please sign in to comment.