Java 类com.intellij.openapi.editor.event.EditorFactoryListener 实例源码

项目:intellij-ce-playground    文件:LineStatusTrackerManager.java   
@Override
public void projectOpened() {
  StartupManager.getInstance(myProject).registerPreStartupActivity(new Runnable() {
    @Override
    public void run() {
      final MyFileStatusListener fileStatusListener = new MyFileStatusListener();
      final EditorFactoryListener editorFactoryListener = new MyEditorFactoryListener();
      final MyVirtualFileListener virtualFileListener = new MyVirtualFileListener();
      final EditorColorsListener editorColorsListener = new MyEditorColorsListener();

      final FileStatusManager fsManager = FileStatusManager.getInstance(myProject);
      fsManager.addFileStatusListener(fileStatusListener, myDisposable);

      final EditorFactory editorFactory = EditorFactory.getInstance();
      editorFactory.addEditorFactoryListener(editorFactoryListener, myDisposable);

      final VirtualFileManager virtualFileManager = VirtualFileManager.getInstance();
      virtualFileManager.addVirtualFileListener(virtualFileListener, myDisposable);

      final EditorColorsManager editorColorsManager = EditorColorsManager.getInstance();
      editorColorsManager.addEditorColorsListener(editorColorsListener, myDisposable);
    }
  });
}
项目:intellij-ce-playground    文件:TemplateManagerImpl.java   
public TemplateManagerImpl(Project project) {
  myProject = project;
  final EditorFactoryListener myEditorFactoryListener = new EditorFactoryAdapter() {
    @Override
    public void editorReleased(@NotNull EditorFactoryEvent event) {
      Editor editor = event.getEditor();
      if (editor.getProject() != null && editor.getProject() != myProject) return;
      if (myProject.isDisposed() || !myProject.isOpen()) return;
      TemplateState state = getTemplateState(editor);
      if (state != null) {
        state.gotoEnd();
      }
      clearTemplateState(editor);
    }
  };
  EditorFactory.getInstance().addEditorFactoryListener(myEditorFactoryListener, myProject);
}
项目:tools-idea    文件:TemplateManagerImpl.java   
@Override
public void projectOpened() {
  final EditorFactoryListener myEditorFactoryListener = new EditorFactoryAdapter() {
    @Override
    public void editorReleased(@NotNull EditorFactoryEvent event) {
      Editor editor = event.getEditor();
      if (editor.getProject() != null && editor.getProject() != myProject) return;
      if (myProject.isDisposed() || !myProject.isOpen()) return;
      TemplateState tState = getTemplateState(editor);
      if (tState != null) {
        tState.gotoEnd();
      }
      editor.putUserData(TEMPLATE_STATE_KEY, null);
    }
  };
  EditorFactory.getInstance().addEditorFactoryListener(myEditorFactoryListener, myProject);
}
项目:consulo    文件:LineStatusTrackerManager.java   
@Override
public void projectOpened() {
  StartupManager.getInstance(myProject).registerPreStartupActivity(new Runnable() {
    @Override
    public void run() {
      final MyFileStatusListener fileStatusListener = new MyFileStatusListener();
      final EditorFactoryListener editorFactoryListener = new MyEditorFactoryListener();
      final MyVirtualFileListener virtualFileListener = new MyVirtualFileListener();

      final FileStatusManager fsManager = FileStatusManager.getInstance(myProject);
      fsManager.addFileStatusListener(fileStatusListener, myDisposable);

      final EditorFactory editorFactory = EditorFactory.getInstance();
      editorFactory.addEditorFactoryListener(editorFactoryListener, myDisposable);

      final VirtualFileManager virtualFileManager = VirtualFileManager.getInstance();
      virtualFileManager.addVirtualFileListener(virtualFileListener, myDisposable);
    }
  });
}
项目:consulo    文件:TemplateManagerImpl.java   
public TemplateManagerImpl(Project project) {
  myProject = project;
  final EditorFactoryListener myEditorFactoryListener = new EditorFactoryAdapter() {
    @Override
    public void editorReleased(@Nonnull EditorFactoryEvent event) {
      Editor editor = event.getEditor();
      if (editor.getProject() != null && editor.getProject() != myProject) return;
      if (myProject.isDisposed() || !myProject.isOpen()) return;
      TemplateState state = getTemplateState(editor);
      if (state != null) {
        state.gotoEnd();
      }
      clearTemplateState(editor);
    }
  };
  EditorFactory.getInstance().addEditorFactoryListener(myEditorFactoryListener, myProject);
}
项目:tools-idea    文件:LineStatusTrackerManager.java   
public void projectOpened() {
  StartupManager.getInstance(myProject).registerPreStartupActivity(new Runnable() {
    @Override
    public void run() {
      final MyFileStatusListener fileStatusListener = new MyFileStatusListener();
      final EditorFactoryListener editorFactoryListener = new MyEditorFactoryListener();
      final MyVirtualFileListener virtualFileListener = new MyVirtualFileListener();
      final EditorColorsListener editorColorsListener = new EditorColorsListener() {
        public void globalSchemeChange(EditorColorsScheme scheme) {
          resetTrackersForOpenFiles();
        }
      };

      final FileStatusManager fsManager = FileStatusManager.getInstance(myProject);
      fsManager.addFileStatusListener(fileStatusListener, myProject);

      final EditorFactory editorFactory = EditorFactory.getInstance();
      editorFactory.addEditorFactoryListener(editorFactoryListener,myProject);

      final VirtualFileManager virtualFileManager = VirtualFileManager.getInstance();
      virtualFileManager.addVirtualFileListener(virtualFileListener,myProject);

      final EditorColorsManager editorColorsManager = EditorColorsManager.getInstance();
      editorColorsManager.addEditorColorsListener(editorColorsListener);

      Disposer.register(myDisposable, new Disposable() {
        public void dispose() {
          fsManager.removeFileStatusListener(fileStatusListener);
          virtualFileManager.removeVirtualFileListener(virtualFileListener);
          editorColorsManager.removeEditorColorsListener(editorColorsListener);
        }
      });
    }
  });
}
项目:intellij-ce-playground    文件:MockEditorFactory.java   
@Override
public void addEditorFactoryListener(@NotNull EditorFactoryListener listener) {
}
项目:intellij-ce-playground    文件:MockEditorFactory.java   
@Override
public void addEditorFactoryListener(@NotNull EditorFactoryListener listener, @NotNull Disposable parentDisposable) {
}
项目:intellij-ce-playground    文件:MockEditorFactory.java   
@Override
public void removeEditorFactoryListener(@NotNull EditorFactoryListener listener) {
}
项目:intellij-ce-playground    文件:EditorFactoryImpl.java   
@Override
@Deprecated
public void addEditorFactoryListener(@NotNull EditorFactoryListener listener) {
  myEditorFactoryEventDispatcher.addListener(listener);
}
项目:intellij-ce-playground    文件:EditorFactoryImpl.java   
@Override
public void addEditorFactoryListener(@NotNull EditorFactoryListener listener, @NotNull Disposable parentDisposable) {
  myEditorFactoryEventDispatcher.addListener(listener,parentDisposable);
}
项目:intellij-ce-playground    文件:EditorFactoryImpl.java   
@Override
@Deprecated
public void removeEditorFactoryListener(@NotNull EditorFactoryListener listener) {
  myEditorFactoryEventDispatcher.removeListener(listener);
}
项目:tools-idea    文件:MockEditorFactory.java   
@Override
public void addEditorFactoryListener(@NotNull EditorFactoryListener listener) {
}
项目:tools-idea    文件:MockEditorFactory.java   
@Override
public void addEditorFactoryListener(@NotNull EditorFactoryListener listener, @NotNull Disposable parentDisposable) {
}
项目:tools-idea    文件:MockEditorFactory.java   
@Override
public void removeEditorFactoryListener(@NotNull EditorFactoryListener listener) {
}
项目:tools-idea    文件:EditorFactoryImpl.java   
@Override
public void addEditorFactoryListener(@NotNull EditorFactoryListener listener) {
  myEditorFactoryEventDispatcher.addListener(listener);
}
项目:tools-idea    文件:EditorFactoryImpl.java   
@Override
public void addEditorFactoryListener(@NotNull EditorFactoryListener listener, @NotNull Disposable parentDisposable) {
  myEditorFactoryEventDispatcher.addListener(listener,parentDisposable);
}
项目:tools-idea    文件:EditorFactoryImpl.java   
@Override
public void removeEditorFactoryListener(@NotNull EditorFactoryListener listener) {
  myEditorFactoryEventDispatcher.removeListener(listener);
}
项目:consulo    文件:MockEditorFactory.java   
@Override
public void addEditorFactoryListener(@Nonnull EditorFactoryListener listener) {
}
项目:consulo    文件:MockEditorFactory.java   
@Override
public void addEditorFactoryListener(@Nonnull EditorFactoryListener listener, @Nonnull Disposable parentDisposable) {
}
项目:consulo    文件:MockEditorFactory.java   
@Override
public void removeEditorFactoryListener(@Nonnull EditorFactoryListener listener) {
}
项目:consulo    文件:EditorFactoryImpl.java   
@Override
@Deprecated
public void addEditorFactoryListener(@Nonnull EditorFactoryListener listener) {
  myEditorFactoryEventDispatcher.addListener(listener);
}
项目:consulo    文件:EditorFactoryImpl.java   
@Override
public void addEditorFactoryListener(@Nonnull EditorFactoryListener listener, @Nonnull Disposable parentDisposable) {
  myEditorFactoryEventDispatcher.addListener(listener,parentDisposable);
}
项目:consulo    文件:EditorFactoryImpl.java   
@Override
@Deprecated
public void removeEditorFactoryListener(@Nonnull EditorFactoryListener listener) {
  myEditorFactoryEventDispatcher.removeListener(listener);
}
项目:intellij-ce-playground    文件:EditorFactory.java   
/**
 * Registers a listener for receiving notifications when editor instances are created
 * and released.
 *
 * @param listener the listener instance.
 * @deprecated use the {@link #addEditorFactoryListener(EditorFactoryListener, Disposable)} instead
 */
public abstract void addEditorFactoryListener(@NotNull EditorFactoryListener listener);
项目:intellij-ce-playground    文件:EditorFactory.java   
/**
 * Registers a listener for receiving notifications when editor instances are created and released
 * and removes the listener when the <code>'parentDisposable'</code> gets disposed.
 *
 * @param listener         the listener instance.
 * @param parentDisposable the Disposable which triggers the removal of the listener
 */
public abstract void addEditorFactoryListener(@NotNull EditorFactoryListener listener, @NotNull Disposable parentDisposable);
项目:intellij-ce-playground    文件:EditorFactory.java   
/**
 * Un-registers a listener for receiving notifications when editor instances are created
 * and released.
 *
 * @param listener the listener instance.
 * @deprecated you should have used the {@link #addEditorFactoryListener(EditorFactoryListener, Disposable)} instead
 */
public abstract void removeEditorFactoryListener(@NotNull EditorFactoryListener listener);
项目:tools-idea    文件:EditorFactory.java   
/**
 * Registers a listener for receiving notifications when editor instances are created
 * and released.
 *
 * @param listener the listener instance.
 * @deprecated use the {@link #addEditorFactoryListener(EditorFactoryListener, Disposable)} instead
 */
public abstract void addEditorFactoryListener(@NotNull EditorFactoryListener listener);
项目:tools-idea    文件:EditorFactory.java   
/**
 * Registers a listener for receiving notifications when editor instances are created and released
 * and removes the listener when the <code>'parentDisposable'</code> gets disposed.
 *
 * @param listener         the listener instance.
 * @param parentDisposable the Disposable which triggers the removal of the listener
 */
public abstract void addEditorFactoryListener(@NotNull EditorFactoryListener listener, @NotNull Disposable parentDisposable);
项目:tools-idea    文件:EditorFactory.java   
/**
 * Un-registers a listener for receiving notifications when editor instances are created
 * and released.
 *
 * @param listener the listener instance.
 * @deprecated you should have used the {@link #addEditorFactoryListener(EditorFactoryListener, Disposable)} instead
 */
public abstract void removeEditorFactoryListener(@NotNull EditorFactoryListener listener);
项目:consulo    文件:EditorFactory.java   
/**
 * Registers a listener for receiving notifications when editor instances are created
 * and released.
 *
 * @param listener the listener instance.
 * @deprecated use the {@link #addEditorFactoryListener(EditorFactoryListener, Disposable)} instead
 */
public abstract void addEditorFactoryListener(@Nonnull EditorFactoryListener listener);
项目:consulo    文件:EditorFactory.java   
/**
 * Registers a listener for receiving notifications when editor instances are created and released
 * and removes the listener when the <code>'parentDisposable'</code> gets disposed.
 *
 * @param listener         the listener instance.
 * @param parentDisposable the Disposable which triggers the removal of the listener
 */
public abstract void addEditorFactoryListener(@Nonnull EditorFactoryListener listener, @Nonnull Disposable parentDisposable);
项目:consulo    文件:EditorFactory.java   
/**
 * Un-registers a listener for receiving notifications when editor instances are created
 * and released.
 *
 * @param listener the listener instance.
 * @deprecated you should have used the {@link #addEditorFactoryListener(EditorFactoryListener, Disposable)} instead
 */
public abstract void removeEditorFactoryListener(@Nonnull EditorFactoryListener listener);