Merge remote-tracking branch 'origin/master'

This commit is contained in:
Ekaterina Tuzova
2014-10-24 18:26:53 +04:00
14 changed files with 153 additions and 156 deletions
@@ -42,9 +42,8 @@ public class CommitNode extends DefaultMutableTreeNode implements CustomRendered
@Override
public void render(@NotNull ColoredTreeCellRenderer renderer) {
new IssueLinkRenderer(myProject, renderer).appendTextWithLinks(getUserObject().getSubject(),
new SimpleTextAttributes(SimpleTextAttributes.STYLE_SMALLER,
renderer.getForeground()));
renderer.append(" ");
new IssueLinkRenderer(myProject, renderer).appendTextWithLinks(getUserObject().getSubject(), SimpleTextAttributes.REGULAR_ATTRIBUTES);
}
public String getTooltip() {
@@ -39,6 +39,7 @@ import com.intellij.util.ui.tree.TreeUtil;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import javax.swing.event.CellEditorListener;
import javax.swing.event.ChangeEvent;
import javax.swing.event.TreeSelectionEvent;
@@ -116,7 +117,9 @@ public class PushLog extends JPanel implements TypeSafeDataProvider {
}
}
};
myTree.setBorder(new EmptyBorder(2, 0, 0, 0)); //additional vertical indent
myTree.setEditable(true);
myTree.setHorizontalAutoScrollingEnabled(false);
myTree.setShowsRootHandles(root.getChildCount() > 1);
MyTreeCellEditor treeCellEditor = new MyTreeCellEditor();
myTree.setCellEditor(treeCellEditor);
@@ -458,6 +458,9 @@ public class BraceHighlightingHandler {
}
}
if (!scopeHighlighting) {
showScopeHint(lBrace.getStartOffset(), lBrace.getEndOffset());
}
@@ -57,8 +57,11 @@ import org.xmlpull.v1.XmlPullParserFactory;
import org.xmlpull.v1.XmlSerializer;
import javax.swing.*;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.io.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.ListIterator;
@@ -72,11 +75,10 @@ public class ConsoleHistoryController {
private static final Logger LOG = Logger.getInstance("com.intellij.execution.console.ConsoleHistoryController");
private final LanguageConsoleImpl myConsole;
private final AnAction myHistoryNext = new MyAction(true);
private final AnAction myHistoryPrev = new MyAction(false);
private final AnAction myHistoryNext = new MyAction(true, getKeystrokesUpDown(true));
private final AnAction myHistoryPrev = new MyAction(false, getKeystrokesUpDown(false));
private final AnAction myBrowseHistory = new MyBrowseAction();
private boolean myMultiline;
private boolean isStandardUpDownUsed = false;
private final ModelHelper myHelper;
private long myLastSaveStamp;
@@ -117,7 +119,6 @@ public class ConsoleHistoryController {
loadHistory(myHelper.getId());
}
configureActions();
isStandardUpDownUsed = checkIfStandardUpDownUsed();
myLastSaveStamp = getCurrentTimeStamp();
}
@@ -125,18 +126,13 @@ public class ConsoleHistoryController {
return getModel().getModificationCount() + myConsole.getEditorDocument().getModificationStamp();
}
private boolean checkIfStandardUpDownUsed() {
return isShortcutSetsIntersect(myHistoryNext.getShortcutSet(), getShortcutUpDown(true))
|| isShortcutSetsIntersect(myHistoryPrev.getShortcutSet(), getShortcutUpDown(false));
}
protected void configureActions() {
private void configureActions() {
EmptyAction.setupAction(myHistoryNext, "Console.History.Next", null);
EmptyAction.setupAction(myHistoryPrev, "Console.History.Previous", null);
EmptyAction.setupAction(myBrowseHistory, "Console.History.Browse", null);
if (!myMultiline) {
myHistoryNext.registerCustomShortcutSet(getShortcutUpDown(true), null);
myHistoryPrev.registerCustomShortcutSet(getShortcutUpDown(false), null);
addShortcuts(myHistoryNext, getShortcutUpDown(true));
addShortcuts(myHistoryPrev, getShortcutUpDown(false));
}
myHistoryNext.registerCustomShortcutSet(myHistoryNext.getShortcutSet(), myConsole.getCurrentEditor().getComponent());
myHistoryPrev.registerCustomShortcutSet(myHistoryPrev.getShortcutSet(), myConsole.getCurrentEditor().getComponent());
@@ -241,8 +237,12 @@ public class ConsoleHistoryController {
private class MyAction extends AnAction {
private final boolean myNext;
public MyAction(final boolean next) {
@NotNull
private final Collection<KeyStroke> myUpDownKeystrokes;
public MyAction(final boolean next, @NotNull Collection<KeyStroke> upDownKeystrokes) {
myNext = next;
myUpDownKeystrokes = upDownKeystrokes;
getTemplatePresentation().setVisible(false);
}
@@ -263,7 +263,16 @@ public class ConsoleHistoryController {
@Override
public void update(final AnActionEvent e) {
super.update(e);
e.getPresentation().setEnabled(!isStandardUpDownUsed || canMoveInEditor(myNext));
e.getPresentation().setEnabled(myMultiline || !isUpDownKey(e) || canMoveInEditor(myNext));
}
private boolean isUpDownKey(AnActionEvent e) {
final InputEvent event = e.getInputEvent();
if (!(event instanceof KeyEvent)) {
return false;
}
final KeyStroke keyStroke = KeyStroke.getKeyStrokeForEvent((KeyEvent)event);
return myUpDownKeystrokes.contains(keyStroke);
}
}
@@ -344,7 +353,7 @@ public class ConsoleHistoryController {
chooser.setSplitterOrientation(false);
chooser.setSelectedIndex(Math.max(getModel().getHistoryCursor(), 0));
chooser.show();
if (chooser.isOK()) {
if (chooser.isOK() && myConsole.getCurrentEditor().getComponent().isShowing()) {
setConsoleText(chooser.getSelectedText(), false, true);
}
}
@@ -516,18 +525,26 @@ public class ConsoleHistoryController {
return new CustomShortcutSet(KeyStroke.getKeyStroke(isUp ? KeyEvent.VK_UP : KeyEvent.VK_DOWN, 0));
}
private static boolean isShortcutSetsIntersect(ShortcutSet set1, ShortcutSet set2) {
final Shortcut[] shortcuts1 = set1.getShortcuts();
final Shortcut[] shortcuts2 = set2.getShortcuts();
private static void addShortcuts(@NotNull AnAction action, @NotNull ShortcutSet newShortcuts) {
if (action.getShortcutSet().getShortcuts().length == 0) {
action.registerCustomShortcutSet(newShortcuts, null);
}
else {
action.registerCustomShortcutSet(new CompositeShortcutSet(action.getShortcutSet(), newShortcuts), null);
}
}
for (Shortcut s1 : shortcuts1) {
for (Shortcut s2 : shortcuts2) {
if (s1.equals(s2)) {
return true;
}
private static Collection<KeyStroke> getKeystrokesUpDown(boolean isUp) {
Collection<KeyStroke> result = new ArrayList<KeyStroke>();
final ShortcutSet shortcutSet = getShortcutUpDown(isUp);
for (Shortcut shortcut : shortcutSet.getShortcuts()) {
if (shortcut.isKeyboard() && ((KeyboardShortcut)shortcut).getSecondKeyStroke() == null) {
result.add(((KeyboardShortcut)shortcut).getFirstKeyStroke());
}
}
return false;
return result;
}
}
@@ -198,12 +198,15 @@ public class DuplexConsoleView<S extends ConsoleView, T extends ConsoleView> ext
public AnAction[] createConsoleActions() {
List<AnAction> actions = Lists.newArrayList();
actions.addAll(Arrays.asList(myPrimaryConsoleView.createConsoleActions()));
actions.add(mySwitchConsoleAction);
addExtraActions(actions);
return ArrayUtil.toObjectArray(actions, AnAction.class);
}
protected void addExtraActions(List<AnAction> actions) {
}
@Override
public void allowHeavyFilters() {
myPrimaryConsoleView.allowHeavyFilters();
@@ -1810,7 +1810,7 @@ public class ProjectViewImpl extends ProjectView implements PersistentStateCompo
pane.installComparator();
}
private class ManualOrderAction extends ToggleAction {
private class ManualOrderAction extends ToggleAction implements DumbAware {
private ManualOrderAction() {
super(IdeBundle.message("action.manual.order"), IdeBundle.message("action.manual.order"), AllIcons.ObjectBrowser.Sorted);
}
@@ -1834,7 +1834,7 @@ public class ProjectViewImpl extends ProjectView implements PersistentStateCompo
}
}
private class SortByTypeAction extends ToggleAction {
private class SortByTypeAction extends ToggleAction implements DumbAware {
private SortByTypeAction() {
super(IdeBundle.message("action.sort.by.type"), IdeBundle.message("action.sort.by.type"), AllIcons.ObjectBrowser.SortByType);
}
@@ -1857,7 +1857,7 @@ public class ProjectViewImpl extends ProjectView implements PersistentStateCompo
}
}
private class FoldersAlwaysOnTopAction extends ToggleAction {
private class FoldersAlwaysOnTopAction extends ToggleAction implements DumbAware {
private FoldersAlwaysOnTopAction() {
super("Folders Always on Top");
}
@@ -2562,7 +2562,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
}
private VisualPosition getSelectionStartPosition() {
private VisualPosition getSelectionStartPositionForPaint() {
if (mySelectionStartPosition == null) {
// We cache the value to avoid repeated invocations of Editor.logicalPositionToOffset which is currently slow for long lines
mySelectionStartPosition = getSelectionModel().getSelectionStartPosition();
@@ -2570,7 +2570,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
return mySelectionStartPosition;
}
private VisualPosition getSelectionEndPosition() {
private VisualPosition getSelectionEndPositionForPaint() {
if (mySelectionEndPosition == null) {
// We cache the value to avoid repeated invocations of Editor.logicalPositionToOffset which is currently slow for long lines
mySelectionEndPosition = getSelectionModel().getSelectionEndPosition();
@@ -2599,8 +2599,8 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
@JdkConstants.FontStyle int fontType) {
// There is a possible case that the user performed selection at soft wrap virtual space. We need to paint corresponding background
// there then.
VisualPosition selectionStartPosition = getSelectionStartPosition();
VisualPosition selectionEndPosition = getSelectionEndPosition();
VisualPosition selectionStartPosition = getSelectionStartPositionForPaint();
VisualPosition selectionEndPosition = getSelectionEndPositionForPaint();
if (selectionStartPosition.equals(selectionEndPosition)) {
return;
}
@@ -2660,8 +2660,8 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
@NotNull SoftWrap softWrap) {
// There is a possible case that the user performed selection at soft wrap virtual space. We need to paint corresponding background
// there then.
VisualPosition selectionStartPosition = getSelectionStartPosition();
VisualPosition selectionEndPosition = getSelectionEndPosition();
VisualPosition selectionStartPosition = getSelectionStartPositionForPaint();
VisualPosition selectionEndPosition = getSelectionEndPositionForPaint();
if (selectionStartPosition.equals(selectionEndPosition)) {
return;
}
@@ -33,7 +33,6 @@ import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Pair;
import com.intellij.openapi.vfs.*;
import com.intellij.openapi.wm.ToolWindowManager;
import com.intellij.util.xmlb.annotations.Transient;
import gnu.trove.THashSet;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -145,11 +144,7 @@ public class IdeDocumentHistoryImpl extends IdeDocumentHistory implements Projec
}
public static class RecentlyChangedFilesState {
@Transient private final List<String> CHANGED_PATHS = new ArrayList<String>();
public List<String> getChangedFiles() {
return CHANGED_PATHS;
}
public List<String> CHANGED_PATHS = new ArrayList<String>();
public void register(VirtualFile file) {
final String path = file.getPath();
@@ -296,7 +291,7 @@ public class IdeDocumentHistoryImpl extends IdeDocumentHistory implements Projec
List<VirtualFile> files = new ArrayList<VirtualFile>();
final LocalFileSystem lfs = LocalFileSystem.getInstance();
final List<String> paths = myRecentlyChangedFiles.getChangedFiles();
final List<String> paths = myRecentlyChangedFiles.CHANGED_PATHS;
for (String path : paths) {
final VirtualFile file = lfs.findFileByPath(path);
if (file != null) {
@@ -21,6 +21,7 @@ import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.application.ApplicationInfo;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.options.BaseConfigurable;
import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.options.ConfigurationException;
import com.intellij.openapi.options.SearchableConfigurable;
import com.intellij.openapi.project.Project;
@@ -36,7 +37,7 @@ import java.awt.event.ActionListener;
/**
* @author pti
*/
public class UpdateSettingsConfigurable extends BaseConfigurable implements SearchableConfigurable {
public class UpdateSettingsConfigurable extends BaseConfigurable implements SearchableConfigurable, Configurable.NoScroll {
private UpdatesSettingsPanel myUpdatesSettingsPanel;
private boolean myCheckNowEnabled = true;
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.openapi.updateSettings.impl.UpdateSettingsConfigurable.UpdatesSettingsPanel">
<grid id="5aa87" binding="myPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="5aa87" binding="myPanel" layout-manager="GridLayoutManager" row-count="6" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="62" y="37" width="816" height="434"/>
@@ -8,133 +8,105 @@
<properties/>
<border type="none"/>
<children>
<hspacer id="e5897">
<component id="fd85b" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="0" height="-1"/>
<preferred-size width="0" height="-1"/>
<maximum-size width="0" height="-1"/>
</grid>
<grid row="0" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
<vspacer id="3d6db">
<properties>
<text resource-bundle="messages/IdeBundle" key="updates.settings.caption.1"/>
</properties>
</component>
<grid id="e409a" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="10" left="0" bottom="20" right="0"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<grid id="6cede" layout-manager="GridLayoutManager" row-count="5" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="1" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="8" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="db163" class="javax.swing.JLabel">
<component id="1aa0e" class="javax.swing.JCheckBox" binding="myCbCheckForUpdates">
<constraints>
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<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 resource-bundle="messages/IdeBundle" key="updates.settings.last.check"/>
<selected value="true"/>
<text resource-bundle="messages/IdeBundle" key="updates.settings.checkbox"/>
</properties>
</component>
<component id="36fbb" class="javax.swing.JLabel">
<component id="cc207" class="javax.swing.JButton" binding="myBtnCheckNow">
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="0" column="2" 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 resource-bundle="messages/IdeBundle" key="updates.settings.current.version"/>
<text resource-bundle="messages/IdeBundle" key="updates.settings.check.now.button"/>
</properties>
</component>
<component id="bd9c5" class="javax.swing.JLabel" binding="myVersionNumber">
<component id="8eae8" class="javax.swing.JComboBox" binding="myUpdateChannelsBox">
<constraints>
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="4.5.4"/>
</properties>
</component>
<component id="b6709" class="javax.swing.JLabel" binding="myBuildNumber">
<constraints>
<grid row="3" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="3352"/>
</properties>
</component>
<component id="6af7e" class="javax.swing.JLabel">
<constraints>
<grid row="3" column="2" 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 resource-bundle="messages/IdeBundle" key="updates.settings.build.number"/>
</properties>
</component>
<component id="6b5cb" class="javax.swing.JLabel" binding="myLastCheckedDate">
<constraints>
<grid row="4" column="1" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="01.05.2005"/>
</properties>
</component>
<vspacer id="dad57">
<constraints>
<grid row="2" column="3" row-span="1" col-span="1" vsize-policy="2" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false">
<minimum-size width="-1" height="20"/>
<preferred-size width="-1" height="20"/>
<maximum-size width="-1" height="20"/>
</grid>
</constraints>
</vspacer>
<component id="fd85b" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="4" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/IdeBundle" key="updates.settings.caption.1"/>
</properties>
</component>
<grid id="e409a" layout-manager="GridLayoutManager" row-count="1" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="10" left="0" bottom="0" right="0"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="1aa0e" class="javax.swing.JCheckBox" binding="myCbCheckForUpdates">
<constraints>
<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>
<selected value="true"/>
<text resource-bundle="messages/IdeBundle" key="updates.settings.checkbox"/>
</properties>
</component>
<hspacer id="c4fcd">
<constraints>
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
<component id="cc207" class="javax.swing.JButton" binding="myBtnCheckNow">
<constraints>
<grid row="0" column="3" 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 resource-bundle="messages/IdeBundle" key="updates.settings.check.now.button"/>
</properties>
</component>
<component id="8eae8" class="javax.swing.JComboBox" binding="myUpdateChannelsBox">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
</component>
</children>
</grid>
</component>
</children>
</grid>
<component id="36fbb" class="javax.swing.JLabel">
<constraints>
<grid row="2" 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 resource-bundle="messages/IdeBundle" key="updates.settings.current.version"/>
</properties>
</component>
<component id="bd9c5" class="javax.swing.JLabel" binding="myVersionNumber">
<constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="4.5.4"/>
</properties>
</component>
<component id="6af7e" class="javax.swing.JLabel">
<constraints>
<grid row="3" 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 resource-bundle="messages/IdeBundle" key="updates.settings.build.number"/>
</properties>
</component>
<component id="b6709" class="javax.swing.JLabel" binding="myBuildNumber">
<constraints>
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="3352"/>
</properties>
</component>
<component id="db163" class="javax.swing.JLabel">
<constraints>
<grid row="4" 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 resource-bundle="messages/IdeBundle" key="updates.settings.last.check"/>
</properties>
</component>
<component id="6b5cb" class="javax.swing.JLabel" binding="myLastCheckedDate">
<constraints>
<grid row="4" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="01.05.2005"/>
</properties>
</component>
<hspacer id="fdc69">
<constraints>
<grid row="4" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
<vspacer id="3d6db">
<constraints>
<grid row="5" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
</children>
</grid>
</form>
@@ -928,7 +928,7 @@ updates.settings.caption.1=<html>$FULLNAME$ can automatically check for new and
updates.settings.check.now.button=&Check Now
updates.settings.checkbox=Check for updates in channel
updates.settings.build.number= Build number:
updates.settings.current.version=Current $FULLNAME$ version\:
updates.settings.current.version=Current version\:
updates.settings.last.check=Last checked for updates:
hierarchy.method.next.occurence.name=Go to next method
@@ -76,7 +76,7 @@ class MultilinePopupBuilder {
ComponentPopupBuilder builder = JBPopupFactory.getInstance().createComponentPopupBuilder(panel, myTextField)
.setCancelOnClickOutside(true)
.setAdText(KeymapUtil.getShortcutsText(CommonShortcuts.CTRL_ENTER.getShortcuts()) + " to finish")
.setMovable(true)
.setMayBeParent(true)
.setRequestFocus(true)
.setResizable(true)
.setMayBeParent(true);
@@ -16,6 +16,7 @@
package git4idea.validators;
import com.intellij.openapi.ui.InputValidator;
import com.intellij.openapi.util.text.StringUtil;
import java.util.regex.Pattern;
@@ -58,7 +59,7 @@ public final class GitRefNameValidator implements InputValidator {
@Override
public boolean checkInput(String inputString) {
return !ILLEGAL.matcher(inputString).find();
return !StringUtil.isEmptyOrSpaces(inputString) && !ILLEGAL.matcher(inputString).find();
}
@Override
@@ -57,7 +57,8 @@ public class GitRefNameValidatorTest {
{ "HIERARCHY", "user/branch" },
{ "HIERARCHY_2", "user/branch/sub_branch" },
{ "BEGINS_WITH_SLASH", "/branch" }, // actual branch name will be with trimmed slash
{ "NON_CONS_DOTS", "complex.branch.name" }
{ "NON_CONS_DOTS", "complex.branch.name" },
{ "GERRIT_PATTERN", "refs/for/master%topic=my-cool-feature,r=some-reviewer"}
};
}
@@ -70,7 +71,9 @@ public class GitRefNameValidatorTest {
{ "ENDS_WITH_LOCK", "branch.lock" },
{ "TWO_DOTS_1", "branch..name" },
{ "TWO_DOTS_2", "..name" },
{ "TWO_DOTS_3", "..branch" }
{ "TWO_DOTS_3", "..branch" },
{ "EMPTY", ""},
{ "SPACES", " "}
};
}