Replace OBJECT$ usages in code and test data
This commit is contained in:
+1
-1
@@ -34,7 +34,7 @@ class TypeKindHighlightingVisitor extends AfterAnalysisHighlightingVisitor {
|
||||
public void visitSimpleNameExpression(@NotNull JetSimpleNameExpression expression) {
|
||||
PsiReference ref = expression.getReference();
|
||||
if (ref == null) return;
|
||||
if (JetPsiChecker.OBJECT$.getNamesHighlightingEnabled()) {
|
||||
if (JetPsiChecker.Companion.getNamesHighlightingEnabled()) {
|
||||
DeclarationDescriptor referenceTarget = bindingContext.get(BindingContext.REFERENCE_TARGET, expression);
|
||||
if (referenceTarget instanceof ConstructorDescriptor) {
|
||||
referenceTarget = referenceTarget.getContainingDeclaration();
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ public class JetPsiCheckerAndHighlightingUpdater extends JetPsiChecker {
|
||||
PsiElement grandParent = parameter.getParent().getParent();
|
||||
if (grandParent instanceof JetNamedFunction) {
|
||||
JetNamedFunction function = (JetNamedFunction) grandParent;
|
||||
return UnusedSymbolInspection.OBJECT$.isEntryPoint(function);
|
||||
return UnusedSymbolInspection.Companion.isEntryPoint(function);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ public class QuickFixRegistrar {
|
||||
QuickFixes.factories.put(NO_BACKING_FIELD_CUSTOM_ACCESSORS, changeToPropertyNameFactory);
|
||||
QuickFixes.factories.put(INACCESSIBLE_BACKING_FIELD, changeToPropertyNameFactory);
|
||||
|
||||
JetSingleIntentionActionFactory unresolvedReferenceFactory = AutoImportFix.OBJECT$.createFactory();
|
||||
JetSingleIntentionActionFactory unresolvedReferenceFactory = AutoImportFix.Companion.createFactory();
|
||||
QuickFixes.factories.put(UNRESOLVED_REFERENCE, unresolvedReferenceFactory);
|
||||
QuickFixes.factories.put(UNRESOLVED_REFERENCE_WRONG_RECEIVER, unresolvedReferenceFactory);
|
||||
|
||||
|
||||
+1
-1
@@ -263,7 +263,7 @@ public class KotlinIntroduceVariableHandler extends KotlinIntroduceHandlerBase {
|
||||
final JetExpression originalBody = originalDeclaration.getBodyExpression();
|
||||
assert originalBody != null : "Original body is not found: " + originalDeclaration;
|
||||
|
||||
JetDeclarationWithBody newDeclaration = ConvertToBlockBodyAction.OBJECT$.convert(originalDeclaration);
|
||||
JetDeclarationWithBody newDeclaration = ConvertToBlockBodyAction.Companion.convert(originalDeclaration);
|
||||
|
||||
JetBlockExpression newCommonContainer = (JetBlockExpression) newDeclaration.getBodyExpression();
|
||||
assert newCommonContainer != null : "New body is not found: " + newDeclaration;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
class ClassObject {
|
||||
void foo() {
|
||||
WithClassObject.OBJECT$.getValue();
|
||||
WithClassObject.OBJECT$.getValue();
|
||||
WithClassObject.OBJECT$.foo();
|
||||
WithClassObject.OBJECT$.getValueWithGetter();
|
||||
WithClassObject.OBJECT$.getVariable();
|
||||
WithClassObject.OBJECT$.setVariable(0);
|
||||
WithClassObject.OBJECT$.getVariableWithAccessors();
|
||||
WithClassObject.OBJECT$.setVariableWithAccessors(0);
|
||||
WithClassObject.Companion.getValue();
|
||||
WithClassObject.Companion.getValue();
|
||||
WithClassObject.Companion.foo();
|
||||
WithClassObject.Companion.getValueWithGetter();
|
||||
WithClassObject.Companion.getVariable();
|
||||
WithClassObject.Companion.setVariable(0);
|
||||
WithClassObject.Companion.getVariableWithAccessors();
|
||||
WithClassObject.Companion.setVariableWithAccessors(0);
|
||||
}
|
||||
}
|
||||
@@ -38,11 +38,11 @@ public abstract class AbstractJetPsiCheckerTest extends JetLightCodeInsightFixtu
|
||||
//noinspection unchecked
|
||||
myFixture.enableInspections(SpellCheckingInspection.class);
|
||||
|
||||
JetPsiChecker.OBJECT$.setNamesHighlightingEnabled(false);
|
||||
JetPsiChecker.Companion.setNamesHighlightingEnabled(false);
|
||||
checkHighlighting(true, true, false);
|
||||
}
|
||||
finally {
|
||||
JetPsiChecker.OBJECT$.setNamesHighlightingEnabled(true);
|
||||
JetPsiChecker.Companion.setNamesHighlightingEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user