Package com.iizigo.java
Class SyncState
java.lang.Object
com.iizigo.java.SyncState
- All Implemented Interfaces:
- org.eclipse.core.runtime.jobs.IJobChangeListener
Synchronization state class or Java in regards to refactoring.
- Method SummaryModifier and TypeMethodDescription- void- aboutToRun- (org.eclipse.core.runtime.jobs.IJobChangeEvent event) Notification that a job is about to be run.- static void- addSyncStateListener- (ISyncStateListener listener) Adds a listener for synchronized state.- void- awake- (org.eclipse.core.runtime.jobs.IJobChangeEvent event) Notification that a job was previously sleeping and has now been rescheduled to run.- static voidCalled from workspace when a build starts using resource change listener rather than job checking, because a Job is often triggered but not doing anything in the end.- void- done- (org.eclipse.core.runtime.jobs.IJobChangeEvent event) Notification that a job has completed execution, either due to cancellation, successful completion, or failure.- static voidCalled whenever the workspace changes in such a way that it would require a build operation.- static int- getState()Gets the current state.- static booleanChecks if refactor-styled operations should be prohibited due to the unsynchronized state.- static void- removeSyncStateListener- (ISyncStateListener listener) Removes a listener for synchronized state.- void- running- (org.eclipse.core.runtime.jobs.IJobChangeEvent event) Notification that a job has started running.- void- scheduled- (org.eclipse.core.runtime.jobs.IJobChangeEvent event) Notification that a job is being added to the queue of scheduled jobs.- static void- setAutoBuilding- (boolean on) Turn on auto-building.- void- sleeping- (org.eclipse.core.runtime.jobs.IJobChangeEvent event) Notification that a job was waiting to run and has now been put in the sleeping state.- static void- start()Called when the first Module project is opened.- static void- stop()Called when the last Module project is closed or the plug-in is stopped.
- Method Details- addSyncStateListenerAdds a listener for synchronized state.
- removeSyncStateListenerRemoves a listener for synchronized state.
- startpublic static void start()Called when the first Module project is opened.
- stoppublic static void stop()Called when the last Module project is closed or the plug-in is stopped.
- enterInhibitStatepublic static void enterInhibitState()Called whenever the workspace changes in such a way that it would require a build operation.
- isSynchronizedpublic static boolean isSynchronized()Checks if refactor-styled operations should be prohibited due to the unsynchronized state.
- getStatepublic static int getState()Gets the current state.- Returns:
- On of the values READY, INHIBIT, BUSY or AUTOBUILD_DISABLED.
 
- setAutoBuildingpublic static void setAutoBuilding- (boolean on) throws org.eclipse.core.runtime.CoreException Turn on auto-building.- Parameters:
- on- Flag.
- Throws:
- org.eclipse.core.runtime.CoreException- If it failed changing the state.
 
- buildStartedpublic static void buildStarted()Called from workspace when a build starts using resource change listener rather than job checking, because a Job is often triggered but not doing anything in the end.
- aboutToRunpublic void aboutToRun- (org.eclipse.core.runtime.jobs.IJobChangeEvent event) Notification that a job is about to be run. Listeners are allowed to sleep, cancel, or change the priority of the job before it is started (and as a result may prevent the run from actually occurring).- Specified by:
- aboutToRunin interface- org.eclipse.core.runtime.jobs.IJobChangeListener
- Parameters:
- event- the event details
 
- awakepublic void awake- (org.eclipse.core.runtime.jobs.IJobChangeEvent event) Notification that a job was previously sleeping and has now been rescheduled to run.- Specified by:
- awakein interface- org.eclipse.core.runtime.jobs.IJobChangeListener
- Parameters:
- event- the event details
 
- donepublic void done- (org.eclipse.core.runtime.jobs.IJobChangeEvent event) Notification that a job has completed execution, either due to cancellation, successful completion, or failure. The event status object indicates how the job finished, and the reason for failure, if applicable.- Specified by:
- donein interface- org.eclipse.core.runtime.jobs.IJobChangeListener
- Parameters:
- event- the event details
 
- scheduledpublic void scheduled- (org.eclipse.core.runtime.jobs.IJobChangeEvent event) Notification that a job is being added to the queue of scheduled jobs. The event details includes the scheduling delay before the job should start running.- Specified by:
- scheduledin interface- org.eclipse.core.runtime.jobs.IJobChangeListener
- Parameters:
- event- the event details, including the job instance and the scheduling delay
 
- sleepingpublic void sleeping- (org.eclipse.core.runtime.jobs.IJobChangeEvent event) Notification that a job was waiting to run and has now been put in the sleeping state.- Specified by:
- sleepingin interface- org.eclipse.core.runtime.jobs.IJobChangeListener
- Parameters:
- event- the event details
 
- runningpublic void running- (org.eclipse.core.runtime.jobs.IJobChangeEvent event) Notification that a job has started running.- Specified by:
- runningin interface- org.eclipse.core.runtime.jobs.IJobChangeListener
- Parameters:
- event- the event details