mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
+1
-1
@@ -701,7 +701,7 @@ public class AnnotationsHighlightUtil {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static RetentionPolicy getRetentionPolicy(PsiClass annotation) {
|
||||
public static RetentionPolicy getRetentionPolicy(@NotNull PsiClass annotation) {
|
||||
PsiModifierList modifierList = annotation.getModifierList();
|
||||
if (modifierList != null) {
|
||||
PsiAnnotation retentionAnno = modifierList.findAnnotation(CommonClassNames.JAVA_LANG_ANNOTATION_RETENTION);
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class SegmentArrayWithData extends SegmentArray {
|
||||
}
|
||||
|
||||
public void setElementAt(int i, int startOffset, int endOffset, int data) {
|
||||
if (data < 0 && data > Short.MAX_VALUE) throw new IndexOutOfBoundsException("data out of short range" + data);
|
||||
if (data < 0 || data > Short.MAX_VALUE) throw new IndexOutOfBoundsException("data out of short range" + data);
|
||||
setElementAt(i, startOffset, endOffset);
|
||||
myData = reallocateArray(myData, i+1);
|
||||
myData[i] = (short)data;
|
||||
|
||||
+1
-1
@@ -349,7 +349,7 @@ public abstract class AbstractColorsScheme implements EditorColorsScheme {
|
||||
attr.setErrorStripeColor(defaultColor);
|
||||
}
|
||||
}
|
||||
private static final Map<String, Color> DEFAULT_ERROR_STRIPE_COLOR = new THashMap<String, Color>();
|
||||
public static final Map<String, Color> DEFAULT_ERROR_STRIPE_COLOR = new THashMap<String, Color>();
|
||||
static {
|
||||
DEFAULT_ERROR_STRIPE_COLOR.put(CodeInsightColors.ERRORS_ATTRIBUTES.getExternalName(), Color.red);
|
||||
DEFAULT_ERROR_STRIPE_COLOR.put(CodeInsightColors.WRONG_REFERENCES_ATTRIBUTES.getExternalName(), Color.red);
|
||||
|
||||
@@ -46,6 +46,9 @@ public class UrlClassLoader extends ClassLoader {
|
||||
@NonNls static final String CLASS_EXTENSION = ".class";
|
||||
|
||||
static {
|
||||
// Since Java 7 classloading is parallel on parallel capable classloader (http://docs.oracle.com/javase/7/docs/technotes/guides/lang/cl-mt.html)
|
||||
// Parallel classloading avoids deadlocks like https://youtrack.jetbrains.com/issue/IDEA-131621
|
||||
// Unless explicitly disabled, request parallel loading capability via reflection due to current platform's Java 6 baseline
|
||||
// todo[r.sh] drop condition in IDEA 15
|
||||
// todo[r.sh] drop reflection after migrating to Java 7+
|
||||
boolean parallelLoader = Boolean.parseBoolean(System.getProperty("idea.parallel.class.loader", "true"));
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 955 B |
@@ -13,7 +13,7 @@ public class StudyIcons {
|
||||
return IconLoader.getIcon(path, StudyIcons.class);
|
||||
}
|
||||
|
||||
public static final Icon EducationalProjectType = load("/icons/com/jetbrains/python/edu/EducationalProjectType.png"); // 32x32
|
||||
public static final Icon EducationalProjectType = load("/icons/com/jetbrains/python/edu/EducationalProjectType.png"); // 16x16
|
||||
public static final Icon Lesson = load("/icons/com/jetbrains/python/edu/Lesson.png"); // 16x16
|
||||
public static final Icon LessonCompl = load("/icons/com/jetbrains/python/edu/LessonCompl.png"); // 16x16
|
||||
public static final Icon Prev = load("/icons/com/jetbrains/python/edu/prev.png"); // 16x16
|
||||
|
||||
@@ -1190,7 +1190,23 @@ public class PyClassImpl extends PyBaseElementImpl<PyClassStub> implements PyCla
|
||||
continue;
|
||||
}
|
||||
final PyType type = context.getType(expression);
|
||||
result.add(type instanceof PyClassLikeType ? (PyClassLikeType)type : null);
|
||||
PyClassLikeType classLikeType = null;
|
||||
if (type instanceof PyClassLikeType) {
|
||||
classLikeType = (PyClassLikeType)type;
|
||||
}
|
||||
else {
|
||||
final PsiReference ref = expression.getReference();
|
||||
if (ref != null) {
|
||||
final PsiElement resolved = ref.resolve();
|
||||
if (resolved instanceof PyClass) {
|
||||
final PyType resolvedType = context.getType((PyClass)resolved);
|
||||
if (resolvedType instanceof PyClassLikeType) {
|
||||
classLikeType = (PyClassLikeType)resolvedType;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
result.add(classLikeType);
|
||||
}
|
||||
}
|
||||
final PyBuiltinCache builtinCache = PyBuiltinCache.getInstance(this);
|
||||
|
||||
Reference in New Issue
Block a user