public class SyncState extends Object implements IJobChangeListener
Modifier and Type | Method and Description |
---|---|
void |
aboutToRun(IJobChangeEvent event)
Notification that a job is about to be run.
|
static void |
addSyncStateListener(ISyncStateListener listener)
Adds a listener for synchronized state.
|
void |
awake(IJobChangeEvent event)
Notification that a job was previously sleeping and has now been rescheduled
to run.
|
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.
|
void |
done(IJobChangeEvent event)
Notification that a job has completed execution, either due to cancellation, successful
completion, or failure.
|
static void |
enterInhibitState()
Called whenever the workspace changes in such a way that it would require a build operation.
|
static int |
getState()
Gets the current state.
|
static boolean |
isSynchronized()
Checks 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(IJobChangeEvent event)
Notification that a job has started running.
|
void |
scheduled(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(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.
|
public static void addSyncStateListener(ISyncStateListener listener)
public static void removeSyncStateListener(ISyncStateListener listener)
public static void start()
public static void stop()
public static void enterInhibitState()
public static boolean isSynchronized()
public static int getState()
public static void setAutoBuilding(boolean on) throws CoreException
on
- Flag.CoreException
- If it failed changing the state.public static void buildStarted()
public void aboutToRun(IJobChangeEvent event)
aboutToRun
in interface IJobChangeListener
event
- the event detailspublic void awake(IJobChangeEvent event)
awake
in interface IJobChangeListener
event
- the event detailspublic void done(IJobChangeEvent event)
done
in interface IJobChangeListener
event
- the event detailspublic void scheduled(IJobChangeEvent event)
scheduled
in interface IJobChangeListener
event
- the event details, including the job instance and the scheduling
delaypublic void sleeping(IJobChangeEvent event)
sleeping
in interface IJobChangeListener
event
- the event detailspublic void running(IJobChangeEvent event)
running
in interface IJobChangeListener
event
- the event detailsiizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.