Package com.e1c.langtool.internal.sync
Class ProjectSynchronizationService
java.lang.Object
com.e1c.langtool.internal.sync.ProjectSynchronizationService
- All Implemented Interfaces:
IManagedService,InternalSynchronizationService,SynchronizationService
Default synchronization service implementation.
-
Field Summary
Fields inherited from interface com.e1c.langtool.sync.SynchronizationService
SERVICE_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()voidaddStateChangeListener(StateChangeListener listener) Adds the state change listener to get changes from all translated projects.voidgetChangeManager(ITranslatedProject translatedProject) Gets the change manager for the giventranslated project.Gets the source change manager forsource project.getState(ITranslatedProject project) Gets the state of synchronization for the translated project.getState(org.eclipse.core.resources.IProject project) Gets the state of synchronization for the translated project.Gets the synchronization manager for the translated project.getSynchronizationManager(org.eclipse.core.resources.IProject project) Gets the synchronization manager for the translated project.Gets the synchronizing executors pool.getSyncSettings(org.eclipse.core.resources.IProject source, org.eclipse.core.resources.IProject translated) Gets the sync settings from preference store.voidremoveStateChangeListener(StateChangeListener listener) Removes the state change listener from all translated projects.voidremoveSyncSettings(org.eclipse.core.resources.IProject project) Removes the sync settings for source project This method is for internal use only.org.eclipse.core.runtime.jobs.JobstartSync(ITranslatedProject project) Start async process of project synchronization.org.eclipse.core.runtime.jobs.JobstartSync(org.eclipse.core.resources.IProject project) Start sync for translated project and return current active or new created job of working synchronization process.voidStart async (each project in different job) synchronization of all translated projects.voidsyncAllProjects(org.eclipse.core.runtime.IProgressMonitor monitor) Synchronize all translated projects of all synchronizable projects.voidupdateSyncSettings(org.eclipse.core.resources.IProject source, org.eclipse.core.resources.IProject translated, SyncStrategy strategy) Update sync settings for translated project.
-
Constructor Details
-
ProjectSynchronizationService
public ProjectSynchronizationService()
-
-
Method Details
-
activate
public void activate()- Specified by:
activatein interfaceIManagedService
-
deactivate
public void deactivate()- Specified by:
deactivatein interfaceIManagedService
-
getState
Description copied from interface:SynchronizationServiceGets the state of synchronization for the translated project.- Specified by:
getStatein interfaceSynchronizationService- Parameters:
project- the translated project, cannot benull.- Returns:
- the state of synchronization, cannot return
null.
-
getState
Description copied from interface:SynchronizationServiceGets the state of synchronization for the translated project.- Specified by:
getStatein interfaceSynchronizationService- Parameters:
project- the translated project, cannot benull.- Returns:
- the state of synchronization, cannot return
null.
-
addStateChangeListener
Description copied from interface:SynchronizationServiceAdds the state change listener to get changes from all translated projects.- Specified by:
addStateChangeListenerin interfaceSynchronizationService- Parameters:
listener- the listener, cannot benull.
-
removeStateChangeListener
Description copied from interface:SynchronizationServiceRemoves the state change listener from all translated projects.- Specified by:
removeStateChangeListenerin interfaceSynchronizationService- Parameters:
listener- the listener, cannot benull.
-
syncAllProjects
public void syncAllProjects(org.eclipse.core.runtime.IProgressMonitor monitor) Description copied from interface:SynchronizationServiceSynchronize all translated projects of all synchronizable projects.- Specified by:
syncAllProjectsin interfaceSynchronizationService- Parameters:
monitor- the monitor
-
startSyncAllProjects
public void startSyncAllProjects()Description copied from interface:SynchronizationServiceStart async (each project in different job) synchronization of all translated projects. Call this method has no effect if synchronization of particular translated project is running.- Specified by:
startSyncAllProjectsin interfaceSynchronizationService- See Also:
-
startSync
Description copied from interface:SynchronizationServiceStart async process of project synchronization. Call this method has no effect if synchronization of the translated project is running.- Specified by:
startSyncin interfaceSynchronizationService- Parameters:
project- the project, cannot benull.- Returns:
- the job of synchronization, cannot return
null.
-
startSync
public org.eclipse.core.runtime.jobs.Job startSync(org.eclipse.core.resources.IProject project) Description copied from interface:InternalSynchronizationServiceStart sync for translated project and return current active or new created job of working synchronization process. This method is for internal use only.- Specified by:
startSyncin interfaceInternalSynchronizationService- Parameters:
project- the project, cannot benull.- Returns:
- the job of synchronization, cannot return
null.
-
getSynchronizationManager
public SynchronizationManager getSynchronizationManager(org.eclipse.core.resources.IProject project) Description copied from interface:SynchronizationServiceGets the synchronization manager for the translated project.- Specified by:
getSynchronizationManagerin interfaceSynchronizationService- Parameters:
project- the translated project, cannot benull.- Returns:
- the synchronization manager, cannot return
null.
-
getSynchronizationManager
Description copied from interface:SynchronizationServiceGets the synchronization manager for the translated project.- Specified by:
getSynchronizationManagerin interfaceSynchronizationService- Parameters:
project- the translated project, cannot benull.- Returns:
- the synchronization manager, cannot return
null.
-
getChangeManager
Description copied from interface:SynchronizationServiceGets the change manager for the giventranslated project.- Specified by:
getChangeManagerin interfaceSynchronizationService- Parameters:
translatedProject- the translated project, cannot benull.- Returns:
- the change manager, cannot return
null.
-
getSourceChangeManager
Description copied from interface:SynchronizationServiceGets the source change manager forsource project.- Specified by:
getSourceChangeManagerin interfaceSynchronizationService- Parameters:
project- the project, cannot benull.- Returns:
- the source change manager, cannot return
null.
-
getSyncPool
Description copied from interface:InternalSynchronizationServiceGets the synchronizing executors pool.- Specified by:
getSyncPoolin interfaceInternalSynchronizationService- Returns:
- the sync pool
-
removeSyncSettings
public void removeSyncSettings(org.eclipse.core.resources.IProject project) Description copied from interface:InternalSynchronizationServiceRemoves the sync settings for source project This method is for internal use only.- Specified by:
removeSyncSettingsin interfaceInternalSynchronizationService- Parameters:
project- the source project, cannot benull.
-
updateSyncSettings
public void updateSyncSettings(org.eclipse.core.resources.IProject source, org.eclipse.core.resources.IProject translated, SyncStrategy strategy) Description copied from interface:InternalSynchronizationServiceUpdate sync settings for translated project. This method is for internal use only.- Specified by:
updateSyncSettingsin interfaceInternalSynchronizationService- Parameters:
source- the source project, cannot benull.translated- the translated project, cannot benull.strategy- the strategy, cannot benull.
-
getSyncSettings
public SyncStrategy getSyncSettings(org.eclipse.core.resources.IProject source, org.eclipse.core.resources.IProject translated) Description copied from interface:InternalSynchronizationServiceGets the sync settings from preference store. This method is for internal use only.- Specified by:
getSyncSettingsin interfaceInternalSynchronizationService- Parameters:
source- the source project, cannot benull.translated- the translated project, cannot benull.- Returns:
- the sync settings
-