Skip to content

Commit

Permalink
Merge branch 'release/0.4.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
OpherV committed Nov 3, 2015
2 parents 5b61f1c + 136f374 commit d375370
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 20 deletions.
4 changes: 2 additions & 2 deletions META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<name>Git Flow Integration</name>
<id>Gitflow</id>
<description>Git Flow Integration</description>
<version>0.4.4</version>
<version>0.4.5</version>
<category>VCS Integration</category>
<vendor url="http://www.opherv.com">Opher Vishnia</vendor>

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

<idea-version since-build="129" until-build="141.999999"/>
<idea-version since-build="143" until-build="143.999999"/>

<actions>
<action id="Gitflow.OpenGitflowPopup" class="gitflow.actions.OpenGitflowPopup"
Expand Down
6 changes: 6 additions & 0 deletions docs/project_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,10 @@ Click run. A new IDEA instance should start with the plugin running.

And that's it. You can now make changes to the source and run them.

## Notes & hints

### Language level

This project is written to target Java 6, so make sure to set the project language level appropriately
to avoid accidentally using newer features. You can do so in the module settings under "modules -> gitflow4idea -> sources -> Language level".

5 changes: 2 additions & 3 deletions src/gitflow/GitflowComponent.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package gitflow;

import com.intellij.dvcs.DvcsUtil;
import com.intellij.openapi.components.ProjectComponent;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vcs.ProjectLevelVcsManager;
Expand Down Expand Up @@ -62,9 +61,9 @@ public void directoryMappingChanged() {
}
else{
if (myGitflowWidget!=null){
DvcsUtil.removeStatusBarWidget(myProject, myGitflowWidget);
myGitflowWidget.deactivate();
}
myGitflowWidget = null;
}
}
}
}
17 changes: 2 additions & 15 deletions src/gitflow/ui/GitflowWidget.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import com.intellij.openapi.wm.StatusBar;
import com.intellij.openapi.wm.StatusBarWidget;
import com.intellij.openapi.wm.WindowManager;
import com.intellij.openapi.wm.impl.status.EditorBasedWidget;
import com.intellij.ui.popup.PopupFactoryImpl;
import com.intellij.util.Consumer;

Expand All @@ -49,19 +48,15 @@
*
* @author Kirill Likhodedov, Opher Vishnia, Alexander von Bremen-Kühne
*/
public class GitflowWidget extends EditorBasedWidget implements StatusBarWidget.MultipleTextValuesPresentation,
StatusBarWidget.Multiframe,
GitRepositoryChangeListener {
public class GitflowWidget extends GitBranchWidget implements GitRepositoryChangeListener {
private volatile String myText = "";
private volatile String myTooltip = "";
private final String myMaxString;

private GitflowActions actions;

public GitflowWidget(Project project) {
public GitflowWidget(@NotNull Project project) {
super(project);
project.getMessageBus().connect().subscribe(GitRepository.GIT_REPO_CHANGE, this);
myMaxString = "Git: Rebasing master";
updateAsync();
}

Expand Down Expand Up @@ -127,12 +122,6 @@ public String getSelectedValue() {
return myText;
}

@NotNull
@Override
public String getMaxValue() {
return myMaxString;
}

@Override
public String getTooltipText() {
return myTooltip;
Expand Down Expand Up @@ -170,8 +159,6 @@ private void update() {
return;
}

int maxLength = myMaxString.length() - 1; // -1, because there are arrows indicating that it is a popup

actions = new GitflowActions(project);

boolean hasGitflow = actions.hasGitflow();
Expand Down

0 comments on commit d375370

Please sign in to comment.