public class ReadonlyStatusHandlerImpl extends ReadonlyStatusHandler implements PersistentStateComponent<ReadonlyStatusHandlerImpl.State>
Modifier and Type | Class and Description |
---|---|
static class |
ReadonlyStatusHandlerImpl.State |
ReadonlyStatusHandler.OperationStatus
Modifier and Type | Field and Description |
---|---|
protected boolean |
myClearReadOnlyInTests |
Constructor and Description |
---|
ReadonlyStatusHandlerImpl(Project project) |
Modifier and Type | Method and Description |
---|---|
ReadonlyStatusHandler.OperationStatus |
ensureFilesWritable(java.util.Collection<? extends VirtualFile> files) |
ReadonlyStatusHandlerImpl.State |
getState() |
void |
loadState(ReadonlyStatusHandlerImpl.State state)
This method is called when new component state is loaded.
|
static void |
processFiles(java.util.List<com.intellij.openapi.vcs.readOnlyHandler.FileInfo> fileInfos,
java.lang.String changelist) |
void |
setClearReadOnlyInTests(boolean clearReadOnlyInTests)
Normally when file is read-only and ensureFilesWritable is called, a dialog box appears which allows user to decide
whether to clear read-only flag or not.
|
ensureDocumentWritable, ensureFilesWritable, ensureFilesWritable, getInstance
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeComponent, noStateLoaded
public ReadonlyStatusHandlerImpl(Project project)
public ReadonlyStatusHandlerImpl.State getState()
getState
in interface PersistentStateComponent<ReadonlyStatusHandlerImpl.State>
null
value indicates
that the returned state won't be stored, as a result previously stored state will be used.XmlSerializer
public void loadState(ReadonlyStatusHandlerImpl.State state)
PersistentStateComponent
State object should be used directly, defensive copying is not required.
loadState
in interface PersistentStateComponent<ReadonlyStatusHandlerImpl.State>
state
- loaded component stateXmlSerializerUtil.copyBean(Object, Object)
public ReadonlyStatusHandler.OperationStatus ensureFilesWritable(java.util.Collection<? extends VirtualFile> files)
ensureFilesWritable
in class ReadonlyStatusHandler
public static void processFiles(java.util.List<com.intellij.openapi.vcs.readOnlyHandler.FileInfo> fileInfos, java.lang.String changelist)
public void setClearReadOnlyInTests(boolean clearReadOnlyInTests)
clearReadOnlyInTests
- if true, ensureFilesWritable will try to clear read-only status from passed files.
Otherwise, read-only status is not modified (as if user refused to modify it).