public final class ProjectLevelVcsManagerImpl extends ProjectLevelVcsManagerEx implements PersistentStateComponent<Element>, Disposable
Disposable.ParentVCS_CONFIGURATION_CHANGED, VCS_CONFIGURATION_CHANGED_IN_PLUGIN| Constructor and Description |
|---|
ProjectLevelVcsManagerImpl(Project project) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInitializationRequest(VcsInitObject vcsInitObject,
java.lang.Runnable runnable) |
void |
addMessageToConsoleWindow(java.lang.String message,
ConsoleViewContentType contentType) |
void |
addMessageToConsoleWindow(java.lang.String message,
TextAttributes attributes)
Deprecated.
|
void |
addVcsListener(VcsListener listener)
Adds a listener for receiving notifications about changes in VCS configuration for the project.
|
boolean |
checkAllFilesAreUnder(AbstractVcs abstractVcs,
VirtualFile[] files)
Checks if all given files are managed by the specified VCS.
|
boolean |
checkVcsIsActive(AbstractVcs vcs)
Checks if the specified VCS is used by any of the modules in the project.
|
boolean |
checkVcsIsActive(java.lang.String vcsName)
Checks if the VCS with the specified name is used by any of the modules in the project.
|
void |
dispose()
Usually not invoked directly, see class javadoc.
|
AbstractVcs |
findVcsByName(java.lang.String name)
Returns the version control system with the specified name.
|
AbstractVcs |
findVersioningVcs(VirtualFile file)
Used to guess VCS for automatic mapping through a look into a working copy
|
void |
fireDirectoryMappingsChanged() |
AbstractVcs [] |
getAllActiveVcss()
Returns the list of VCSes used by at least one module in the project.
|
java.util.List<VcsShowConfirmationOptionImpl> |
getAllConfirmations() |
java.util.List<VcsShowOptionsSettingImpl> |
getAllOptions() |
VcsRoot [] |
getAllVcsRoots() |
VcsDescriptor[] |
getAllVcss()
Returns the list of all registered version control systems.
|
VirtualFile[] |
getAllVersionedRoots() |
VcsAnnotationLocalChangesListener |
getAnnotationLocalChangesListener() |
BackgroundableActionEnabledHandler |
getBackgroundableActionHandler(VcsBackgroundableActions action)
Deprecated.
|
CheckoutProvider.Listener |
getCompositeCheckoutListener() |
VcsShowConfirmationOptionImpl |
getConfirmation(VcsConfiguration.StandardConfirmation option) |
ContentManager |
getContentManager() |
ContentRevisionCache |
getContentRevisionCache() |
VcsDescriptor |
getDescriptor(java.lang.String name) |
java.util.List<VirtualFile> |
getDetailedVcsMappings(AbstractVcs vcs)
Also includes into list all modules under roots
|
VcsDirectoryMapping |
getDirectoryMappingFor(FilePath file) |
java.util.List<VcsDirectoryMapping> |
getDirectoryMappings() |
java.util.List<VcsDirectoryMapping> |
getDirectoryMappings(AbstractVcs vcs) |
static ProjectLevelVcsManagerImpl |
getInstanceImpl(Project project) |
VcsShowSettingOption |
getOptions(VcsConfiguration.StandardOption option) |
VcsShowSettingOption |
getOrCreateCustomOption(java.lang.String vcsActionName,
AbstractVcs vcs) |
VcsRootChecker |
getRootChecker(AbstractVcs vcs) |
VirtualFile [] |
getRootsUnderVcs(AbstractVcs vcs) |
java.util.List<VirtualFile> |
getRootsUnderVcsWithoutFiltering(AbstractVcs vcs) |
VcsShowConfirmationOption |
getStandardConfirmation(VcsConfiguration.StandardConfirmation option,
AbstractVcs vcs) |
VcsShowSettingOption |
getStandardOption(VcsConfiguration.StandardOption option,
AbstractVcs vcs) |
Element |
getState() |
AbstractVcs |
getVcsFor(FilePath file)
Returns the VCS managing the specified file path.
|
AbstractVcs |
getVcsFor(VirtualFile file)
Returns the VCS managing the specified file.
|
VcsHistoryCache |
getVcsHistoryCache() |
VirtualFile |
getVcsRootFor(FilePath file)
Return the parent directory of the specified file path which is mapped to a VCS.
|
VirtualFile |
getVcsRootFor(VirtualFile file)
Return the parent directory of the specified file which is mapped to a VCS.
|
VcsRoot |
getVcsRootObjectFor(FilePath file) |
VcsRoot |
getVcsRootObjectFor(VirtualFile file) |
boolean |
hasActiveVcss() |
boolean |
hasAnyMappings() |
java.lang.String |
haveDefaultMapping() |
boolean |
haveVcses() |
boolean |
isBackgroundVcsOperationRunning()
Checks if a background VCS operation (commit or update) is currently in progress.
|
boolean |
isFileInContent(VirtualFile vf) |
boolean |
isIgnored(FilePath filePath) |
boolean |
isIgnored(VirtualFile vf) |
void |
iterateVcsRoot(VirtualFile root,
Processor<? super FilePath> iterator) |
void |
iterateVcsRoot(VirtualFile root,
Processor<? super FilePath> iterator,
VirtualFileFilter directoryFilter) |
void |
iterateVfUnderVcsRoot(VirtualFile file,
Processor<? super VirtualFile> processor) |
void |
loadState(Element state)
This method is called when new component state is loaded.
|
boolean |
needAutodetectMappings()
Returns 'true' during initial project setup, ie:
There are no explicitly configured mappings (
setDirectoryMapping(java.lang.String, java.lang.String) vs setAutoDirectoryMappings(java.util.List<? extends com.intellij.openapi.vcs.VcsDirectoryMapping>))
There are no mappings inherited from "Default Project" configuration (excluding <Project> mappings) (myMappingsLoaded
Project was not reopened a second time (ATTRIBUTE_DEFAULT_PROJECT)
|
void |
notifyDirectoryMappingChanged() |
void |
registerVcs(AbstractVcs vcs) |
void |
removeDirectoryMapping(VcsDirectoryMapping mapping) |
void |
removeVcsListener(VcsListener listener)
Removes a listener for receiving notifications about changes in VCS configuration for the project.
|
void |
scheduleMappedRootsUpdate() |
void |
setAutoDirectoryMapping(java.lang.String path,
java.lang.String activeVcsName)
Deprecated.
|
void |
setAutoDirectoryMappings(java.util.List<? extends VcsDirectoryMapping> mappings) |
void |
setDirectoryMapping(java.lang.String path,
java.lang.String activeVcsName)
This method can be used only when initially loading the project configuration!
|
void |
setDirectoryMappings(java.util.List<VcsDirectoryMapping> items) |
void |
showProjectOperationInfo(UpdatedFiles updatedFiles,
java.lang.String displayActionName) |
UpdateInfoTree |
showUpdateProjectInfo(UpdatedFiles updatedFiles,
java.lang.String displayActionName,
ActionInfo actionInfo,
boolean canceled) |
void |
startBackgroundVcsOperation()
Marks the beginning of a background VCS operation (commit or update).
|
void |
stopBackgroundVcsOperation()
Marks the end of a background VCS operation (commit or update).
|
void |
unregisterVcs(AbstractVcs vcs) |
void |
waitForInitialized() |
getInstanceExgetInstance, getInstanceChecked, updateActiveVcssclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitializeComponent, noStateLoadedpublic ProjectLevelVcsManagerImpl(Project project)
public static ProjectLevelVcsManagerImpl getInstanceImpl(Project project)
public void registerVcs(AbstractVcs vcs)
public AbstractVcs findVcsByName(java.lang.String name)
ProjectLevelVcsManagerfindVcsByName in class ProjectLevelVcsManagernull if none was found.public VcsDescriptor getDescriptor(java.lang.String name)
getDescriptor in class ProjectLevelVcsManagerpublic void iterateVfUnderVcsRoot(VirtualFile file, Processor<? super VirtualFile> processor)
iterateVfUnderVcsRoot in class ProjectLevelVcsManagerpublic VcsDescriptor[] getAllVcss()
ProjectLevelVcsManagergetAllVcss in class ProjectLevelVcsManagerpublic boolean haveVcses()
public void dispose()
Disposabledispose in interface Disposablepublic VcsAnnotationLocalChangesListener getAnnotationLocalChangesListener()
getAnnotationLocalChangesListener in class ProjectLevelVcsManagerpublic boolean checkAllFilesAreUnder(AbstractVcs abstractVcs, VirtualFile[] files)
ProjectLevelVcsManagercheckAllFilesAreUnder in class ProjectLevelVcsManagerpublic AbstractVcs getVcsFor(VirtualFile file)
ProjectLevelVcsManagergetVcsFor in class ProjectLevelVcsManagernull if the file does not belong to any module or the module
it belongs to is not under version control.public AbstractVcs getVcsFor(FilePath file)
ProjectLevelVcsManagergetVcsFor in class ProjectLevelVcsManagernull if the file does not belong to any module or the module
it belongs to is not under version control.public VirtualFile getVcsRootFor(VirtualFile file)
ProjectLevelVcsManagergetVcsRootFor in class ProjectLevelVcsManagernull if the specified file is not in a VCS-managed directory.public VcsRoot getVcsRootObjectFor(VirtualFile file)
getVcsRootObjectFor in class ProjectLevelVcsManagerpublic VirtualFile getVcsRootFor(FilePath file)
ProjectLevelVcsManagergetVcsRootFor in class ProjectLevelVcsManagernull if the specified file is not in a VCS-managed directory.public VcsRoot getVcsRootObjectFor(FilePath file)
getVcsRootObjectFor in class ProjectLevelVcsManagerpublic void unregisterVcs(AbstractVcs vcs)
public ContentManager getContentManager()
getContentManager in class ProjectLevelVcsManagerExpublic boolean checkVcsIsActive(AbstractVcs vcs)
ProjectLevelVcsManagercheckVcsIsActive in class ProjectLevelVcsManagerpublic boolean checkVcsIsActive(java.lang.String vcsName)
ProjectLevelVcsManagercheckVcsIsActive in class ProjectLevelVcsManagerpublic AbstractVcs [] getAllActiveVcss()
ProjectLevelVcsManagergetAllActiveVcss in class ProjectLevelVcsManagerpublic boolean hasActiveVcss()
hasActiveVcss in class ProjectLevelVcsManagerpublic boolean hasAnyMappings()
hasAnyMappings in class ProjectLevelVcsManager@Deprecated
public void addMessageToConsoleWindow(java.lang.String message,
TextAttributes attributes)
addMessageToConsoleWindow in class ProjectLevelVcsManagerpublic void addMessageToConsoleWindow(java.lang.String message,
ConsoleViewContentType contentType)
addMessageToConsoleWindow in class ProjectLevelVcsManagerpublic VcsShowSettingOption getOptions(VcsConfiguration.StandardOption option)
getOptions in class ProjectLevelVcsManagerExpublic java.util.List<VcsShowOptionsSettingImpl> getAllOptions()
getAllOptions in class ProjectLevelVcsManagerExpublic VcsShowSettingOption getStandardOption(VcsConfiguration.StandardOption option, AbstractVcs vcs)
getStandardOption in class ProjectLevelVcsManagerpublic VcsShowSettingOption getOrCreateCustomOption(java.lang.String vcsActionName, AbstractVcs vcs)
getOrCreateCustomOption in class ProjectLevelVcsManagerpublic void showProjectOperationInfo(UpdatedFiles updatedFiles, java.lang.String displayActionName)
showProjectOperationInfo in class ProjectLevelVcsManagerpublic UpdateInfoTree showUpdateProjectInfo(UpdatedFiles updatedFiles, java.lang.String displayActionName, ActionInfo actionInfo, boolean canceled)
showUpdateProjectInfo in class ProjectLevelVcsManagerExpublic java.util.List<VcsDirectoryMapping> getDirectoryMappings()
getDirectoryMappings in class ProjectLevelVcsManagerpublic java.util.List<VcsDirectoryMapping> getDirectoryMappings(AbstractVcs vcs)
getDirectoryMappings in class ProjectLevelVcsManagerpublic VcsDirectoryMapping getDirectoryMappingFor(FilePath file)
getDirectoryMappingFor in class ProjectLevelVcsManagerpublic void setDirectoryMapping(java.lang.String path,
java.lang.String activeVcsName)
ProjectLevelVcsManagersetDirectoryMapping in class ProjectLevelVcsManager@Deprecated
public void setAutoDirectoryMapping(java.lang.String path,
java.lang.String activeVcsName)
setAutoDirectoryMappings(List)public void setAutoDirectoryMappings(java.util.List<? extends VcsDirectoryMapping> mappings)
public void removeDirectoryMapping(VcsDirectoryMapping mapping)
public void setDirectoryMappings(java.util.List<VcsDirectoryMapping> items)
setDirectoryMappings in class ProjectLevelVcsManagerpublic void scheduleMappedRootsUpdate()
scheduleMappedRootsUpdate in class ProjectLevelVcsManagerExpublic void iterateVcsRoot(VirtualFile root, Processor<? super FilePath> iterator)
iterateVcsRoot in class ProjectLevelVcsManagerpublic void iterateVcsRoot(VirtualFile root, Processor<? super FilePath> iterator, VirtualFileFilter directoryFilter)
iterateVcsRoot in class ProjectLevelVcsManagerpublic Element getState()
getState in interface PersistentStateComponent<Element>null value indicates
that the returned state won't be stored, as a result previously stored state will be used.XmlSerializerpublic void loadState(Element state)
PersistentStateComponentState object should be used directly, defensive copying is not required.
loadState in interface PersistentStateComponent<Element>state - loaded component stateXmlSerializerUtil.copyBean(Object, Object)public VcsShowConfirmationOption getStandardConfirmation(VcsConfiguration.StandardConfirmation option, AbstractVcs vcs)
getStandardConfirmation in class ProjectLevelVcsManagerpublic java.util.List<VcsShowConfirmationOptionImpl> getAllConfirmations()
getAllConfirmations in class ProjectLevelVcsManagerExpublic VcsShowConfirmationOptionImpl getConfirmation(VcsConfiguration.StandardConfirmation option)
getConfirmation in class ProjectLevelVcsManagerExpublic void addVcsListener(VcsListener listener)
ProjectLevelVcsManageraddVcsListener in class ProjectLevelVcsManagerpublic void removeVcsListener(VcsListener listener)
ProjectLevelVcsManagerremoveVcsListener in class ProjectLevelVcsManagerpublic void startBackgroundVcsOperation()
ProjectLevelVcsManagerstartBackgroundVcsOperation in class ProjectLevelVcsManagerpublic void stopBackgroundVcsOperation()
ProjectLevelVcsManagerstopBackgroundVcsOperation in class ProjectLevelVcsManagerpublic boolean isBackgroundVcsOperationRunning()
ProjectLevelVcsManagerisBackgroundVcsOperationRunning in class ProjectLevelVcsManagerpublic java.util.List<VirtualFile> getRootsUnderVcsWithoutFiltering(AbstractVcs vcs)
getRootsUnderVcsWithoutFiltering in class ProjectLevelVcsManagerpublic VirtualFile [] getRootsUnderVcs(AbstractVcs vcs)
getRootsUnderVcs in class ProjectLevelVcsManagerpublic java.util.List<VirtualFile> getDetailedVcsMappings(AbstractVcs vcs)
ProjectLevelVcsManagergetDetailedVcsMappings in class ProjectLevelVcsManagerpublic VirtualFile[] getAllVersionedRoots()
getAllVersionedRoots in class ProjectLevelVcsManagerpublic VcsRoot [] getAllVcsRoots()
getAllVcsRoots in class ProjectLevelVcsManagerpublic void notifyDirectoryMappingChanged()
notifyDirectoryMappingChanged in class ProjectLevelVcsManagerExpublic boolean needAutodetectMappings()
setDirectoryMapping(java.lang.String, java.lang.String) vs setAutoDirectoryMappings(java.util.List<? extends com.intellij.openapi.vcs.VcsDirectoryMapping>))
myMappingsLoaded
ATTRIBUTE_DEFAULT_PROJECT)
public AbstractVcs findVersioningVcs(VirtualFile file)
findVersioningVcs in class ProjectLevelVcsManagerpublic VcsRootChecker getRootChecker(AbstractVcs vcs)
getRootChecker in class ProjectLevelVcsManagerpublic CheckoutProvider.Listener getCompositeCheckoutListener()
getCompositeCheckoutListener in class ProjectLevelVcsManagerpublic void fireDirectoryMappingsChanged()
fireDirectoryMappingsChanged in class ProjectLevelVcsManagerExpublic java.lang.String haveDefaultMapping()
haveDefaultMapping in class ProjectLevelVcsManagerEx@Deprecated public BackgroundableActionEnabledHandler getBackgroundableActionHandler(VcsBackgroundableActions action)
BackgroundableActionLockpublic void addInitializationRequest(VcsInitObject vcsInitObject, java.lang.Runnable runnable)
public boolean isFileInContent(VirtualFile vf)
isFileInContent in class ProjectLevelVcsManagerpublic boolean isIgnored(VirtualFile vf)
isIgnored in class ProjectLevelVcsManagerpublic boolean isIgnored(FilePath filePath)
isIgnored in class ProjectLevelVcsManagerpublic VcsHistoryCache getVcsHistoryCache()
getVcsHistoryCache in class ProjectLevelVcsManagerpublic ContentRevisionCache getContentRevisionCache()
getContentRevisionCache in class ProjectLevelVcsManagerpublic void waitForInitialized()