Package com.e1c.langtool.internal.sync
Class ProjectSynchronization
java.lang.Object
com.e1c.langtool.internal.sync.ProjectSynchronization
- All Implemented Interfaces:
SynchronizationManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStateChangeListener(StateChangeListener listener) Adds the state change listener to get changes from this translated project.protected voidfireStateChanged(StateChangeEvent event) Notifies any state change listeners that a sync state change event has been received.Gets the equality state of synchronization.Gets the synchronization strategy.Gets the translated project.voidremoveStateChangeListener(StateChangeListener listener) Removes the state change listener from this translated project.voidsetEqualityState(EqualityState equalityState) voidsetSyncStrategy(SyncStrategy strategy) Sets the synchronization strategy.voidsetTranslatedProject(ITranslatedProject translatedProject) org.eclipse.core.runtime.IStatussynchronize(org.eclipse.core.runtime.IProgressMonitor monitor) Synchronize the project.
-
Constructor Details
-
ProjectSynchronization
-
-
Method Details
-
getTranslatedProject
Description copied from interface:SynchronizationManagerGets the translated project.- Specified by:
getTranslatedProjectin interfaceSynchronizationManager- Returns:
- the translated project, cannot return
null.
-
setTranslatedProject
-
getSyncStrategy
Description copied from interface:SynchronizationManagerGets the synchronization strategy.- Specified by:
getSyncStrategyin interfaceSynchronizationManager- Returns:
- the sync strategy, cannot return
null.
-
setSyncStrategy
Description copied from interface:SynchronizationManagerSets the synchronization strategy.- Specified by:
setSyncStrategyin interfaceSynchronizationManager- Parameters:
strategy- the new sync strategy, cannot benull.
-
getEqualityState
Description copied from interface:SynchronizationManagerGets the equality state of synchronization.- Specified by:
getEqualityStatein interfaceSynchronizationManager- Returns:
- the equality state, cannot return
null.
-
setEqualityState
-
addStateChangeListener
Description copied from interface:SynchronizationManagerAdds the state change listener to get changes from this translated project.- Specified by:
addStateChangeListenerin interfaceSynchronizationManager- Parameters:
listener- the listener, cannot benull.
-
removeStateChangeListener
Description copied from interface:SynchronizationManagerRemoves the state change listener from this translated project.- Specified by:
removeStateChangeListenerin interfaceSynchronizationManager- Parameters:
listener- the listener, cannot benull.
-
synchronize
public org.eclipse.core.runtime.IStatus synchronize(org.eclipse.core.runtime.IProgressMonitor monitor) Description copied from interface:SynchronizationManagerSynchronize the project.Note: Caller of this method must respect that
servicecan start a job to sychronize this project and more correct way to call serviceSynchronizationService.startSync(ITranslatedProject)and wait untill job is done.- Specified by:
synchronizein interfaceSynchronizationManager- Parameters:
monitor- the monitor, cannot benull.- Returns:
- the status of operation, cannot return
null. - See Also:
-
fireStateChanged
Notifies any state change listeners that a sync state change event has been received. Only listeners registered at the time this method is called are notified.- Parameters:
event- a state changed event- See Also:
-