Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 160651 Details for
Bug 283446
[Jobs] Need a way to get the active rule stack for a given thread
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
API and implementation
patch.txt (text/plain), 2.81 KB, created by
John Arthorne
on 2010-03-02 12:23:32 EST
(
hide
)
Description:
API and implementation
Filename:
MIME Type:
Creator:
John Arthorne
Created:
2010-03-02 12:23:32 EST
Size:
2.81 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.core.jobs >Index: src/org/eclipse/core/internal/jobs/JobManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobManager.java,v >retrieving revision 1.39 >diff -u -r1.39 JobManager.java >--- src/org/eclipse/core/internal/jobs/JobManager.java 22 Feb 2010 18:10:04 -0000 1.39 >+++ src/org/eclipse/core/internal/jobs/JobManager.java 2 Mar 2010 17:22:44 -0000 >@@ -483,6 +483,17 @@ > return null; > } > >+ public ISchedulingRule currentRule() { >+ //check thread job first, because actual current job may have null rule >+ Job currentJob = implicitJobs.getThreadJob(Thread.currentThread()); >+ if (currentJob != null) >+ return currentJob.getRule(); >+ currentJob = currentJob(); >+ if (currentJob != null) >+ return currentJob.getRule(); >+ return null; >+ } >+ > /** > * Returns the delay in milliseconds that a job with a given priority can > * tolerate waiting. >Index: src/org/eclipse/core/runtime/jobs/IJobManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobManager.java,v >retrieving revision 1.8 >diff -u -r1.8 IJobManager.java >--- src/org/eclipse/core/runtime/jobs/IJobManager.java 11 Feb 2009 16:51:46 -0000 1.8 >+++ src/org/eclipse/core/runtime/jobs/IJobManager.java 2 Mar 2010 17:22:44 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2003, 2009 IBM Corporation and others. >+ * Copyright (c) 2003, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -142,6 +142,22 @@ > public IProgressMonitor createProgressGroup(); > > /** >+ * Returns the scheduling rule currently held by this thread, or <code>null</code> >+ * if the current thread does not hold any scheduling rule. >+ * <p> >+ * If this method is called from within the scope of a running job with a non-null >+ * scheduling rule, then this method is equivalent to calling <code>currentJob().getRule()</code>. >+ * Otherwise, this method will return the first scheduling rule obtained by this >+ * thread via {@link #beginRule(ISchedulingRule, IProgressMonitor)} that has not >+ * yet had a corresponding call to {@link #endRule(ISchedulingRule)}. >+ * </p> >+ * >+ * @return the current rule or <code>null</code> >+ * @since 3.5 >+ */ >+ public ISchedulingRule currentRule(); >+ >+ /** > * Returns the job that is currently running in this thread, or <code>null</code> if there > * is no currently running job. > *
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 283446
: 160651