public class SyncManager
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SyncManager.SyncMode |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTR_CLASS |
static java.lang.String |
ATTR_NATURE |
static java.lang.String |
SYNCHRONIZE_POLICY_EXTENSION |
| Modifier and Type | Method and Description |
|---|---|
static void |
addPostSyncListener(org.eclipse.core.resources.IProject project,
ISyncListener listener)
Add a listener for sync events on a certain project
|
static PreferenceSyncFileFilterStorage |
getDefaultFileFilter()
Return a copy of the default file filter
If there are any problems retrieving the filter, the built-in default filter is returned.
|
static IMissingConnectionHandler |
getDefaultMissingConnectionHandler()
Get the current default missing connection handler
|
static ISyncExceptionHandler |
getDefaultSyncExceptionHandler()
Get the current default sync exception handler
|
static AbstractSyncFileFilter |
getFileFilter(org.eclipse.core.resources.IProject project)
Return a copy of the project's file filter.
|
static boolean |
getShowErrors(org.eclipse.core.resources.IProject project)
Should error messages be displayed for the given project?
|
static boolean |
getSyncAuto()
Should sync'ing be done automatically?
|
static SyncManager.SyncMode |
getSyncMode(org.eclipse.core.resources.IProject project)
Get auto-sync mode for a project
|
static ISynchronizeService |
getSyncService(java.lang.String syncServiceId)
Get the synchronize service for the given sync service id
|
static void |
makeSyncProject(org.eclipse.core.resources.IProject project,
java.lang.String remoteSyncConfigName,
java.lang.String syncServiceId,
IRemoteConnection conn,
java.lang.String location,
AbstractSyncFileFilter fileFilter)
Convert a project into a synchronized project.
|
static void |
removePostSyncListener(org.eclipse.core.resources.IProject project,
ISyncListener listener)
Remove a listener for sync events on a certain project
|
static void |
saveFileFilter(org.eclipse.core.resources.IProject project,
AbstractSyncFileFilter filter)
Save a new file filter for a project.
|
static void |
setDefaultMissingConnectionHandler(IMissingConnectionHandler handler)
Set the default sync exception handler
|
static void |
setDefaultSyncExceptionHandler(ISyncExceptionHandler handler)
Set the default sync exception handler
|
static void |
setShowErrors(org.eclipse.core.resources.IProject project,
boolean shouldBeDisplayed)
Set whether error messages should be displayed
|
static void |
setSyncAuto(boolean isSyncAutomatic)
Turn automatic sync'ing on or off
|
static void |
setSyncMode(org.eclipse.core.resources.IProject project,
SyncManager.SyncMode mode)
Set sync mode for a project
|
static org.eclipse.core.runtime.jobs.Job |
sync(org.eclipse.core.resources.IResourceDelta delta,
org.eclipse.core.resources.IProject project,
java.util.Set<SyncFlag> syncFlags,
ISyncExceptionHandler seHandler)
Invoke sync for active (default) configuration on a project
|
static org.eclipse.core.runtime.jobs.Job[] |
syncAll(org.eclipse.core.resources.IResourceDelta delta,
org.eclipse.core.resources.IProject project,
java.util.Set<SyncFlag> syncFlags,
ISyncExceptionHandler seHandler)
Invoke sync for all configurations on a project.
|
static org.eclipse.core.runtime.jobs.Job[] |
syncAllBlocking(org.eclipse.core.resources.IResourceDelta delta,
org.eclipse.core.resources.IProject project,
java.util.Set<SyncFlag> syncFlags,
ISyncExceptionHandler seHandler)
Invoke sync for all configurations on a project and block until the sync finishes.
|
static org.eclipse.core.runtime.jobs.Job |
syncBlocking(org.eclipse.core.resources.IResourceDelta delta,
org.eclipse.core.resources.IProject project,
java.util.Set<SyncFlag> syncFlags,
org.eclipse.core.runtime.IProgressMonitor monitor)
Invoke sync and block until sync finishes.
|
static org.eclipse.core.runtime.jobs.Job |
syncBlocking(org.eclipse.core.resources.IResourceDelta delta,
org.eclipse.core.resources.IProject project,
java.util.Set<SyncFlag> syncFlags,
org.eclipse.core.runtime.IProgressMonitor monitor,
ISyncExceptionHandler seHandler)
Invoke sync and block until sync finishes.
|
public static final java.lang.String SYNCHRONIZE_POLICY_EXTENSION
public static final java.lang.String ATTR_CLASS
public static final java.lang.String ATTR_NATURE
public static void addPostSyncListener(org.eclipse.core.resources.IProject project,
ISyncListener listener)
project - listener - public static void makeSyncProject(org.eclipse.core.resources.IProject project,
java.lang.String remoteSyncConfigName,
java.lang.String syncServiceId,
IRemoteConnection conn,
java.lang.String location,
AbstractSyncFileFilter fileFilter)
throws org.eclipse.core.runtime.CoreException
project - project to convertprovider - ISynchronizeService that has been correctly configuredfileFilter - synchronize filter, or null if no filterorg.eclipse.core.runtime.CoreException - on problems adding sync naturepublic static PreferenceSyncFileFilterStorage getDefaultFileFilter()
public static IMissingConnectionHandler getDefaultMissingConnectionHandler()
public static ISyncExceptionHandler getDefaultSyncExceptionHandler()
public static AbstractSyncFileFilter getFileFilter(org.eclipse.core.resources.IProject project)
project - cannot be nullpublic static boolean getShowErrors(org.eclipse.core.resources.IProject project)
project - public static boolean getSyncAuto()
public static SyncManager.SyncMode getSyncMode(org.eclipse.core.resources.IProject project)
project - cannot be nullpublic static ISynchronizeService getSyncService(java.lang.String syncServiceId)
syncServiceId - public static void removePostSyncListener(org.eclipse.core.resources.IProject project,
ISyncListener listener)
project - listener - public static void saveFileFilter(org.eclipse.core.resources.IProject project,
AbstractSyncFileFilter filter)
throws org.eclipse.core.runtime.CoreException
project - cannot be nullfilter - cannot be nullorg.eclipse.core.runtime.CoreExceptionpublic static void setDefaultMissingConnectionHandler(IMissingConnectionHandler handler)
handler - public static void setDefaultSyncExceptionHandler(ISyncExceptionHandler handler)
handler - public static void setShowErrors(org.eclipse.core.resources.IProject project,
boolean shouldBeDisplayed)
project - shouldBeDisplayed - public static void setSyncAuto(boolean isSyncAutomatic)
isSyncAutomatic - public static void setSyncMode(org.eclipse.core.resources.IProject project,
SyncManager.SyncMode mode)
project - mode - public static org.eclipse.core.runtime.jobs.Job sync(org.eclipse.core.resources.IResourceDelta delta,
org.eclipse.core.resources.IProject project,
java.util.Set<SyncFlag> syncFlags,
ISyncExceptionHandler seHandler)
throws org.eclipse.core.runtime.CoreException
delta - project deltaproject - project to syncsyncFlags - sync flagsseHandler - logic to handle exceptionsorg.eclipse.core.runtime.CoreExceptionpublic static org.eclipse.core.runtime.jobs.Job[] syncAll(org.eclipse.core.resources.IResourceDelta delta,
org.eclipse.core.resources.IProject project,
java.util.Set<SyncFlag> syncFlags,
ISyncExceptionHandler seHandler)
throws org.eclipse.core.runtime.CoreException
delta - project deltaproject - project to syncsyncFlags - sync flagsseHandler - logic to handle exceptionsorg.eclipse.core.runtime.CoreException - on problems sync'ingpublic static org.eclipse.core.runtime.jobs.Job[] syncAllBlocking(org.eclipse.core.resources.IResourceDelta delta,
org.eclipse.core.resources.IProject project,
java.util.Set<SyncFlag> syncFlags,
ISyncExceptionHandler seHandler)
throws org.eclipse.core.runtime.CoreException
delta - project deltaproject - project to syncsyncFlags - sync flagsseHandler - logic to handle exceptionsorg.eclipse.core.runtime.CoreException - on problems sync'ingpublic static org.eclipse.core.runtime.jobs.Job syncBlocking(org.eclipse.core.resources.IResourceDelta delta,
org.eclipse.core.resources.IProject project,
java.util.Set<SyncFlag> syncFlags,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException
delta - project deltaproject - project to syncsyncFlags - sync flagsmonitor - progress monitororg.eclipse.core.runtime.CoreException - on problems sync'ingpublic static org.eclipse.core.runtime.jobs.Job syncBlocking(org.eclipse.core.resources.IResourceDelta delta,
org.eclipse.core.resources.IProject project,
java.util.Set<SyncFlag> syncFlags,
org.eclipse.core.runtime.IProgressMonitor monitor,
ISyncExceptionHandler seHandler)
throws org.eclipse.core.runtime.CoreException
delta - project deltaproject - project to syncsyncFlags - sync flagsmonitor - progress monitorseHandler - sync exception handlerorg.eclipse.core.runtime.CoreException - on problems sync'ingCopyright (c) 2011 IBM Corporation and others. All Rights Reserved.