Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/intellij15' into intellij2016.2
Browse files Browse the repository at this point in the history
# Conflicts:
#	gradle.properties
  • Loading branch information
uwolfer committed Jan 7, 2018
2 parents 5c69586 + c2ec777 commit 7db4a41
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 35 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ Unofficial [IntelliJ Platform](http://www.jetbrains.com/idea/) plugin for the
* Android Studio
* DataGrip
* CLion
* Gogland
* GoLand
* Rider
* MPS

*Compiled with Java 1.6*

Expand Down Expand Up @@ -135,6 +136,7 @@ Credits
------
* IntelliJ Github plugin (some code of this plugin is based on its code)

Thanks to [JetBrains](https://www.jetbrains.com/) for providing a free licence for developing this project.

Donations
--------
Expand All @@ -147,7 +149,7 @@ Please only use the link from github.com/uwolfer/gerrit-intellij-plugin to verif
Copyright and license
--------------------

Copyright 2013 - 2017 Urs Wolfer
Copyright 2013 - 2018 Urs Wolfer

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this work except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

plugins {
id 'org.jetbrains.intellij' version '0.2.16'
id 'org.jetbrains.intellij' version '0.2.17'
}

apply plugin: 'java'
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-2016.2.5
ijPluginRepoChannel=
downloadIdeaSources=false
version=1.0.4-146
version=1.0.5-146
javaVersion=1.8
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip
26 changes: 17 additions & 9 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
Expand Down Expand Up @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand Down Expand Up @@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
6 changes: 0 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ goto fail
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
Expand All @@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="URL:"/>
<text value="Web-URL:"/>
</properties>
</component>
<component id="f5630" class="javax.swing.JTextField" binding="hostTextField">
<component id="f5630" class="com.intellij.ui.components.JBTextField" binding="hostTextField">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package com.urswolfer.intellij.plugin.gerrit.ui;

import com.intellij.ui.DocumentAdapter;
import com.intellij.ui.components.JBTextField;
import com.intellij.util.ui.UIUtil;

import javax.swing.*;
Expand All @@ -35,16 +36,18 @@
*/
public class LoginPanel {
public static final String LOGIN_CREDENTIALS_INFO =
"* If logging in with your normal Gerrit login credentials fails, you need to set a HTTP access password" +
"* If login in with your usual Gerrit login credentials fails, you need to set a HTTP access password" +
" for your account in the Gerrit Web Application (Settings > HTTP Password).";

private JPanel pane;
private JTextField hostTextField;
private JBTextField hostTextField;
private JTextField loginTextField;
private JPasswordField passwordField;
private JTextPane gerritLoginInfoTestField;

public LoginPanel(final LoginDialog dialog) {
hostTextField.getEmptyText().setText("https://review.example.org");

hostTextField.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="URL:"/>
<text value="Web-URL:"/>
</properties>
</component>
<component id="3352a" class="javax.swing.JTextField" binding="hostTextField">
<component id="3352a" class="com.intellij.ui.components.JBTextField" binding="hostTextField">
<constraints>
<grid row="0" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.ui.EnumComboBoxModel;
import com.intellij.ui.GuiUtils;
import com.intellij.ui.components.JBTextField;
import com.urswolfer.gerrit.client.rest.GerritAuthData;
import com.urswolfer.intellij.plugin.gerrit.GerritSettings;
import com.urswolfer.intellij.plugin.gerrit.rest.GerritUtil;
Expand All @@ -49,7 +50,7 @@ public class SettingsPanel {
private JTextPane gerritLoginInfoTextField;
private JPanel loginPane;
private JButton testButton;
private JTextField hostTextField;
private JBTextField hostTextField;
private JSpinner refreshTimeoutSpinner;
private JPanel settingsPane;
private JPanel pane;
Expand All @@ -72,6 +73,8 @@ public class SettingsPanel {
private Logger log;

public SettingsPanel() {
hostTextField.getEmptyText().setText("https://review.example.org");

gerritLoginInfoTextField.setText(LoginPanel.LOGIN_CREDENTIALS_INFO);
gerritLoginInfoTextField.setBackground(pane.getBackground());
testButton.addActionListener(new ActionListener() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public enum ShowProjectColumn {
ALWAYS("Always"),
AUTO("Automatic (if multiple git repositories)"),
AUTO("Auto (when multiple Git repositories available)"),
NEVER("Never");

ShowProjectColumn(String label) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ public static Comment.Range textOffsetToRange(CharSequence charsSequence, int st
int startOffset = -1;
int endLine = 1;
int endOffset = -1;
CharSequenceReader charSequenceReader = new CharSequenceReader(charsSequence);
try {
BufferedReader reader = new BufferedReader(new CharSequenceReader(charsSequence));
BufferedReader reader = new BufferedReader(charSequenceReader);
String lineString;
int currentCharCount = 0;
while ((lineString = reader.readLine()) != null) {
Expand All @@ -58,6 +59,8 @@ public static Comment.Range textOffsetToRange(CharSequence charsSequence, int st
}
} catch (IOException e) {
throw Throwables.propagate(e);
} finally {
charSequenceReader.close();
}

Comment.Range range = new Comment.Range();
Expand All @@ -71,8 +74,9 @@ public static Comment.Range textOffsetToRange(CharSequence charsSequence, int st
public static Offset rangeToTextOffset(CharSequence charsSequence, Comment.Range range) {
int startOffset = 0;
int endOffset = 0;
CharSequenceReader charSequenceReader = new CharSequenceReader(charsSequence);
try {
BufferedReader reader = new BufferedReader(new CharSequenceReader(charsSequence));
BufferedReader reader = new BufferedReader(charSequenceReader);
String line;
int textLineCount = 1;
while ((line = reader.readLine()) != null) {
Expand All @@ -90,17 +94,19 @@ public static Offset rangeToTextOffset(CharSequence charsSequence, Comment.Range
}
} catch (IOException e) {
throw Throwables.propagate(e);
} finally {
charSequenceReader.close();
}
startOffset += range.startCharacter;
endOffset += range.endCharacter;
return new Offset(startOffset, endOffset);
}

public static class Offset {
public int start;
public int end;
static class Offset {
final int start;
final int end;

public Offset(int start, int end) {
Offset(int start, int end) {
this.start = start;
this.end = end;
}
Expand Down
7 changes: 6 additions & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@
href="https://github.com/uwolfer/gerrit-intellij-plugin#pre-releases">
https://github.com/uwolfer/gerrit-intellij-plugin#pre-releases</a>.</li>
<li>1.0.5</li>
<ul>
<li>improved labels and documentation for improved usability</li>
<li>minor fixes and improvements</li>
</ul>
<li>1.0.4</li>
<ul>
<li>optimize checkout: display smart file checkout dialog when required</li>
Expand Down Expand Up @@ -216,7 +221,7 @@
<li>0.9.5</li>
<ul>
<li>new action to add reviewers to a change</li>
<li>support for LDAP authentication (when logging in happens with a HTML form)</li>
<li>support for LDAP authentication (when login in happens with a HTML form)</li>
<li>fix authentication when HTTP digest method is used</li>
<li>fix branch filter for some project setups</li>
<li>many minor fixes and improvements</li>
Expand Down

0 comments on commit 7db4a41

Please sign in to comment.