aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2018-04-27 10:43:52 -0400
committerLars Vogel2018-04-27 10:54:18 -0400
commitd560282a53dc38c3aef8e7887802cc2a099c9c77 (patch)
tree690c6f907e5167f05c0e23947856ac406805d344
parentd34f0b7771fb506cf7a94b4032f48e53f88ad53d (diff)
downloadeclipse.platform.runtime-d560282a53dc38c3aef8e7887802cc2a099c9c77.tar.gz
eclipse.platform.runtime-d560282a53dc38c3aef8e7887802cc2a099c9c77.tar.xz
eclipse.platform.runtime-d560282a53dc38c3aef8e7887802cc2a099c9c77.zip
Remove redundant modifiers from org.eclipse.core.jobs
Includes activation of the save action Change-Id: I7a69e52f4dde9e6d1c58f98f3e1cac4ed4914ba8 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--bundles/org.eclipse.core.jobs/.settings/org.eclipse.jdt.ui.prefs1
-rw-r--r--bundles/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobListeners.java2
-rw-r--r--bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobChangeEvent.java8
-rw-r--r--bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobChangeListener.java12
-rw-r--r--bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobFunction.java2
-rw-r--r--bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobManager.java50
-rw-r--r--bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobStatus.java2
-rw-r--r--bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/ILock.java8
-rw-r--r--bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/ISchedulingRule.java4
9 files changed, 44 insertions, 45 deletions
diff --git a/bundles/org.eclipse.core.jobs/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.core.jobs/.settings/org.eclipse.jdt.ui.prefs
index 6008234c5..53d204bb8 100644
--- a/bundles/org.eclipse.core.jobs/.settings/org.eclipse.jdt.ui.prefs
+++ b/bundles/org.eclipse.core.jobs/.settings/org.eclipse.jdt.ui.prefs
@@ -102,6 +102,7 @@ sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_modifiers=true
sp_cleanup.remove_redundant_type_arguments=false
sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true
diff --git a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobListeners.java b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobListeners.java
index f5655829e..490ea17b6 100644
--- a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobListeners.java
+++ b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobListeners.java
@@ -21,7 +21,7 @@ import org.eclipse.osgi.util.NLS;
*/
class JobListeners {
interface IListenerDoit {
- public void notify(IJobChangeListener listener, IJobChangeEvent event);
+ void notify(IJobChangeListener listener, IJobChangeEvent event);
}
private final IListenerDoit aboutToRun = IJobChangeListener::aboutToRun;
diff --git a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobChangeEvent.java b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobChangeEvent.java
index 5cbf0839a..a1c85ed51 100644
--- a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobChangeEvent.java
+++ b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobChangeEvent.java
@@ -29,14 +29,14 @@ public interface IJobChangeEvent {
*
* @return the delay time for this event
*/
- public long getDelay();
+ long getDelay();
/**
* The job on which this event occurred.
*
* @return the job for this event
*/
- public Job getJob();
+ Job getJob();
/**
* The result returned by the job's run method, or <code>null</code> if
@@ -44,7 +44,7 @@ public interface IJobChangeEvent {
*
* @return the status for this event
*/
- public IStatus getResult();
+ IStatus getResult();
/**
* The result returned by the job's job group, if this event signals
@@ -54,5 +54,5 @@ public interface IJobChangeEvent {
* @return the job group status for this event, or <code>null</code>
* @since 3.7
*/
- public IStatus getJobGroupResult();
+ IStatus getJobGroupResult();
}
diff --git a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobChangeListener.java b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobChangeListener.java
index 26ee6e167..101c3607b 100644
--- a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobChangeListener.java
+++ b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobChangeListener.java
@@ -41,7 +41,7 @@ public interface IJobChangeListener {
*
* @param event the event details
*/
- public void aboutToRun(IJobChangeEvent event);
+ void aboutToRun(IJobChangeEvent event);
/**
* Notification that a job was previously sleeping and has now been rescheduled
@@ -49,7 +49,7 @@ public interface IJobChangeListener {
*
* @param event the event details
*/
- public void awake(IJobChangeEvent event);
+ void awake(IJobChangeEvent event);
/**
* Notification that a job has completed execution, either due to cancelation, successful
@@ -58,14 +58,14 @@ public interface IJobChangeListener {
*
* @param event the event details
*/
- public void done(IJobChangeEvent event);
+ void done(IJobChangeEvent event);
/**
* Notification that a job has started running.
*
* @param event the event details
*/
- public void running(IJobChangeEvent event);
+ void running(IJobChangeEvent event);
/**
* Notification that a job is being added to the queue of scheduled jobs.
@@ -75,7 +75,7 @@ public interface IJobChangeListener {
* @param event the event details, including the job instance and the scheduling
* delay
*/
- public void scheduled(IJobChangeEvent event);
+ void scheduled(IJobChangeEvent event);
/**
* Notification that a job was waiting to run and has now been put in the
@@ -83,5 +83,5 @@ public interface IJobChangeListener {
*
* @param event the event details
*/
- public void sleeping(IJobChangeEvent event);
+ void sleeping(IJobChangeEvent event);
}
diff --git a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobFunction.java b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobFunction.java
index 0cadd6b67..5efcbfa57 100644
--- a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobFunction.java
+++ b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobFunction.java
@@ -51,5 +51,5 @@ public interface IJobFunction {
* @see Job#ASYNC_FINISH
* @see Job#done(IStatus)
*/
- public IStatus run(IProgressMonitor monitor);
+ IStatus run(IProgressMonitor monitor);
}
diff --git a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobManager.java b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobManager.java
index d5ca6cf74..1de17df76 100644
--- a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobManager.java
+++ b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobManager.java
@@ -44,7 +44,7 @@ public interface IJobManager {
* all worker threads to be created as non-daemon threads.
* @since 3.3
*/
- public static final String PROP_USE_DAEMON_THREADS = "eclipse.jobs.daemon"; //$NON-NLS-1$
+ String PROP_USE_DAEMON_THREADS = "eclipse.jobs.daemon"; //$NON-NLS-1$
/**
* Registers a job listener with the job manager.
@@ -54,7 +54,7 @@ public interface IJobManager {
* @see #removeJobChangeListener(IJobChangeListener)
* @see IJobChangeListener
*/
- public void addJobChangeListener(IJobChangeListener listener);
+ void addJobChangeListener(IJobChangeListener listener);
/**
* Begins applying this rule in the calling thread. If the rule conflicts with another
@@ -96,7 +96,7 @@ public interface IJobManager {
* before the rule becomes available
* @see ISchedulingRule#contains(ISchedulingRule)
*/
- public void beginRule(ISchedulingRule rule, IProgressMonitor monitor);
+ void beginRule(ISchedulingRule rule, IProgressMonitor monitor);
/**
* Cancels all jobs in the given job family. Jobs in the family that are currently waiting
@@ -107,7 +107,7 @@ public interface IJobManager {
* @param family the job family to cancel, or <code>null</code> to cancel all jobs
* @see Job#belongsTo(Object)
*/
- public void cancel(Object family);
+ void cancel(Object family);
/**
* Returns a progress monitor that can be used to provide aggregated progress
@@ -118,7 +118,7 @@ public interface IJobManager {
* <p>
* Recommended usage (this snippet runs two jobs in sequence in a single
* progress group):
- *
+ *
* <pre>
* Job parseJob, compileJob;
* IProgressMonitor pm = Job.getJobManager().createProgressGroup();
@@ -139,7 +139,7 @@ public interface IJobManager {
* @see IProgressMonitor
* @return a progress monitor
*/
- public IProgressMonitor createProgressGroup();
+ IProgressMonitor createProgressGroup();
/**
* Returns the scheduling rule currently held by this thread, or <code>null</code>
@@ -155,7 +155,7 @@ public interface IJobManager {
* @return the current rule or <code>null</code>
* @since 3.5
*/
- public ISchedulingRule currentRule();
+ ISchedulingRule currentRule();
/**
* Returns the job that is currently running in this thread, or <code>null</code> if there
@@ -163,7 +163,7 @@ public interface IJobManager {
*
* @return the job or <code>null</code>
*/
- public Job currentJob();
+ Job currentJob();
/**
* Ends the application of a rule to the calling thread. Calls to <tt>endRule</tt>
@@ -180,7 +180,7 @@ public interface IJobManager {
* there is no matching begin, or that does not match the most recent begin.
* @see ISchedulingRule#contains(ISchedulingRule)
*/
- public void endRule(ISchedulingRule rule);
+ void endRule(ISchedulingRule rule);
/**
* Returns all waiting, executing and sleeping jobs belonging
@@ -190,7 +190,7 @@ public interface IJobManager {
* @return the job array
* @see Job#belongsTo(Object)
*/
- public Job[] find(Object family);
+ Job[] find(Object family);
/**
* Returns whether the job manager is currently idle. The job manager is
@@ -200,7 +200,7 @@ public interface IJobManager {
* <code>false</code> otherwise
* @since 3.1
*/
- public boolean isIdle();
+ boolean isIdle();
/**
* Returns whether the job manager is currently suspended.
@@ -211,7 +211,7 @@ public interface IJobManager {
* @see #suspend()
* @see #resume()
*/
- public boolean isSuspended();
+ boolean isSuspended();
/**
* Waits until all jobs of the given family are finished. This method will block the
@@ -240,7 +240,7 @@ public interface IJobManager {
* @see Job#belongsTo(Object)
* @see #suspend()
*/
- public void join(Object family, IProgressMonitor monitor) throws InterruptedException, OperationCanceledException;
+ void join(Object family, IProgressMonitor monitor) throws InterruptedException, OperationCanceledException;
/**
* Creates a new lock object. All lock objects supplied by the job manager
@@ -249,7 +249,7 @@ public interface IJobManager {
*
* @return the new lock object
*/
- public ILock newLock();
+ ILock newLock();
/**
* Removes a job listener from the job manager.
@@ -259,7 +259,7 @@ public interface IJobManager {
* @see #addJobChangeListener(IJobChangeListener)
* @see IJobChangeListener
*/
- public void removeJobChangeListener(IJobChangeListener listener);
+ void removeJobChangeListener(IJobChangeListener listener);
/**
* Resumes execution of jobs after a previous <code>suspend</code>. All
@@ -277,8 +277,7 @@ public interface IJobManager {
* and can result in concurrency problems in all clients that use the suspended rule.
* @see #suspend(ISchedulingRule, IProgressMonitor)
*/
- @Deprecated
- public void resume(ISchedulingRule rule);
+ @Deprecated void resume(ISchedulingRule rule);
/**
* Resumes execution of jobs after a previous <code>suspend</code>. All
@@ -292,7 +291,7 @@ public interface IJobManager {
* @see #suspend()
* @see #isSuspended()
*/
- public void resume();
+ void resume();
/**
* Provides a hook that is notified whenever a thread is about to wait on a lock,
@@ -303,7 +302,7 @@ public interface IJobManager {
* </p>
* @see LockListener
*/
- public void setLockListener(LockListener listener);
+ void setLockListener(LockListener listener);
/**
* Registers a progress provider with the job manager. If there was a
@@ -316,7 +315,7 @@ public interface IJobManager {
* @param provider the new provider, or <code>null</code> if no progress
* is needed
*/
- public void setProgressProvider(ProgressProvider provider);
+ void setProgressProvider(ProgressProvider provider);
/**
* Suspends execution of all jobs. Jobs that are already running
@@ -340,7 +339,7 @@ public interface IJobManager {
* @see #join(Object, IProgressMonitor)
* @see #isSuspended()
*/
- public void suspend();
+ void suspend();
/**
* Defers execution of all jobs with scheduling rules that conflict with the
@@ -378,8 +377,7 @@ public interface IJobManager {
* Cancelation can occur even if no progress monitor is provided.
* @see #resume(ISchedulingRule)
*/
- @Deprecated
- public void suspend(ISchedulingRule rule, IProgressMonitor monitor);
+ @Deprecated void suspend(ISchedulingRule rule, IProgressMonitor monitor);
/**
* Requests that all jobs in the given job family be suspended. Jobs currently
@@ -393,7 +391,7 @@ public interface IJobManager {
* @param family the job family to sleep, or <code>null</code> to sleep all jobs.
* @see Job#belongsTo(Object)
*/
- public void sleep(Object family);
+ void sleep(Object family);
/**
* Transfers ownership of a scheduling rule to another thread. The identical
@@ -413,7 +411,7 @@ public interface IJobManager {
* @param destinationThread The new owner for the transferred rule.
* @since 3.1
*/
- public void transferRule(ISchedulingRule rule, Thread destinationThread);
+ void transferRule(ISchedulingRule rule, Thread destinationThread);
/**
* Resumes scheduling of all sleeping jobs in the given family. This method
@@ -422,5 +420,5 @@ public interface IJobManager {
* @param family the job family to wake up, or <code>null</code> to wake up all jobs
* @see Job#belongsTo(Object)
*/
- public void wakeUp(Object family);
+ void wakeUp(Object family);
}
diff --git a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobStatus.java b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobStatus.java
index 07cd46299..8e39cbe5d 100644
--- a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobStatus.java
+++ b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobStatus.java
@@ -25,5 +25,5 @@ public interface IJobStatus extends IStatus {
*
* @return the job associated with this status
*/
- public Job getJob();
+ Job getJob();
}
diff --git a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/ILock.java b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/ILock.java
index d19276e6f..b171b2c2e 100644
--- a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/ILock.java
+++ b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/ILock.java
@@ -71,7 +71,7 @@ public interface ILock {
* <code>false</code> otherwise.
* @exception InterruptedException if the thread was interrupted
*/
- public boolean acquire(long delay) throws InterruptedException;
+ boolean acquire(long delay) throws InterruptedException;
/**
* Acquires this lock. If the lock is in use, the calling thread will block until the lock
@@ -85,7 +85,7 @@ public interface ILock {
* This implementation ignores attempts to interrupt the thread. If response to
* interruption is needed, use the method <code>acquire(long)</code>
*/
- public void acquire();
+ void acquire();
/**
* Returns the number of nested acquires on this lock that have not been released.
@@ -94,11 +94,11 @@ public interface ILock {
*
* @return the number of nested acquires that have not been released
*/
- public int getDepth();
+ int getDepth();
/**
* Releases this lock. Locks must only be released by the thread that currently
* owns the lock.
*/
- public void release();
+ void release();
}
diff --git a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/ISchedulingRule.java b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/ISchedulingRule.java
index 8225c1a74..969828395 100644
--- a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/ISchedulingRule.java
+++ b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/ISchedulingRule.java
@@ -45,7 +45,7 @@ public interface ISchedulingRule {
* @return <code>true</code> if this rule contains the given rule, and
* <code>false</code> otherwise.
*/
- public boolean contains(ISchedulingRule rule);
+ boolean contains(ISchedulingRule rule);
/**
* Returns whether this scheduling rule is compatible with another scheduling rule.
@@ -65,5 +65,5 @@ public interface ISchedulingRule {
* @return <code>true</code> if the rule is conflicting, and <code>false</code>
* otherwise.
*/
- public boolean isConflicting(ISchedulingRule rule);
+ boolean isConflicting(ISchedulingRule rule);
}