Replace object$ -> OBJECT$, instance$ -> INSTANCE$ in the project

This commit is contained in:
Alexander Udalov
2014-07-26 00:21:05 +04:00
parent 549a38ca6f
commit de0f751207
110 changed files with 183 additions and 183 deletions
@@ -96,7 +96,7 @@ public class JetPluginUtil {
}
public static boolean isGradleModule(@NotNull Module module) {
return ModuleTypeCacheManager.object$.geInstance(module.getProject()).isGradleModule(module);
return ModuleTypeCacheManager.OBJECT$.geInstance(module.getProject()).isGradleModule(module);
}
public static boolean isMavenModule(@NotNull Module module) {
@@ -53,10 +53,10 @@ public class JavaToKotlinAction extends AnAction {
return;
}
final Converter converter = Converter.object$.create(project,
final Converter converter = Converter.OBJECT$.create(project,
ConverterSettings.defaultSettings,
new FilesConversionScope(selectedJavaFiles),
J2kPostProcessor.instance$);
J2kPostProcessor.INSTANCE$);
CommandProcessor.getInstance().executeCommand(
project,
new Runnable() {
@@ -107,7 +107,7 @@ public class JetAddFunctionToClassifierAction implements QuestionAction {
PsiElement anchor = body.getRBrace();
JetNamedFunction insertedFunctionElement = (JetNamedFunction) body.addBefore(functionElement, anchor);
ShortenReferences.instance$.process(insertedFunctionElement);
ShortenReferences.INSTANCE$.process(insertedFunctionElement);
}
});
}
@@ -152,7 +152,7 @@ public class JetChangeFunctionSignatureAction implements QuestionAction {
newElement = psiFactory.createFunction(signatureString);
}
newElement = (JetNamedFunction) element.replace(newElement);
ShortenReferences.instance$.process(newElement);
ShortenReferences.INSTANCE$.process(newElement);
}
});
}
@@ -101,7 +101,7 @@ public abstract class OverrideImplementMethodsHandler implements LanguageCodeIns
elementsToCompact.add((JetElement) added);
}
ShortenReferences.instance$.process(elementsToCompact);
ShortenReferences.INSTANCE$.process(elementsToCompact);
}
@Nullable
@@ -86,7 +86,7 @@ public class MoveDeclarationsOutHelper {
dummyFirstStatement.delete();
}
ShortenReferences.instance$.process(propertiesDeclarations);
ShortenReferences.INSTANCE$.process(propertiesDeclarations);
return PsiUtilCore.toPsiElementArray(resultStatements);
}
@@ -53,7 +53,7 @@ public class JetClassInsertHandler implements InsertHandler<LookupElement> {
psiDocumentManager.commitAllDocuments();
RangeMarker rangeMarker = document.createRangeMarker(classNameEnd, classNameEnd + tempSuffix.length());
ShortenReferences.instance$.process((JetFile) context.getFile(), startOffset, classNameEnd);
ShortenReferences.INSTANCE$.process((JetFile) context.getFile(), startOffset, classNameEnd);
psiDocumentManager.commitAllDocuments();
psiDocumentManager.doPostponedOperationsAndUnblockDocument(document);
@@ -94,7 +94,7 @@ public class ConfigureKotlinInProjectUtils {
}
private static void showConfigureKotlinNotification(@NotNull Project project) {
ConfigureKotlinNotificationManager.instance$.notify(project);
ConfigureKotlinNotificationManager.INSTANCE$.notify(project);
}
@NotNull
@@ -110,7 +110,7 @@ public class AbsentJdkAnnotationsComponent extends AbstractProjectComponent {
public void run() {
Collection<Sdk> sdks = collectSdksWithoutAnnotations();
if (!sdks.isEmpty()) {
AbsentSdkAnnotationsNotificationManager.instance$.notify(myProject, sdks);
AbsentSdkAnnotationsNotificationManager.INSTANCE$.notify(myProject, sdks);
}
}
});
@@ -154,7 +154,7 @@ public abstract class KotlinFindMemberUsagesHandler<T extends JetNamedDeclaratio
UsagesSearchRequest request =
getSearchHelper(kotlinOptions).newRequest(FindUsagesPackage.toSearchTarget(options, (T) element, true));
for (PsiReference ref : UsagesSearch.instance$.search(request)) {
for (PsiReference ref : UsagesSearch.INSTANCE$.search(request)) {
processUsage(processor, ref);
}
@@ -47,7 +47,7 @@ public class ReconstructTypeInCastOrIsAction extends PsiElementBaseIntentionActi
JetType type = getReconstructedType(typeRef);
JetTypeReference newType = JetPsiFactory(typeRef).createType(DescriptorRenderer.SOURCE_CODE.renderType(type));
JetTypeReference replaced = (JetTypeReference) typeRef.replace(newType);
ShortenReferences.instance$.process(replaced);
ShortenReferences.INSTANCE$.process(replaced);
}
@Override
@@ -260,7 +260,7 @@ public class SpecifyTypeExplicitlyAction extends PsiElementBaseIntentionAction {
manager.startTemplate(editor, builder.buildInlineTemplate(), new TemplateEditingAdapter() {
@Override
public void templateFinished(Template template, boolean brokenOff) {
ShortenReferences.instance$.process(getTypeRef(namedDeclaration));
ShortenReferences.INSTANCE$.process(getTypeRef(namedDeclaration));
}
});
}
@@ -125,7 +125,7 @@ public class DeclarationUtils {
);
if (inferredType != null) {
ShortenReferences.instance$.process(property.getTypeRef());
ShortenReferences.INSTANCE$.process(property.getTypeRef());
}
return newInitializer;
@@ -169,7 +169,7 @@ public class KotlinSignatureAnnotationIntention extends BaseIntentionAction impl
@NotNull
private static String getDefaultSignature(@NotNull Project project, @NotNull PsiMember psiMember) {
BindingContext bindingContext = ResolvePackage.getLazyResolveSession(project, TargetPlatform.JVM).getBindingContext();
JavaDescriptorResolver javaDescriptorResolver = JavaResolveExtension.instance$.get(project);
JavaDescriptorResolver javaDescriptorResolver = JavaResolveExtension.INSTANCE$.get(project);
PsiClass containingClass = psiMember.getContainingClass();
assert containingClass != null;
@@ -95,7 +95,7 @@ public class KotlinSignatureInJavaMarkerProvider implements LineMarkerProvider {
BindingContext bindingContext = ResolvePackage.getLazyResolveSession(project, TargetPlatform.JVM).getBindingContext();
JavaDescriptorResolver javaDescriptorResolver = JavaResolveExtension.instance$.get(project);
JavaDescriptorResolver javaDescriptorResolver = JavaResolveExtension.INSTANCE$.get(project);
for (PsiElement element : elements) {
if (!(element instanceof PsiMember)) {
@@ -248,15 +248,15 @@ public class QuickFixes {
factories.put(MANY_CLASSES_IN_SUPERTYPE_LIST, RemoveSupertypeFix.createFactory());
factories.put(NO_GET_METHOD, CreateFunctionFromUsageFix.object$.createCreateGetFunctionFromUsageFactory());
factories.put(NO_SET_METHOD, CreateFunctionFromUsageFix.object$.createCreateSetFunctionFromUsageFactory());
JetSingleIntentionActionFactory createHasNextFromUsageFactory = CreateFunctionFromUsageFix.object$.createCreateHasNextFunctionFromUsageFactory();
factories.put(NO_GET_METHOD, CreateFunctionFromUsageFix.OBJECT$.createCreateGetFunctionFromUsageFactory());
factories.put(NO_SET_METHOD, CreateFunctionFromUsageFix.OBJECT$.createCreateSetFunctionFromUsageFactory());
JetSingleIntentionActionFactory createHasNextFromUsageFactory = CreateFunctionFromUsageFix.OBJECT$.createCreateHasNextFunctionFromUsageFactory();
factories.put(HAS_NEXT_MISSING, createHasNextFromUsageFactory);
factories.put(HAS_NEXT_FUNCTION_NONE_APPLICABLE, createHasNextFromUsageFactory);
JetSingleIntentionActionFactory createNextFromUsageFactory = CreateFunctionFromUsageFix.object$.createCreateNextFunctionFromUsageFactory();
JetSingleIntentionActionFactory createNextFromUsageFactory = CreateFunctionFromUsageFix.OBJECT$.createCreateNextFunctionFromUsageFactory();
factories.put(NEXT_MISSING, createNextFromUsageFactory);
factories.put(NEXT_NONE_APPLICABLE, createNextFromUsageFactory);
factories.put(ITERATOR_MISSING, CreateFunctionFromUsageFix.object$.createCreateIteratorFunctionFromUsageFactory());
factories.put(COMPONENT_FUNCTION_MISSING, CreateFunctionFromUsageFix.object$.createCreateComponentFunctionFromUsageFactory());
factories.put(ITERATOR_MISSING, CreateFunctionFromUsageFix.OBJECT$.createCreateIteratorFunctionFromUsageFactory());
factories.put(COMPONENT_FUNCTION_MISSING, CreateFunctionFromUsageFix.OBJECT$.createCreateComponentFunctionFromUsageFactory());
}
}
@@ -295,7 +295,7 @@ public class KotlinInlineValHandler extends InlineActionHandler {
functionLiteral.addAfter(whitespaceToAdd, openBraceElement);
}
}
ShortenReferences.instance$.process(functionLiteralExpression.getValueParameters());
ShortenReferences.INSTANCE$.process(functionLiteralExpression.getValueParameters());
}
}
@@ -337,7 +337,7 @@ public class KotlinInlineValHandler extends InlineActionHandler {
JetPsiFactory psiFactory = JetPsiFactory(containingFile);
for (JetCallExpression call : callsToAddArguments) {
call.addAfter(psiFactory.createTypeArguments("<" + typeArguments + ">"), call.getCalleeExpression());
ShortenReferences.instance$.process(call.getTypeArgumentList());
ShortenReferences.INSTANCE$.process(call.getTypeArgumentList());
}
}
@@ -413,7 +413,7 @@ public class KotlinIntroduceVariableHandler extends KotlinIntroduceHandlerBase {
}
propertyRef.set(property);
if (noTypeInference) {
ShortenReferences.instance$.process(property);
ShortenReferences.INSTANCE$.process(property);
}
}
};
@@ -1,7 +1,7 @@
class C {
<error>class object</error> {
<error>val `object$`</error> = this
<error>val `OBJECT$`</error> = this
}
val `object$` = C
val `OBJECT$` = C
}
@@ -1,6 +1,6 @@
public class Testing {
public static void test() {
mockLib.foo.LibClass.object$.<caret>
mockLib.foo.LibClass.OBJECT$.<caret>
}
}
@@ -4,4 +4,4 @@ public class Testing {
}
}
// EXIST: instance$
// EXIST: INSTANCE$
@@ -4,4 +4,4 @@ public class Testing {
}
}
// EXIST: instance$
// EXIST: INSTANCE$
@@ -4,6 +4,6 @@ import server.O
class Client {
fun fooBar() {
println("foo = " + O.instance$.getFoo())
println("foo = " + O.INSTANCE$.getFoo())
}
}
@@ -1,2 +1,2 @@
Class static member access (7: 28) println("foo = " + O.instance$.getFoo())
Class static member access (7: 28) println("foo = " + O.INSTANCE$.getFoo())
Usage in import (3: 15) import server.O
@@ -4,9 +4,9 @@ import server.*
class Client {
fun fooBar() {
A.object$.setFoo("a");
A.OBJECT$.setFoo("a");
A.foo = "a";
println("a.foo = " + A.object$.getFoo());
println("a.foo = " + A.OBJECT$.getFoo());
println("a.foo = " + A.foo);
}
}
@@ -1,4 +1,4 @@
Unclassified usage (10: 32) println("a.foo = " + A.foo);
Unclassified usage (7: 19) A.object$.setFoo("a");
Unclassified usage (7: 19) A.OBJECT$.setFoo("a");
Unclassified usage (8: 11) A.foo = "a";
Unclassified usage (9: 40) println("a.foo = " + A.object$.getFoo());
Unclassified usage (9: 40) println("a.foo = " + A.OBJECT$.getFoo());
@@ -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.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);
}
}
@@ -4,6 +4,6 @@ import b.Test;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -2,6 +2,6 @@ package b;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -2,6 +2,6 @@ package b;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -2,6 +2,6 @@ package b;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -4,6 +4,6 @@ import b.Test;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -4,6 +4,6 @@ import b.Test;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -4,6 +4,6 @@ import b.Test;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -2,6 +2,6 @@ package a;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -2,6 +2,6 @@ package b;
class J {
void bar() {
a.Test t = a.Test.instance$;
a.Test t = a.Test.INSTANCE$;
}
}
@@ -4,6 +4,6 @@ import a.*;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -4,6 +4,6 @@ import a.Test;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -2,6 +2,6 @@ package c;
class J {
void bar() {
a.Test t = a.Test.instance$;
a.Test t = a.Test.INSTANCE$;
}
}
@@ -4,6 +4,6 @@ import a.*;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -4,6 +4,6 @@ import a.Test;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -4,6 +4,6 @@ import b.Test;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -2,6 +2,6 @@ package b;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -2,6 +2,6 @@ package b;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -2,6 +2,6 @@ package b;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -4,6 +4,6 @@ import b.Test;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -4,6 +4,6 @@ import b.Test;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -4,6 +4,6 @@ import b.Test;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -2,6 +2,6 @@ package a;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -2,6 +2,6 @@ package b;
class J {
void bar() {
a.Test t = a.Test.instance$;
a.Test t = a.Test.INSTANCE$;
}
}
@@ -4,6 +4,6 @@ import a.*;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -4,6 +4,6 @@ import a.Test;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -2,6 +2,6 @@ package c;
class J {
void bar() {
a.Test t = a.Test.instance$;
a.Test t = a.Test.INSTANCE$;
}
}
@@ -4,6 +4,6 @@ import a.*;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -4,6 +4,6 @@ import a.Test;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -2,6 +2,6 @@ package a;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -2,6 +2,6 @@ package a;
class J {
void bar() {
Test t = Test.instance$;
Test t = Test.INSTANCE$;
}
}
@@ -31,7 +31,7 @@ public abstract class AbstractMultiFileJvmBasicCompletionTest extends KotlinComp
protected void doTest(@NotNull String testPath) throws Exception {
configureByFile(getTestName(false) + ".kt", "");
boolean shouldFail = testPath.contains("NoSpecifiedType");
AstAccessControl.instance$.testWithControlledAccessToAst(
AstAccessControl.INSTANCE$.testWithControlledAccessToAst(
shouldFail, getFile().getVirtualFile(), getProject(), getTestRootDisposable(),
new Function0<Unit>() {
@Override
@@ -43,7 +43,7 @@ public abstract class AbstractMultiFileJvmBasicCompletionTest extends KotlinComp
return myItems;
}
});
return Unit.instance$;
return Unit.INSTANCE$;
}
}
);
@@ -57,13 +57,13 @@ public abstract class AbstractLazyResolveByStubTest extends KotlinCodeInsightTes
configureByFile(path);
configureModule(getModule(), JetWithJdkAndRuntimeLightProjectDescriptor.INSTANCE);
boolean shouldFail = getTestName(false).equals("ClassWithConstVal");
AstAccessControl.instance$.testWithControlledAccessToAst(
AstAccessControl.INSTANCE$.testWithControlledAccessToAst(
shouldFail, getProject(), getTestRootDisposable(),
new Function0<Unit>() {
@Override
public Unit invoke() {
performTest(path, checkPrimaryConstructors, checkPropertyAccessors);
return Unit.instance$;
return Unit.INSTANCE$;
}
}
);
@@ -71,7 +71,7 @@ public abstract class AbstractLazyResolveByStubTest extends KotlinCodeInsightTes
private void performTest(@NotNull String path, boolean checkPrimaryConstructors, boolean checkPropertyAccessors) {
ResolveSessionForBodies resolveSession =
KotlinCacheService.object$.getInstance(getFile().getProject()).getLazyResolveSession((JetFile) getFile());
KotlinCacheService.OBJECT$.getInstance(getFile().getProject()).getLazyResolveSession((JetFile) getFile());
ModuleDescriptor module = resolveSession.getModuleDescriptor();
PackageViewDescriptor packageViewDescriptor = module.getPackage(new FqName("test"));
Assert.assertNotNull(packageViewDescriptor);
@@ -41,13 +41,13 @@ public abstract class AbstractMultiFileHighlightingTest extends KotlinCompletion
public void doTest(@NotNull String filePath) throws Exception {
configureByFile(new File(filePath).getName(), "");
boolean shouldFail = getName().contains("UnspecifiedType");
AstAccessControl.instance$.testWithControlledAccessToAst(
AstAccessControl.INSTANCE$.testWithControlledAccessToAst(
shouldFail, getFile().getVirtualFile(), getProject(), getTestRootDisposable(),
new Function0<Unit>() {
@Override
public Unit invoke() {
checkHighlighting(myEditor, true, false);
return Unit.instance$;
return Unit.INSTANCE$;
}
}
);