mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 09:19:13 +07:00
Cleanup (formatting)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 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.
|
||||
@@ -19,7 +19,6 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -29,13 +28,12 @@ import org.jetbrains.annotations.Nullable;
|
||||
* @author dsl
|
||||
*/
|
||||
public class PsiWildcardType extends PsiType.Stub {
|
||||
public static final String EXTENDS_PREFIX = "? extends ";
|
||||
public static final String SUPER_PREFIX = "? super ";
|
||||
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.psi.PsiWildcardType");
|
||||
|
||||
private static final Key<PsiWildcardType> UNBOUNDED_WILDCARD = new Key<PsiWildcardType>("UNBOUNDED_WILDCARD");
|
||||
@NonNls private static final String EXTENDS_PREFIX = "? extends ";
|
||||
@NonNls private static final String SUPER_PREFIX = "? super ";
|
||||
|
||||
@NotNull
|
||||
private final PsiManager myManager;
|
||||
private final boolean myIsExtending;
|
||||
private final PsiType myBound;
|
||||
@@ -138,14 +136,17 @@ public class PsiWildcardType extends PsiType.Stub {
|
||||
|
||||
@Override
|
||||
public boolean equalsToText(@NotNull String text) {
|
||||
if (myBound == null) return "?".equals(text);
|
||||
if (myIsExtending) {
|
||||
if (myBound == null) {
|
||||
return "?".equals(text);
|
||||
}
|
||||
else if (myIsExtending) {
|
||||
return text.startsWith(EXTENDS_PREFIX) && myBound.equalsToText(text.substring(EXTENDS_PREFIX.length()));
|
||||
}
|
||||
else {
|
||||
return text.startsWith(SUPER_PREFIX) && myBound.equalsToText(text.substring(SUPER_PREFIX.length()));
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public PsiManager getManager() {
|
||||
return myManager;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 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.
|
||||
@@ -26,16 +26,13 @@ import com.intellij.psi.impl.cache.TypeInfo;
|
||||
import com.intellij.psi.impl.source.PsiClassReferenceType;
|
||||
import com.intellij.psi.impl.source.tree.JavaElementType;
|
||||
import com.intellij.psi.impl.source.tree.TreeElement;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClsTypeElementImpl extends ClsElementImpl implements PsiTypeElement {
|
||||
@NonNls static final char VARIANCE_NONE = '\0';
|
||||
@NonNls static final char VARIANCE_EXTENDS = '+';
|
||||
@NonNls static final char VARIANCE_SUPER = '-';
|
||||
@NonNls static final char VARIANCE_INVARIANT = '*';
|
||||
@NonNls static final String VARIANCE_EXTENDS_PREFIX = "? extends ";
|
||||
@NonNls static final String VARIANCE_SUPER_PREFIX = "? super ";
|
||||
static final char VARIANCE_NONE = '\0';
|
||||
static final char VARIANCE_EXTENDS = '+';
|
||||
static final char VARIANCE_SUPER = '-';
|
||||
static final char VARIANCE_INVARIANT = '*';
|
||||
|
||||
private final PsiElement myParent;
|
||||
private final String myTypeText;
|
||||
@@ -85,9 +82,9 @@ public class ClsTypeElementImpl extends ClsElementImpl implements PsiTypeElement
|
||||
case VARIANCE_NONE:
|
||||
return shortClassName;
|
||||
case VARIANCE_EXTENDS:
|
||||
return VARIANCE_EXTENDS_PREFIX + shortClassName;
|
||||
return PsiWildcardType.EXTENDS_PREFIX + shortClassName;
|
||||
case VARIANCE_SUPER:
|
||||
return VARIANCE_SUPER_PREFIX + shortClassName;
|
||||
return PsiWildcardType.SUPER_PREFIX + shortClassName;
|
||||
case VARIANCE_INVARIANT:
|
||||
return "?";
|
||||
default:
|
||||
@@ -211,14 +208,14 @@ public class ClsTypeElementImpl extends ClsElementImpl implements PsiTypeElement
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiAnnotation findAnnotation(@NotNull @NonNls String qualifiedName) {
|
||||
public PsiAnnotation findAnnotation(@NotNull String qualifiedName) {
|
||||
return PsiImplUtil.findAnnotation(this, qualifiedName);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public PsiAnnotation addAnnotation(@NotNull @NonNls String qualifiedName) {
|
||||
throw new UnsupportedOperationException();//todo
|
||||
public PsiAnnotation addAnnotation(@NotNull String qualifiedName) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -99,6 +99,7 @@ illegal.generic.type.for.instanceof=Illegal generic type for instanceof
|
||||
cannot.select.dot.class.from.type.variable=Cannot select from a type variable
|
||||
method.does.not.override.super=Method does not override method from its superclass
|
||||
call.to.super.is.not.allowed.in.enum.constructor=Call to super is not allowed in enum constructor
|
||||
bad.qualifier.in.super.method.reference=Bad type qualifier in default super call: redundant interface {0} is extended by {1}
|
||||
vararg.not.last.parameter=Vararg parameter must be the last in the list
|
||||
modifiers.for.enum.constants=No modifiers allowed for enum constants
|
||||
generics.type.arguments.on.raw.type=Type arguments given on a raw type
|
||||
@@ -396,4 +397,3 @@ feature.lambda.expressions=Lambda expressions
|
||||
feature.type.annotations=Type annotations
|
||||
feature.type.receivers=Receiver parameters
|
||||
insufficient.language.level={0} are not supported at this language level
|
||||
bad.qualifier.in.super.method.reference=Bad type qualifier in default super call: redundant interface {0} is extended by {1}
|
||||
|
||||
+3
-12
@@ -38,11 +38,7 @@ public class LightAdvHighlightingJdk6Test extends LightDaemonAnalyzerTestCase {
|
||||
doTest(BASE_PATH + "/" + getTestName(false) + ".java", checkWarnings, checkInfos);
|
||||
}
|
||||
|
||||
public void testJava5CastConventions() {
|
||||
setLanguageLevel(LanguageLevel.JDK_1_5);
|
||||
doTest(true, false);
|
||||
}
|
||||
|
||||
public void testJava5CastConventions() { setLanguageLevel(LanguageLevel.JDK_1_5); doTest(true, false); }
|
||||
public void testJavacQuirks() { doTest(true, false); }
|
||||
public void testMethodReturnTypeSubstitutability() { doTest(true, false); }
|
||||
public void testIDEADEV11877() { doTest(false, false); }
|
||||
@@ -60,11 +56,6 @@ public class LightAdvHighlightingJdk6Test extends LightDaemonAnalyzerTestCase {
|
||||
public void testIDEA65473() { doTest(false, false); }
|
||||
public void testIDEA61415() { doTest(false, false); }
|
||||
public void testGenericArrayCreationWithGenericTypeWithOneUnboundedWildcardOneNormalParams() { doTest(false, false); }
|
||||
public void testAgentPremain() {
|
||||
doTest(false, false);
|
||||
}
|
||||
|
||||
public void testInitializedBeforeUsed() throws Exception {
|
||||
doTest(false, false);
|
||||
}
|
||||
public void testAgentPremain() { doTest(false, false); }
|
||||
public void testInitializedBeforeUsed() { doTest(false, false); }
|
||||
}
|
||||
|
||||
+2
-3
@@ -46,7 +46,6 @@ import com.intellij.xml.util.XmlStringUtil;
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.jdom.JDOMException;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -69,8 +68,8 @@ public final class UpdateChecker {
|
||||
public static final NotificationGroup NOTIFICATIONS =
|
||||
new NotificationGroup(IdeBundle.message("update.notifications.group"), NotificationDisplayType.STICKY_BALLOON, true);
|
||||
|
||||
@NonNls private static final String INSTALLATION_UID = "installation.uid";
|
||||
@NonNls private static final String DISABLED_UPDATE = "disabled_update.txt";
|
||||
private static final String INSTALLATION_UID = "installation.uid";
|
||||
private static final String DISABLED_UPDATE = "disabled_update.txt";
|
||||
|
||||
private static Set<String> ourDisabledToUpdatePlugins;
|
||||
private static final Map<String, String> ourAdditionalRequestOptions = ContainerUtil.newHashMap();
|
||||
|
||||
Reference in New Issue
Block a user