From 286f7d72a53abf353f6906108d3ef57b863760e8 Mon Sep 17 00:00:00 2001 From: Alexander Zolotov Date: Mon, 29 Jun 2015 14:49:50 +0300 Subject: [PATCH 1/4] Search everywhere: do not put space inside parens --- .../com/intellij/ide/actions/SearchEverywherePsiRenderer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/ide/actions/SearchEverywherePsiRenderer.java b/platform/lang-impl/src/com/intellij/ide/actions/SearchEverywherePsiRenderer.java index c175135417be..5b37138a97a8 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/SearchEverywherePsiRenderer.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/SearchEverywherePsiRenderer.java @@ -89,7 +89,7 @@ class SearchEverywherePsiRenderer extends PsiElementListCellRenderer if (in) text = text.substring(3); final FontMetrics fm = myList.getFontMetrics(myList.getFont()); final int maxWidth = myList.getWidth() - fm.stringWidth(name) - 16 - myRightComponentWidth - 20; - String left = "(" + (in ? "in " : " "); + String left = in ? "(in " : "("; String right = ")"; if (fm.stringWidth(left + text + right) < maxWidth) return left + text + right; From f53b63c24ce87776f251c741446b5c4951760096 Mon Sep 17 00:00:00 2001 From: Alexander Zolotov Date: Mon, 29 Jun 2015 14:51:36 +0300 Subject: [PATCH 2/4] Get rid of yellow code --- .../com/intellij/ide/actions/SearchEverywherePsiRenderer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/ide/actions/SearchEverywherePsiRenderer.java b/platform/lang-impl/src/com/intellij/ide/actions/SearchEverywherePsiRenderer.java index 5b37138a97a8..2b41c5b71f8a 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/SearchEverywherePsiRenderer.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/SearchEverywherePsiRenderer.java @@ -148,7 +148,7 @@ class SearchEverywherePsiRenderer extends PsiElementListCellRenderer SimpleTextAttributes nameAttributes = attributes != null ? SimpleTextAttributes.fromTextAttributes(attributes) : null; Color color = list.getForeground(); - if (nameAttributes == null) nameAttributes = new SimpleTextAttributes(Font.PLAIN, color); + if (nameAttributes == null) nameAttributes = new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, color); renderer.append(item + " ", nameAttributes); ItemPresentation itemPresentation = item.getPresentation(); @@ -157,7 +157,7 @@ class SearchEverywherePsiRenderer extends PsiElementListCellRenderer String locationString = itemPresentation.getLocationString(); if (!StringUtil.isEmpty(locationString)) { - renderer.append(locationString, new SimpleTextAttributes(Font.PLAIN, JBColor.GRAY)); + renderer.append(locationString, new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, JBColor.GRAY)); } return true; } From 89de091a89affda2207c675cfa5a2812bc4fd25f Mon Sep 17 00:00:00 2001 From: Alexander Zolotov Date: Mon, 29 Jun 2015 14:53:16 +0300 Subject: [PATCH 3/4] Do not sort completion variants using matcher with empty prefix --- .../com/intellij/codeInsight/completion/CompletionUtil.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/completion/CompletionUtil.java b/platform/lang-impl/src/com/intellij/codeInsight/completion/CompletionUtil.java index 46ea7dabbabb..b2817b0786e4 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/completion/CompletionUtil.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/completion/CompletionUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -256,6 +256,9 @@ public class CompletionUtil { public static LinkedHashSet sortMatching(final PrefixMatcher matcher, Collection _names) { ProgressManager.checkCanceled(); + if (matcher.getPrefix().isEmpty()) { + return ContainerUtil.newLinkedHashSet(_names); + } List sorted = new ArrayList(); for (String name : _names) { From 2c778aecb030b5f97ae2c6e23f27e319baf421ae Mon Sep 17 00:00:00 2001 From: nik Date: Mon, 29 Jun 2015 14:57:48 +0300 Subject: [PATCH 4/4] fixed updating IDEA CE from IDEA UE sources --- build/scripts/layouts.gant | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/scripts/layouts.gant b/build/scripts/layouts.gant index a8d23b4de88b..7d8cc30070c0 100644 --- a/build/scripts/layouts.gant +++ b/build/scripts/layouts.gant @@ -18,7 +18,9 @@ import static org.jetbrains.jps.idea.IdeaProjectLoader.guessHome includeTargets << new File("${guessHome(this)}/build/scripts/utils.gant") target('default': "Developers update") { - loadProjectFromPath(home) + //when IDEA CE is updated from IDEA UE sources project should be loaded from IDEA UE directory + String projectHome = isDefined("devIdeaHome") ? devIdeaHome : home + loadProjectFromPath(projectHome) def patchedDescriptorDir = patchAppDescriptor(deploy) layoutFull(home, deploy, patchedDescriptorDir) ant.delete(dir: patchedDescriptorDir)