public final class LightEditServiceImpl extends java.lang.Object implements LightEditService, Disposable, LightEditorListener, AppLifecycleListener, PersistentStateComponent<com.intellij.ide.lightEdit.LightEditConfiguration>
Disposable.Parent
AppLifecycleListener.Adapter
TOPIC
Constructor and Description |
---|
LightEditServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
afterClose(LightEditorInfo editorInfo) |
void |
afterSelect(LightEditorInfo editorInfo) |
void |
appClosing()
Fired before saving settings and before final 'can exit?' check.
|
void |
closeEditor(LightEditorInfo editorInfo) |
boolean |
closeEditorWindow() |
void |
createNewFile() |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
void |
disposeCurrentSession() |
LightEditorManager |
getEditorManager() |
LightEditPanel |
getEditPanel() |
Project |
getOrCreateProject() |
Project |
getProject() |
VirtualFile |
getSelectedFile() |
FileEditor |
getSelectedFileEditor() |
com.intellij.ide.lightEdit.LightEditConfiguration |
getState() |
boolean |
isAutosaveMode() |
void |
loadState(com.intellij.ide.lightEdit.LightEditConfiguration state)
This method is called when new component state is loaded.
|
boolean |
openFile(VirtualFile file) |
void |
saveToAnotherFile(VirtualFile file) |
void |
setAutosaveMode(boolean autosaveMode) |
void |
showEditorWindow() |
void |
updateFileStatus(java.util.Collection<VirtualFile> files) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInstance
afterCreate, autosaveModeChanged, beforeClose, fileStatusChanged
appFrameCreated, appFrameCreated, appStarting, appWillBeClosed, projectFrameClosed, projectOpenFailed, welcomeScreenDisplayed
initializeComponent, noStateLoaded
public com.intellij.ide.lightEdit.LightEditConfiguration getState()
getState
in interface PersistentStateComponent<com.intellij.ide.lightEdit.LightEditConfiguration>
null
value indicates
that the returned state won't be stored, as a result previously stored state will be used.XmlSerializer
public void loadState(com.intellij.ide.lightEdit.LightEditConfiguration state)
PersistentStateComponent
State object should be used directly, defensive copying is not required.
loadState
in interface PersistentStateComponent<com.intellij.ide.lightEdit.LightEditConfiguration>
state
- loaded component stateXmlSerializerUtil.copyBean(Object, Object)
public void showEditorWindow()
showEditorWindow
in interface LightEditService
public Project getProject()
getProject
in interface LightEditService
public Project getOrCreateProject()
getOrCreateProject
in interface LightEditService
public boolean openFile(VirtualFile file)
openFile
in interface LightEditService
public void closeEditor(LightEditorInfo editorInfo)
public void createNewFile()
createNewFile
in interface LightEditService
public boolean closeEditorWindow()
closeEditorWindow
in interface LightEditService
public LightEditPanel getEditPanel()
public VirtualFile getSelectedFile()
getSelectedFile
in interface LightEditService
public FileEditor getSelectedFileEditor()
getSelectedFileEditor
in interface LightEditService
public void updateFileStatus(java.util.Collection<VirtualFile> files)
updateFileStatus
in interface LightEditService
public void dispose()
Disposable
dispose
in interface Disposable
public void afterSelect(LightEditorInfo editorInfo)
afterSelect
in interface LightEditorListener
public void afterClose(LightEditorInfo editorInfo)
afterClose
in interface LightEditorListener
public LightEditorManager getEditorManager()
getEditorManager
in interface LightEditService
public void saveToAnotherFile(VirtualFile file)
saveToAnotherFile
in interface LightEditService
public boolean isAutosaveMode()
isAutosaveMode
in interface LightEditService
public void setAutosaveMode(boolean autosaveMode)
setAutosaveMode
in interface LightEditService
public void disposeCurrentSession()
public void appClosing()
AppLifecycleListener
ApplicationListener
listeners return false from their canExitApplication
method.appClosing
in interface AppLifecycleListener