Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/intellij14.1' into intellij15
Browse files Browse the repository at this point in the history
# Conflicts:
#	gradle.properties
  • Loading branch information
uwolfer committed Dec 5, 2018
2 parents 663fcd6 + 2274e63 commit dbfc2b0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ideaVersion=IC-15.0.5
ijPluginRepoChannel=
downloadIdeaSources=false
version=1.1.0-142
version=1.1.1-142
javaVersion=1.6
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,14 @@ public void registerGerritPushTargetPanel(GerritPushTargetPanel gerritPushTarget
public void initialized() {
initialized = true;

if (gerritPushTargetPanels.size() == 1) {
String branchName = gerritPushTargetPanels.values().iterator().next();

Optional<String> gitReviewBranchName = getGitReviewBranchName();

branchTextField.setText(gitReviewBranchName.or(branchName));
}

// force a deferred update (changes are monitored only after full construction of dialog)
SwingUtilities.invokeLater(new Runnable() {
public void run() {
if (gerritPushTargetPanels.size() == 1) {
String branchName = gerritPushTargetPanels.values().iterator().next();
Optional<String> gitReviewBranchName = getGitReviewBranchName();
branchTextField.setText(gitReviewBranchName.or(branchName));
}
initDestinationBranch();
}
});
Expand All @@ -117,7 +114,8 @@ private Optional<String> getGitReviewBranchName() {
Optional<String> branchName = Optional.absent();

DataContext dataContext = DataManager.getInstance().getDataContextFromFocus().getResult();
Optional<Project> openedProject = Optional.fromNullable(CommonDataKeys.PROJECT.getData(dataContext));
Optional<Project> openedProject = dataContext != null ?
Optional.fromNullable(CommonDataKeys.PROJECT.getData(dataContext)) : Optional.<Project>absent();

if (openedProject.isPresent()) {
String gitReviewFilePath = Joiner.on(File.separator).join(
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
href="https://github.com/uwolfer/gerrit-intellij-plugin#pre-releases">
https://github.com/uwolfer/gerrit-intellij-plugin#pre-releases</a>.</li>
<li>1.1.1</li>
<ul>
<li>fix for push dialog which did not appear in some situations (fix for a recent change which is included in last release)</li>
</ul>
<li>1.1.0</li>
<ul>
<li>add support for Gerrit 2.15+ push options (wip, private, publish-comments, hashtag)</li>
Expand Down

0 comments on commit dbfc2b0

Please sign in to comment.