Search in sources :

Example 6 with FileTypeRegistry

use of com.intellij.openapi.fileTypes.FileTypeRegistry in project kotlin by JetBrains.

the class KtPlatformLiteFixture method initApplication.

public void initApplication() {
    MockApplicationEx instance = new MockApplicationEx(getTestRootDisposable());
    ApplicationManager.setApplication(instance, new Getter<FileTypeRegistry>() {

        @Override
        public FileTypeRegistry get() {
            return FileTypeManager.getInstance();
        }
    }, getTestRootDisposable());
    getApplication().registerService(EncodingManager.class, CoreEncodingProjectManager.class);
}
Also used : MockApplicationEx(com.intellij.mock.MockApplicationEx) FileTypeRegistry(com.intellij.openapi.fileTypes.FileTypeRegistry)

Aggregations

FileTypeRegistry (com.intellij.openapi.fileTypes.FileTypeRegistry)6 FileType (com.intellij.openapi.fileTypes.FileType)2 MockApplicationEx (com.intellij.mock.MockApplicationEx)1 Disposable (com.intellij.openapi.Disposable)1 Result (com.intellij.openapi.application.Result)1 LanguageFileType (com.intellij.openapi.fileTypes.LanguageFileType)1 MockFileTypeManager (com.intellij.openapi.fileTypes.MockFileTypeManager)1 Project (com.intellij.openapi.project.Project)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 VirtualFileVisitor (com.intellij.openapi.vfs.VirtualFileVisitor)1 THashSet (gnu.trove.THashSet)1 File (java.io.File)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 NotNull (org.jetbrains.annotations.NotNull)1 Nullable (org.jetbrains.annotations.Nullable)1