Merge remote-tracking branch 'origin/master'

This commit is contained in:
Roman Shevchenko
2015-06-29 15:13:49 +03:00
3 changed files with 10 additions and 5 deletions
+3 -1
View File
@@ -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)
@@ -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<String> sortMatching(final PrefixMatcher matcher, Collection<String> _names) {
ProgressManager.checkCanceled();
if (matcher.getPrefix().isEmpty()) {
return ContainerUtil.newLinkedHashSet(_names);
}
List<String> sorted = new ArrayList<String>();
for (String name : _names) {
@@ -89,7 +89,7 @@ class SearchEverywherePsiRenderer extends PsiElementListCellRenderer<PsiElement>
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;
@@ -148,7 +148,7 @@ class SearchEverywherePsiRenderer extends PsiElementListCellRenderer<PsiElement>
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<PsiElement>
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;
}