TextEditorImpl(
     @NotNull final Project project,
     @NotNull final VirtualFile file,
     final TextEditorProvider provider) {
   myProject = project;
   myFile = file;
   myChangeSupport = new PropertyChangeSupport(this);
   myComponent = createEditorComponent(project, file);
   myAsyncLoader = new AsyncEditorLoader(this, myComponent, provider);
   myLoadingFinished = myAsyncLoader.start();
 }
 @Override
 public void setState(@NotNull final FileEditorState state) {
   myAsyncLoader.setEditorState((TextEditorState) state);
 }
 @Override
 @NotNull
 public FileEditorState getState(@NotNull FileEditorStateLevel level) {
   return myAsyncLoader.getEditorState(level);
 }