class DownloadSourcesJob extends org.eclipse.core.runtime.jobs.Job implements IBackgroundProcessingQueue
Modifier and Type | Class and Description |
---|---|
private static class |
DownloadSourcesJob.DownloadRequest |
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
log |
private BuildPathManager |
manager |
private IMaven |
maven |
private IMavenProjectRegistry |
projectManager |
private java.util.ArrayList<DownloadSourcesJob.DownloadRequest> |
queue |
private static long |
SCHEDULE_INTERVAL |
Constructor and Description |
---|
DownloadSourcesJob(BuildPathManager manager) |
Modifier and Type | Method and Description |
---|---|
void |
addDownloadRequest(org.eclipse.core.resources.IProject project,
org.eclipse.jdt.core.IPackageFragmentRoot fragment,
ArtifactKey artifact,
boolean downloadSources,
boolean downloadJavadoc) |
private java.io.File |
download(ArtifactKey artifact,
java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> repositories,
org.eclipse.core.runtime.IProgressMonitor monitor) |
private java.io.File[] |
downloadAttachments(ArtifactKey artifact,
java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> repositories,
boolean downloadSources,
boolean downloadJavadoc,
org.eclipse.core.runtime.IProgressMonitor monitor) |
private void |
downloadMaven(IMavenProjectFacade projectFacade,
ArtifactKey artifact,
boolean downloadSources,
boolean downloadJavadoc,
org.eclipse.core.runtime.IProgressMonitor monitor) |
boolean |
isEmpty() |
(package private) org.eclipse.core.runtime.IStatus |
run(java.util.ArrayList<DownloadSourcesJob.DownloadRequest> downloadRequests,
org.eclipse.core.runtime.IProgressMonitor monitor) |
org.eclipse.core.runtime.IStatus |
run(org.eclipse.core.runtime.IProgressMonitor monitor) |
void |
scheduleDownload(org.eclipse.jdt.core.IPackageFragmentRoot fragment,
ArtifactKey artifact,
boolean downloadSources,
boolean downloadJavadoc) |
void |
scheduleDownload(org.eclipse.core.resources.IProject project,
ArtifactKey artifact,
boolean downloadSources,
boolean downloadJavadoc)
If artifact is not null, download sources and/or javadoc of this artifact.
|
private void |
scheduleDownload(org.eclipse.core.resources.IProject project,
org.eclipse.jdt.core.IPackageFragmentRoot fragment,
ArtifactKey artifact,
boolean downloadSources,
boolean downloadJavadoc) |
addJobChangeListener, belongsTo, cancel, canceling, create, create, createSystem, createSystem, done, getJobGroup, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, join, removeJobChangeListener, schedule, schedule, setJobGroup, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, shouldRun, shouldSchedule, sleep, toString, wakeUp, wakeUp, yieldRule
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
cancel, join
private static org.slf4j.Logger log
private static final long SCHEDULE_INTERVAL
private final IMaven maven
private final BuildPathManager manager
private final IMavenProjectRegistry projectManager
private final java.util.ArrayList<DownloadSourcesJob.DownloadRequest> queue
public DownloadSourcesJob(BuildPathManager manager)
public org.eclipse.core.runtime.IStatus run(org.eclipse.core.runtime.IProgressMonitor monitor)
run
in interface IBackgroundProcessingQueue
run
in class org.eclipse.core.runtime.jobs.Job
org.eclipse.core.runtime.IStatus run(java.util.ArrayList<DownloadSourcesJob.DownloadRequest> downloadRequests, org.eclipse.core.runtime.IProgressMonitor monitor)
private void downloadMaven(IMavenProjectFacade projectFacade, ArtifactKey artifact, boolean downloadSources, boolean downloadJavadoc, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
private java.io.File[] downloadAttachments(ArtifactKey artifact, java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> repositories, boolean downloadSources, boolean downloadJavadoc, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
private java.io.File download(ArtifactKey artifact, java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> repositories, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
private void scheduleDownload(org.eclipse.core.resources.IProject project, org.eclipse.jdt.core.IPackageFragmentRoot fragment, ArtifactKey artifact, boolean downloadSources, boolean downloadJavadoc)
public void addDownloadRequest(org.eclipse.core.resources.IProject project, org.eclipse.jdt.core.IPackageFragmentRoot fragment, ArtifactKey artifact, boolean downloadSources, boolean downloadJavadoc)
public void scheduleDownload(org.eclipse.core.resources.IProject project, ArtifactKey artifact, boolean downloadSources, boolean downloadJavadoc)
public void scheduleDownload(org.eclipse.jdt.core.IPackageFragmentRoot fragment, ArtifactKey artifact, boolean downloadSources, boolean downloadJavadoc)
public boolean isEmpty()
isEmpty
in interface IBackgroundProcessingQueue