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 Jun 3, 2020
2 parents f01d677 + 86374df commit 1bbb93d
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 20 deletions.
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
os: linux
dist: trusty
sudo: false
language: java
jdk:
- oraclejdk8
Expand All @@ -11,10 +11,7 @@ cache:
- $HOME/.gradle/wrapper/
deploy:
provider: releases
api_key:
secure: "${GITHUB_KEY}"
skip_cleanup: true
file_glob: true
edge: true
file: "build/distributions/gerrit-intellij-plugin-*.zip"
on:
tags: true
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ dependencies {
compile ('com.google.inject.extensions:guice-multibindings:4.1.0') {
exclude group: 'com.google.guava', module: 'guava'
}
compile ('com.urswolfer.gerrit.client.rest:gerrit-rest-java-client:0.8.16') {
compile ('com.urswolfer.gerrit.client.rest:gerrit-rest-java-client:0.9.2') {
exclude group: 'com.google.code.gson', module: 'gson'
exclude group: 'com.google.guava', module: 'guava'
exclude group: 'commons-logging', module: 'commons-logging'
Expand Down
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.2.1-142
version=1.2.2-142
javaVersion=1.6
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
package com.urswolfer.intellij.plugin.gerrit.ui;


import static java.lang.Boolean.TRUE;
import static javax.swing.JEditorPane.HONOR_DISPLAY_PROPERTIES;

import com.google.common.collect.Lists;
import com.google.gerrit.extensions.common.AccountInfo;
import com.google.gerrit.extensions.common.ApprovalInfo;
Expand Down Expand Up @@ -52,7 +55,6 @@ public class GerritChangeDetailsPanel {
private static final String NOTHING_SELECTED = "nothingSelected";
private static final String LOADING = "loading";
private static final String DATA = "data";
private static final String MULTIPLE_SELECTED = "multiple_selected";
private static final ThreadLocal<DecimalFormat> APPROVAL_VALUE_FORMAT = new ThreadLocal<DecimalFormat>() {
@Override
protected DecimalFormat initialValue() {
Expand All @@ -70,16 +72,17 @@ public GerritChangeDetailsPanel(final Project project) {
panel = new JPanel(new CardLayout());
panel.add(UIVcsUtil.errorPanel("Nothing selected", false), NOTHING_SELECTED);
panel.add(UIVcsUtil.errorPanel("Loading...", false), LOADING);
panel.add(UIVcsUtil.errorPanel("Several commits selected", false), MULTIPLE_SELECTED);

presentationData = new MyPresentationData(project);

final JPanel wrapper = new JPanel(new BorderLayout());

// could be ported to com.intellij.util.ui.HtmlPanel once minimal IntelliJ version is bumped
jEditorPane = new JEditorPane(UIUtil.HTML_MIME, "");
jEditorPane.setPreferredSize(new Dimension(150, 100));
jEditorPane.setEditable(false);
jEditorPane.setBackground(UIUtil.getComboBoxDisabledBackground());
jEditorPane.setOpaque(false);
jEditorPane.putClientProperty(HONOR_DISPLAY_PROPERTIES, TRUE);
jEditorPane.addHyperlinkListener(new HyperlinkListener() {
@Override
public void hyperlinkUpdate(HyperlinkEvent e) {
Expand All @@ -89,17 +92,10 @@ public void hyperlinkUpdate(HyperlinkEvent e) {

final JBScrollPane tableScroll = new JBScrollPane(jEditorPane);
tableScroll.setBorder(null);
jEditorPane.setBorder(null);
wrapper.add(tableScroll, SwingConstants.CENTER);
jEditorPane.setBackground(UIUtil.getTableBackground());
wrapper.setBackground(UIUtil.getTableBackground());

panel.add(wrapper, DATA);
((CardLayout) panel.getLayout()).show(panel, NOTHING_SELECTED);
}

public void severalSelected() {
((CardLayout) panel.getLayout()).show(panel, MULTIPLE_SELECTED);
nothingSelected();
}

public void nothingSelected() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;

/**
* @author Urs Wolfer
Expand All @@ -52,6 +50,7 @@ public class CommentForm extends JPanel {
private final String filePath;
private final Side commentSide;
private final Comment commentToEdit;
private final JCheckBox resolvedCheckBox;

private final EditorTextField reviewTextField;
private JBPopup balloon;
Expand All @@ -73,6 +72,8 @@ public CommentForm(Project project,
reviewTextField = safeHtmlTextEditor.getMessageField();
add(safeHtmlTextEditor);

resolvedCheckBox = new JCheckBox("Resolved");

addButtons();

reviewTextField.setPreferredSize(new Dimension(BALLOON_WIDTH, BALLOON_HEIGHT));
Expand All @@ -88,6 +89,7 @@ public void actionPerformed(ActionEvent e) {

if (commentToEdit != null) {
reviewTextField.setText(commentToEdit.message);
resolvedCheckBox.setSelected(!commentToEdit.unresolved);
}
}

Expand All @@ -104,6 +106,8 @@ public void actionPerformed(ActionEvent actionEvent) {
}
});

buttonPanel.add(resolvedCheckBox);

buttonPanel.add(Box.createHorizontalGlue());

JButton cancelButton = new JButton("Cancel");
Expand All @@ -129,6 +133,7 @@ private DraftInput createComment() {
comment.message = getText();
comment.path = PathUtils.ensureSlashSeparators(filePath);
comment.side = commentSide;
comment.unresolved = !resolvedCheckBox.isSelected();

SelectionModel selectionModel = editor.getSelectionModel();
if (selectionModel.hasSelection()) {
Expand Down
7 changes: 7 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,13 @@
href="https://github.com/uwolfer/gerrit-intellij-plugin#pre-releases">
https://github.com/uwolfer/gerrit-intellij-plugin#pre-releases</a>.</li>
<li>1.2.2</li>
<ul>
<li>add support for setting "resolved" flag in comments</li>
<li>fix authentication issues against GerritHub</li>
<li>fix change detail panel font color in Darcula color schema</li>
<li>minor fixes and improvements</li>
</ul>
<li>1.2.1</li>
<ul>
<li>fix compatibility with new IntelliJ APIs</li>
Expand Down

0 comments on commit 1bbb93d

Please sign in to comment.