Class InMemoryChangeManagerProxy
java.lang.Object
com.e1c.langtool.internal.sync.change.InMemoryChangeManagerProxy
- All Implemented Interfaces:
ChangeManager,EditingChangeManager
Change manager stores in memory all path that need to synchronize or remove in translated project.
-
Constructor Summary
ConstructorsConstructorDescriptionInMemoryChangeManagerProxy(org.eclipse.core.resources.IProject sourceProject, org.eclipse.core.resources.IProject translatedProject) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPostChangeListener(PostChangeListener listener) Adds the post change listener.protected voidvoidclear()Clear all changes in the manager.voiddispose()Dispose change manager.protected voidfirePostChanged(ChangeEvent event) Notifies any post change listeners that a post change event has been received.Collection<org.eclipse.core.runtime.IPath>Gets the full path of files to remove.Collection<org.eclipse.core.runtime.IPath>Gets the full path of files to update.voidinitialize(org.eclipse.core.runtime.IProgressMonitor monitor) Initialize the change manager to accept changes.booleanChecks if the change manager is disposed.booleanChecks if the manager is initialized.booleanisMuted()Checks if the change manager is muted of sending event notifications.voidmarkRemoved(org.eclipse.core.runtime.IPath fullPath) Mark the file as removed in target project.voidmarkSynchronized(org.eclipse.core.runtime.IPath fullPath) Mark the file as synchronized with target project.voidmarkToRemove(org.eclipse.core.resources.IFile file) Mark the file to remove in translated project.voidmarkToRemove(org.eclipse.core.runtime.IPath fullPath) Mark the file (its full path) to remove in translated project.voidmarkToSynchronize(org.eclipse.core.resources.IFile file) Mark the file to synchronize to translated project if it exists.voidmarkToSynchronize(org.eclipse.core.runtime.IPath fullPath) Mark the file (its full path) to synchronize to translated project.voidmoved(org.eclipse.core.resources.IFile from, org.eclipse.core.resources.IFile to) Mark file as moved to enother place.voidmute()Mute event notification.voidremovePostChangeListener(PostChangeListener listener) Removes the post change listener.voidunmute()Unmute the change manager to send event notifications.voidunmute(ChangeEvent event) Unmute the change manager to send event notifications and notify an event.
-
Constructor Details
-
InMemoryChangeManagerProxy
public InMemoryChangeManagerProxy(org.eclipse.core.resources.IProject sourceProject, org.eclipse.core.resources.IProject translatedProject)
-
-
Method Details
-
clear
public void clear()Description copied from interface:EditingChangeManagerClear all changes in the manager.- Specified by:
clearin interfaceEditingChangeManager
-
markToSynchronize
public void markToSynchronize(org.eclipse.core.runtime.IPath fullPath) Description copied from interface:EditingChangeManagerMark the file (its full path) to synchronize to translated project.- Specified by:
markToSynchronizein interfaceEditingChangeManager- Parameters:
fullPath- the full path
-
markToRemove
public void markToRemove(org.eclipse.core.runtime.IPath fullPath) Description copied from interface:EditingChangeManagerMark the file (its full path) to remove in translated project.- Specified by:
markToRemovein interfaceEditingChangeManager- Parameters:
fullPath- the full path
-
getFilesToUpdate
Description copied from interface:ChangeManagerGets the full path of files to update.- Specified by:
getFilesToUpdatein interfaceChangeManager- Returns:
- the collection of full path of files to update
-
getFilesToRemove
Description copied from interface:ChangeManagerGets the full path of files to remove.- Specified by:
getFilesToRemovein interfaceChangeManager- Returns:
- the collection of full path of files to remove
-
markToSynchronize
public void markToSynchronize(org.eclipse.core.resources.IFile file) Description copied from interface:EditingChangeManagerMark the file to synchronize to translated project if it exists. Call this method equivalent to call:if (!file.isAccesseble()) return; markToSynchronize(file.getFullPath());- Specified by:
markToSynchronizein interfaceEditingChangeManager- Parameters:
file- the file to synchronize- See Also:
-
moved
public void moved(org.eclipse.core.resources.IFile from, org.eclipse.core.resources.IFile to) Description copied from interface:EditingChangeManagerMark file as moved to enother place.- Specified by:
movedin interfaceEditingChangeManager- Parameters:
from- the from fileto- the to file
-
markToRemove
public void markToRemove(org.eclipse.core.resources.IFile file) Description copied from interface:EditingChangeManagerMark the file to remove in translated project.- Specified by:
markToRemovein interfaceEditingChangeManager- Parameters:
file- the file
-
markSynchronized
public void markSynchronized(org.eclipse.core.runtime.IPath fullPath) Description copied from interface:ChangeManagerMark the file as synchronized with target project.- Specified by:
markSynchronizedin interfaceChangeManager- Parameters:
fullPath- the full path, cannot benull.
-
markRemoved
public void markRemoved(org.eclipse.core.runtime.IPath fullPath) Description copied from interface:ChangeManagerMark the file as removed in target project.- Specified by:
markRemovedin interfaceChangeManager- Parameters:
fullPath- the full path, cannot benull.
-
mute
public void mute()Description copied from interface:EditingChangeManagerMute event notification.- Specified by:
mutein interfaceEditingChangeManager
-
isMuted
public boolean isMuted()Description copied from interface:EditingChangeManagerChecks if the change manager is muted of sending event notifications.- Specified by:
isMutedin interfaceEditingChangeManager- Returns:
- true, if the change manager is muted
-
unmute
public void unmute()Description copied from interface:EditingChangeManagerUnmute the change manager to send event notifications.- Specified by:
unmutein interfaceEditingChangeManager
-
unmute
Description copied from interface:EditingChangeManagerUnmute the change manager to send event notifications and notify an event.- Specified by:
unmutein interfaceEditingChangeManager- Parameters:
event- the event
-
addPostChangeListener
Description copied from interface:EditingChangeManagerAdds the post change listener.- Specified by:
addPostChangeListenerin interfaceEditingChangeManager- Parameters:
listener- the listener
-
removePostChangeListener
Description copied from interface:EditingChangeManagerRemoves the post change listener.- Specified by:
removePostChangeListenerin interfaceEditingChangeManager- Parameters:
listener- the listener
-
initialize
public void initialize(org.eclipse.core.runtime.IProgressMonitor monitor) Description copied from interface:ChangeManagerInitialize the change manager to accept changes. Clients must call this method must explicitly before use this manager in synchronization to get content fromChangeManager.getFilesToUpdate()or fromChangeManager.getFilesToRemove(). Calling this method several times has no effect if it is already initialized.- Specified by:
initializein interfaceChangeManager- Parameters:
monitor- the monitor- See Also:
-
isInitialized
public boolean isInitialized()Description copied from interface:ChangeManagerChecks if the manager is initialized.- Specified by:
isInitializedin interfaceChangeManager- Returns:
- true, if the manager is initialized
-
firePostChanged
Notifies any post change listeners that a post change event has been received. Only listeners registered at the time this method is called are notified.Note: if the manager is muted events cannot be sent.
- Parameters:
event- a selection changed event- See Also:
-
dispose
public void dispose()Description copied from interface:EditingChangeManagerDispose change manager.- Specified by:
disposein interfaceEditingChangeManager
-
isDisposed
public boolean isDisposed()Description copied from interface:EditingChangeManagerChecks if the change manager is disposed.- Specified by:
isDisposedin interfaceEditingChangeManager- Returns:
- true, if the manager is disposed
-
checkAccess
protected void checkAccess()
-